/* ===========================================================
   Image2Doc — landing page styles
   Design goals: clean, minimal, trustworthy, mobile-first.
   No frameworks. No JavaScript required.
   =========================================================== */

:root {
  --bg:        #FFFFFF;
  --bg-alt:    #F7F8FB;
  --bg-card:   #FFFFFF;
  --text:      #0F172A;
  --text-mid:  #475569;
  --text-soft: #64748B;
  --border:    #E5E7EB;
  --border-soft:#EEF0F4;
  --accent:    #4F46E5;
  --accent-hov:#4338CA;
  --accent-soft:#EEF2FF;
  --success:   #059669;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .04);
  --shadow-md: 0 4px 14px rgba(15, 23, 42, .06);
  --shadow-lg: 0 18px 40px -12px rgba(79, 70, 229, .25);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 22px;
  --maxw: 1080px;
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI",
    Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* Block accidental horizontal scroll on any device */
  overflow-x: hidden;
  /* Avoid the blue tap highlight on iOS without removing focus rings */
  -webkit-tap-highlight-color: rgba(79, 70, 229, .15);
}

img, svg { display: block; max-width: 100%; height: auto; }

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hov); text-decoration: underline; }

button { font-family: inherit; }

/* Long words / URLs never blow out the layout on narrow screens */
h1, h2, h3, p, li, a { overflow-wrap: break-word; word-wrap: break-word; }

.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}
.container--narrow { max-width: 720px; text-align: center; }

@media (max-width: 480px) {
  .container { padding: 0 18px; }
}

/* ===========================================================
   Brand mark
   =========================================================== */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 16px;
  color: var(--text);
  margin-bottom: 48px;
}
.brand__mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px; height: 32px;
  background: var(--accent);
  color: #fff;
  border-radius: 9px;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: -.3px;
}
.brand__mark--sm { width: 26px; height: 26px; font-size: 11px; border-radius: 7px; }

/* ===========================================================
   Hero
   =========================================================== */
.hero {
  position: relative;
  padding: clamp(40px, 7vw, 64px) 0 clamp(56px, 9vw, 88px);
  background:
    radial-gradient(1200px 500px at 50% -100px, var(--accent-soft) 0%, transparent 60%),
    var(--bg);
  text-align: center;
  overflow: hidden;
}

.hero__headline {
  font-size: clamp(28px, 5.5vw, 56px);
  line-height: 1.1;
  letter-spacing: -1px;
  font-weight: 700;
  margin: 0 auto 18px;
  max-width: 820px;
  color: var(--text);
}

.hero__sub {
  font-size: clamp(15px, 2vw, 19px);
  color: var(--text-mid);
  max-width: 640px;
  margin: 0 auto clamp(24px, 4vw, 36px);
  line-height: 1.55;
}

/* ===========================================================
   CTA
   =========================================================== */
.cta {
  display: inline-block;
  background: var(--accent);
  color: #ffffff;
  font-weight: 600;
  font-size: 16px;
  letter-spacing: .1px;
  padding: 16px 32px;
  min-height: 52px;
  border-radius: 12px;
  border: 1px solid var(--accent);
  box-shadow: var(--shadow-lg);
  transition: transform .15s ease, background-color .15s ease, box-shadow .15s ease;
  /* Avoid the CTA being squeezed off-screen on extremely narrow phones */
  max-width: 100%;
}
@media (max-width: 380px) {
  .cta { padding: 15px 22px; font-size: 15px; }
}
.cta:hover {
  background: var(--accent-hov);
  color: #fff;
  text-decoration: none;
  transform: translateY(-1px);
}
.cta:active { transform: translateY(0); }
.cta:focus-visible {
  outline: 3px solid #C7D2FE;
  outline-offset: 3px;
}

.cta__meta {
  margin: 14px auto 4px;
  color: var(--text-soft);
  font-size: 13px;
}
.cta__source {
  margin: 0 auto;
  color: var(--text-soft);
  font-size: 12px;
  letter-spacing: .3px;
}

/* ===========================================================
   Hero mockup
   =========================================================== */
.hero__visual {
  margin: clamp(40px, 7vw, 64px) auto 0;
  max-width: 880px;
  padding: 0;
}
.mock {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: 0 30px 60px -20px rgba(15, 23, 42, .14);
  overflow: hidden;
  text-align: left;
}
.mock__bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: #FAFBFC;
  border-bottom: 1px solid var(--border-soft);
}
.mock__dot {
  width: 11px; height: 11px;
  background: #E2E8F0;
  border-radius: 50%;
}
.mock__dot:nth-child(1) { background: #FCA5A5; }
.mock__dot:nth-child(2) { background: #FCD34D; }
.mock__dot:nth-child(3) { background: #6EE7B7; }
.mock__title {
  margin-left: 12px;
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 500;
}
.mock__body {
  display: grid;
  grid-template-columns: clamp(160px, 22vw, 200px) 1fr;
}
.mock__nav {
  background: #FAFBFC;
  border-right: 1px solid var(--border-soft);
  padding: 20px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.mock__navItem {
  padding: 10px 12px;
  border-radius: 8px;
  color: var(--text-mid);
  font-size: 13px;
  font-weight: 500;
}
.mock__navItem--active {
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
}
.mock__work {
  display: grid;
  grid-template-columns: 1fr clamp(180px, 26vw, 220px);
  gap: 18px;
  padding: clamp(14px, 2.5vw, 22px);
}
.mock__doc {
  background: linear-gradient(180deg, #F8FAFC 0%, #EEF2F7 100%);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  height: 240px;
}
.mock__sidebar { display: flex; flex-direction: column; gap: 10px; }
.mock__row {
  height: 12px;
  background: var(--border-soft);
  border-radius: 6px;
}
.mock__row--short { width: 65%; }
.mock__btn {
  margin-top: auto;
  background: var(--accent);
  color: #fff;
  text-align: center;
  padding: 10px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
}

@media (max-width: 700px) {
  .mock__body { grid-template-columns: 1fr; }
  .mock__nav { display: flex; flex-direction: row; padding: 10px; }
  .mock__navItem { flex: 1; text-align: center; }
  .mock__work { grid-template-columns: 1fr; }
  .mock__doc { height: 180px; }
}

/* ===========================================================
   Section base
   =========================================================== */
.section {
  padding: clamp(56px, 9vw, 88px) 0;
}
.section--alt {
  background: var(--bg-alt);
  border-top: 1px solid var(--border-soft);
  border-bottom: 1px solid var(--border-soft);
}
.section--download {
  padding: clamp(64px, 10vw, 104px) 0;
}
.section__title {
  font-size: clamp(24px, 3.5vw, 36px);
  line-height: 1.2;
  letter-spacing: -.5px;
  font-weight: 700;
  text-align: center;
  margin: 0 0 clamp(32px, 5vw, 48px);
}

/* ===========================================================
   Features
   =========================================================== */
.features {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  max-width: 880px;
  margin: 0 auto;
}
.feature {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: clamp(22px, 3vw, 32px);
  box-shadow: var(--shadow-sm);
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.feature:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: #DDD9FE;
}
.feature__icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}
.feature__icon svg { width: 24px; height: 24px; }
.feature__title {
  margin: 0 0 8px;
  font-size: 19px;
  font-weight: 600;
  color: var(--text);
}
.feature__desc {
  margin: 0;
  color: var(--text-mid);
  line-height: 1.6;
  font-size: 15px;
}

@media (max-width: 700px) {
  .features { grid-template-columns: 1fr; }
}

/* ===========================================================
   How it works
   =========================================================== */
.steps {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  max-width: 920px;
  margin: 0 auto;
}
.step {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: clamp(20px, 3vw, 28px);
  box-shadow: var(--shadow-sm);
}
.step__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px;
  background: var(--accent);
  color: #fff;
  border-radius: 50%;
  font-weight: 700;
  font-size: 15px;
  margin-bottom: 16px;
}
.step__title {
  margin: 0 0 6px;
  font-size: 17px;
  font-weight: 600;
}
.step__desc {
  margin: 0;
  color: var(--text-mid);
  font-size: 14px;
  line-height: 1.55;
}

@media (max-width: 800px) {
  .steps { grid-template-columns: 1fr; }
}

/* ===========================================================
   Trust & safety
   =========================================================== */
.trust {
  list-style: none;
  padding: 0;
  margin: 0 auto 28px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px 24px;
  max-width: 720px;
}
.trust__item {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 15px;
  color: var(--text);
}
.trust__check {
  width: 20px; height: 20px;
  flex-shrink: 0;
  color: var(--success);
}

.notice {
  max-width: 720px;
  margin: 32px auto 0;
  padding: 18px 22px;
  background: #FFFBEB;
  border: 1px solid #FCD34D;
  border-radius: var(--radius-md);
  color: #78350F;
  font-size: 14px;
  line-height: 1.6;
}
.notice strong { color: #78350F; }

@media (max-width: 600px) {
  .trust { grid-template-columns: 1fr; }
}

/* ===========================================================
   Download section
   =========================================================== */
.section--download {
  background:
    radial-gradient(800px 360px at 50% 100%, var(--accent-soft) 0%, transparent 70%),
    var(--bg);
}
.download__lead {
  color: var(--text-mid);
  font-size: 17px;
  margin: 0 0 32px;
}

/* ===========================================================
   Footer
   =========================================================== */
.footer {
  border-top: 1px solid var(--border);
  padding: 36px 0 48px;
  background: #fff;
}
.footer__inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 16px;
  align-items: center;
}
.footer__brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  color: var(--text);
}
.footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  justify-content: center;
}
.footer__links a {
  color: var(--text-mid);
  font-size: 14px;
  padding: 6px 2px;
  display: inline-block;
}
.footer__links a:hover { color: var(--accent); }
.footer__legal {
  text-align: right;
  font-size: 13px;
  color: var(--text-soft);
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.footer__official { color: var(--text-soft); font-size: 12px; }

@media (max-width: 720px) {
  .footer__inner {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 22px;
  }
  .footer__brand, .footer__legal { justify-content: center; align-items: center; }
  .footer__legal { text-align: center; }
}

/* ===========================================================
   Legal sub-pages (privacy, terms, contact)
   =========================================================== */
.page {
  max-width: 760px;
  margin: 0 auto;
  padding: clamp(40px, 7vw, 64px) 24px clamp(64px, 10vw, 96px);
}
@media (max-width: 480px) {
  .page { padding-left: 18px; padding-right: 18px; }
}
.page h1 {
  font-size: clamp(28px, 4vw, 38px);
  letter-spacing: -.5px;
  margin: 0 0 8px;
}
.page .page__updated {
  color: var(--text-soft);
  font-size: 13px;
  margin: 0 0 32px;
}
.page h2 {
  font-size: 19px;
  margin: 32px 0 10px;
  color: var(--text);
}
.page p, .page li {
  color: var(--text-mid);
  line-height: 1.65;
  font-size: 15px;
}
.page ul { padding-left: 22px; }
.page__back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-mid);
  margin-bottom: 32px;
}
.page__back:hover { color: var(--accent); }

/* ===========================================================
   Cookie consent banner
   =========================================================== */
.cookie {
  position: fixed;
  left: max(16px, env(safe-area-inset-left));
  right: max(16px, env(safe-area-inset-right));
  bottom: max(16px, env(safe-area-inset-bottom));
  z-index: 50;
  margin: 0 auto;
  max-width: 720px;
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 24px 50px -12px rgba(15, 23, 42, .25);
  padding: 18px 20px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 20px;
  transform: translateY(140%);
  opacity: 0;
  transition: transform .28s ease, opacity .28s ease;
}
.cookie--visible {
  transform: translateY(0);
  opacity: 1;
}

.cookie__text {
  flex: 1 1 280px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--text-mid);
  margin: 0;
}
.cookie__text a {
  color: var(--accent);
  font-weight: 500;
}
.cookie__text a:hover { color: var(--accent-hov); }

.cookie__actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.cookie__btn {
  appearance: none;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  padding: 11px 20px;
  min-height: 44px;
  font-size: 14px;
  font-weight: 500;
  border-radius: 9px;
  cursor: pointer;
  transition: background-color .12s ease, border-color .12s ease, color .12s ease;
  font-family: inherit;
}
.cookie__btn:hover {
  background: #F8FAFC;
  border-color: #CBD5E1;
}
.cookie__btn:focus-visible {
  outline: 3px solid #C7D2FE;
  outline-offset: 2px;
}
.cookie__btn--primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
}
.cookie__btn--primary:hover {
  background: var(--accent-hov);
  border-color: var(--accent-hov);
  color: #ffffff;
}

@media (max-width: 520px) {
  .cookie {
    padding: 16px;
    gap: 12px;
  }
  .cookie__actions {
    width: 100%;
  }
  .cookie__btn {
    flex: 1;
    text-align: center;
  }
}

/* ===========================================================
   Tablet polish (768px – 1024px)
   =========================================================== */
@media (min-width: 768px) and (max-width: 1024px) {
  .features { gap: 20px; }
  .steps    { gap: 20px; }
}

/* ===========================================================
   Very small phones (≤ 360px) — keep nothing from clipping
   =========================================================== */
@media (max-width: 360px) {
  .brand { margin-bottom: 32px; }
  .feature__icon { width: 42px; height: 42px; }
  .feature__icon svg { width: 22px; height: 22px; }
  .step__num { width: 32px; height: 32px; font-size: 14px; }
}

/* ===========================================================
   Landscape phones (short viewports)
   =========================================================== */
@media (max-height: 480px) and (orientation: landscape) {
  .hero { padding-top: 28px; padding-bottom: 40px; }
  .brand { margin-bottom: 18px; }
  .hero__visual { margin-top: 28px; }
}

/* ===========================================================
   High-DPI / Retina text crispness
   =========================================================== */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  body { -webkit-font-smoothing: subpixel-antialiased; }
}

/* ===========================================================
   Reduce motion preference
   =========================================================== */
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
  html { scroll-behavior: auto; }
}

/* ===========================================================
   Print styles (clean printout of legal pages)
   =========================================================== */
@media print {
  .hero, .section--alt, .section--download, .footer,
  .cookie, .hero__visual { display: none !important; }
  body { color: #000; background: #fff; }
  a { color: #000; text-decoration: underline; }
  .page { padding: 0; max-width: 100%; }
}
