/* ============================================================
   Scrieve — marketing site
   Palette drawn from the subject's own materials: indigo (the app),
   warm paper, and the buff/pink tints of UK CD prescription stationery.
   ============================================================ */

:root {
  --ink:      #1a1a2e;
  --indigo:   #3f51b5;
  --indigo-d: #2f3f97;
  --paper:    #fdfbf7;
  --buff:     #f5e6cb;
  --pink:     #f7dee4;
  --line:     #e4e1d8;
  --line-2:   #d9d5c9;
  --mute:     #6b6b78;
  --white:    #ffffff;

  --sans: 'Space Grotesk', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --body: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, 'Cascadia Code', 'Roboto Mono', monospace;

  --maxw: 1120px;
  --pad: clamp(1.25rem, 4vw, 2.75rem);
  --r: 10px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3 { font-family: var(--sans); font-weight: 700; line-height: 1.08; letter-spacing: -0.015em; margin: 0; }

img, video { max-width: 100%; display: block; }

a { color: var(--indigo-d); text-decoration: none; }

.skip {
  position: absolute; left: -9999px; top: 0; background: var(--ink); color: #fff;
  padding: .6rem 1rem; z-index: 100; border-radius: 0 0 var(--r) 0;
}
.skip:focus { left: 0; }

:focus-visible { outline: 2.5px solid var(--indigo); outline-offset: 3px; border-radius: 3px; }

/* ---------- layout helpers ---------- */
.wrap { max-width: var(--maxw); margin-inline: auto; padding-inline: var(--pad);
        padding-block: clamp(3.5rem, 8vw, 6rem); }
.wrap--narrow { max-width: 760px; }

.eyebrow {
  font-family: var(--mono); font-size: .74rem; font-weight: 500;
  letter-spacing: .16em; text-transform: uppercase; color: var(--indigo-d);
  margin: 0 0 1.1rem;
}
.eyebrow::before { content: ""; display: inline-block; width: 14px; height: 2px; background: currentColor; vertical-align: middle; margin-right: .6rem; opacity: .7; }
.eyebrow--light { color: #cfd4ff; }

.h2 { font-size: clamp(1.6rem, 3.4vw, 2.35rem); margin-bottom: 1rem; max-width: 22ch; }
.h2--light { color: #fff; }

.lead { font-size: clamp(1.1rem, 2vw, 1.3rem); line-height: 1.55; color: #33333f; max-width: 46ch; }
.lead--light { color: #e8e9f5; }

.microcopy { font-family: var(--mono); font-size: .78rem; color: var(--mute); letter-spacing: .01em; margin-top: 1.5rem; }
.microcopy--light { color: #b9bde0; }

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding: .85rem var(--pad);
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.brand { display: inline-flex; align-items: center; gap: .5rem; color: var(--ink); font-family: var(--sans); font-weight: 700; font-size: 1.2rem; letter-spacing: -.02em; }
.brand__mark { font-family: var(--mono); font-weight: 500; font-size: .74rem; line-height: 1; letter-spacing: .01em; color: #fff; background: var(--indigo); padding: .28rem .34rem; border-radius: 5px; }
.nav__links { display: flex; align-items: center; gap: clamp(.75rem, 2vw, 1.9rem); font-family: var(--mono); font-size: .82rem; }
.nav__links a { color: var(--ink); letter-spacing: .01em; }
.nav__links a:hover { color: var(--indigo-d); }
.nav__cta { background: var(--ink); color: #fff !important; padding: .5rem .9rem; border-radius: 100px; }
.nav__cta:hover { background: var(--indigo-d); }

/* ---------- hero ---------- */
.hero {
  max-width: var(--maxw); margin-inline: auto; padding: clamp(2.5rem,6vw,4.5rem) var(--pad) clamp(3rem,7vw,5.5rem);
  display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(2rem, 5vw, 4rem); align-items: center;
}
.hero__title { font-size: clamp(2.1rem, 5.2vw, 3.6rem); margin-bottom: 1.25rem; }
.hero__sub { font-size: clamp(1.05rem, 1.7vw, 1.2rem); color: #3a3a48; max-width: 42ch; margin: 0 0 1.9rem; }
.hero__actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-bottom: 1.6rem; }

.btn { font-family: var(--mono); font-size: .86rem; letter-spacing: .02em; padding: .8rem 1.4rem; border-radius: 100px; border: 1.5px solid transparent; cursor: pointer; transition: transform .12s ease, background .18s ease, border-color .18s ease; display: inline-block; }
.btn:hover { transform: translateY(-1px); }
.btn--primary { background: var(--indigo); color: #fff; }
.btn--primary:hover { background: var(--indigo-d); }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line-2); }
.btn--ghost:hover { border-color: var(--indigo); color: var(--indigo-d); }

.status-line { font-family: var(--mono); font-size: .8rem; color: var(--mute); display: flex; align-items: center; gap: .55rem; margin: 0; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: #46b17a; box-shadow: 0 0 0 0 rgba(70,177,122,.55); animation: pulse 2.4s ease-out infinite; }
@keyframes pulse { 0%{box-shadow:0 0 0 0 rgba(70,177,122,.5);} 70%{box-shadow:0 0 0 9px rgba(70,177,122,0);} 100%{box-shadow:0 0 0 0 rgba(70,177,122,0);} }

/* ---------- the signature: overprinted CD form ---------- */
.hero__form { display: flex; flex-direction: column; gap: .8rem; }
.rx {
  background:
    repeating-linear-gradient(0deg, transparent, transparent 27px, rgba(0,0,0,.03) 27px, rgba(0,0,0,.03) 28px),
    linear-gradient(180deg, #f8ecd6, var(--buff));
  border: 1px solid #e2caa0; border-radius: var(--r);
  padding: 1.25rem 1.35rem 1.1rem;
  box-shadow: 0 26px 50px -24px rgba(70,55,20,.5), 0 2px 0 rgba(255,255,255,.4) inset;
  transform: rotate(-1.1deg);
  position: relative;
}
.rx::after { /* SPECIMEN-style diagonal watermark, faint */
  content: "PRIVATE CD"; position: absolute; inset: 0; display: grid; place-items: center;
  font-family: var(--mono); font-size: 1.4rem; letter-spacing: .3em; color: rgba(140,110,60,.13);
  transform: rotate(-20deg); pointer-events: none;
}
.rx__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: .9rem; }
.rx__tag { font-family: var(--mono); font-size: .72rem; font-weight: 500; background: var(--ink); color: #fff; padding: .22rem .5rem; border-radius: 4px; letter-spacing: .04em; }
.rx__cd { color: #9a7b3f; }
.rx__mono { font-family: var(--mono); font-size: .74rem; letter-spacing: .05em; }
.rx__row { display: grid; grid-template-columns: 74px 1fr; align-items: end; gap: .6rem; margin-bottom: .7rem; }
.rx__label { font-family: var(--mono); font-size: .68rem; color: #6f5a30; text-transform: uppercase; letter-spacing: .08em; }
.rx__field { min-height: 1.35rem; border-bottom: 1.5px solid #cbb28e;
  font-family: var(--mono); font-size: .92rem; color: var(--indigo-d); letter-spacing: .01em; white-space: nowrap; overflow: hidden; }
.rx__field--lg { font-size: 1rem; font-weight: 500; }
.rx__boxes { display: flex; gap: 3px; }
.rx__boxes span { width: 15px; height: 20px; border: 1px solid #cbb28e; border-radius: 2px; display: grid; place-items: center; font-family: var(--mono); font-size: .78rem; color: var(--indigo-d); background: rgba(255,255,255,.35); }
.rx__rule { height: 1px; background: #d8bd8f; margin: .5rem 0 .8rem; }
.rx__med { display: flex; flex-direction: column; gap: .55rem; margin-bottom: 1rem; }
.rx__med .rx__field { border-bottom-style: dotted; }
.rx__foot { display: flex; align-items: center; justify-content: space-between; border-top: 1px dashed #cbb28e; padding-top: .6rem; }
.rx__foot .rx__mono { color: #6f5a30; }
.rx__caret { color: var(--indigo); }
.rx__caret::after { content: "▍"; animation: blink 1.05s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.hero__form-cap { font-family: var(--mono); font-size: .74rem; color: var(--mute); text-align: center; margin: 0; }

/* ---------- bands ---------- */
.band { background: var(--white); border-block: 1px solid var(--line); }
.band--contact { background: linear-gradient(180deg, #fff, #f6f3ec); border-bottom: none; }

/* ---------- flow (what it does) ---------- */
.flow { list-style: none; margin: 2.2rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(3,1fr); gap: 1.5rem; counter-reset: none; }
.flow__step { border-top: 2px solid var(--ink); padding-top: 1rem; }
.flow__n { font-family: var(--mono); font-size: .8rem; color: var(--indigo); letter-spacing: .1em; }
.flow__step h3 { font-size: 1.2rem; margin: .5rem 0 .5rem; }
.flow__step p { margin: 0; color: #40404d; font-size: .98rem; }

/* ---------- feature cards ---------- */
.cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; margin-top: 2rem; }
.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--r); padding: 1.5rem 1.5rem 1.35rem; position: relative; transition: border-color .18s ease, transform .18s ease, box-shadow .18s ease; }
.card:hover { border-color: #c7ccef; transform: translateY(-2px); box-shadow: 0 20px 40px -30px rgba(63,81,181,.5); }
.card::before { content: ""; position: absolute; left: 0; top: 1.6rem; width: 3px; height: 1.5rem; background: var(--indigo); border-radius: 0 3px 3px 0; }
.card__label { font-family: var(--mono); font-size: .68rem; text-transform: uppercase; letter-spacing: .12em; color: var(--mute); }
.card h3 { font-size: 1.22rem; margin: .4rem 0 .55rem; }
.card p { margin: 0; color: #40404d; font-size: .98rem; }
.card--wide { grid-column: 1 / -1; }

/* ---------- screenshots ---------- */
.shots { display: grid; grid-template-columns: repeat(3,1fr); gap: 1.2rem; margin-top: 2rem; }
.shot { margin: 0; }
.shot__frame {
  aspect-ratio: 16/10; border-radius: var(--r); border: 1px solid var(--line-2);
  background:
    linear-gradient(135deg, #eef0fb, #f7f4ee);
  position: relative; overflow: hidden;
  box-shadow: 0 18px 38px -28px rgba(30,30,60,.5);
}
.shot__frame::before { content: attr(data-shot); position: absolute; inset: 0; display: grid; place-items: center;
  font-family: var(--mono); font-size: .82rem; letter-spacing: .05em; color: var(--indigo-d); }
.shot__frame::after { content: "screenshot"; position: absolute; left: 12px; bottom: 10px; font-family: var(--mono); font-size: .62rem; text-transform: uppercase; letter-spacing: .15em; color: var(--mute); }
.shot img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.shot__frame:has(img) { background: #fff; }
.shot__frame:has(img)::before, .shot__frame:has(img)::after { content: none; }
.shot figcaption { font-size: .92rem; color: var(--mute); margin-top: .7rem; }

/* featured lead screenshot (patient record) */
.showcase { margin: 2rem 0 .5rem; }
.showcase img { width: 100%; height: auto; display: block; border-radius: var(--r);
  border: 1px solid var(--line-2); box-shadow: 0 22px 46px -30px rgba(30,30,60,.55); }
.showcase figcaption { font-size: .92rem; color: var(--mute); margin-top: .8rem; }

/* ---------- printing (video) ---------- */
.printing { position: relative; overflow: hidden; background: #171526; color: #fff; isolation: isolate; }
.printing__video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.printing__overlay { position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(23,21,38,.72), rgba(23,21,38,.9)); }
.printing__inner { }
.forms { display: flex; flex-wrap: wrap; gap: 1.4rem; margin-top: 2rem; }
.form-card { margin: 0; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.14); border-radius: var(--r); padding: .9rem; backdrop-filter: blur(3px); flex: 0 0 240px; max-width: 240px; }
.form-card img { display: block; width: 100%; height: 380px; object-fit: contain; border-radius: 6px; box-shadow: 0 14px 30px -16px rgba(0,0,0,.7); }
.form-card figcaption { font-family: var(--mono); font-size: .78rem; color: #dfe1f2; margin-top: .7rem; }
.form-card figcaption strong { color: #fff; }

/* ---------- what it's not ---------- */
.notpanel { border: 1.5px solid var(--ink); border-radius: var(--r); padding: clamp(1.5rem,4vw,2.5rem); background: var(--white); position: relative; }
.notpanel::before { content: ""; position: absolute; top: -1px; left: -1px; right: -1px; height: 5px; background: repeating-linear-gradient(90deg, var(--ink) 0 14px, transparent 14px 24px); border-radius: var(--r) var(--r) 0 0; }
.notpanel__lead { font-family: var(--sans); font-weight: 700; font-size: clamp(1.2rem,2.4vw,1.5rem); line-height: 1.25; margin: .3rem 0 .9rem; }
.notpanel p:last-child { margin-bottom: 0; color: #40404d; }

/* ---------- contact form ---------- */
.form { margin-top: 2rem; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.field { display: block; margin-bottom: 1rem; }
.field__label { font-family: var(--mono); font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; color: var(--mute); display: block; margin-bottom: .4rem; }
.field input, .field textarea {
  width: 100%; font-family: var(--body); font-size: 1rem; color: var(--ink);
  padding: .75rem .85rem; border: 1.5px solid var(--line-2); border-radius: 8px; background: #fff;
  transition: border-color .16s ease, box-shadow .16s ease; resize: vertical;
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--indigo); box-shadow: 0 0 0 3px rgba(63,81,181,.15); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form__foot { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; margin-top: .5rem; }
.form__status { font-family: var(--mono); font-size: .82rem; margin: 0; }
.form__status.is-ok { color: #2f7d54; }
.form__status.is-err { color: #b23a48; }
.btn[disabled] { opacity: .55; cursor: progress; transform: none; }

/* ---------- footer ---------- */
.foot { background: var(--ink); color: #d7d7e2; }
.foot__inner { display: grid; gap: 1rem; padding-block: 2.75rem; }
.brand--foot { color: #fff; font-size: 1.05rem; }
.brand--foot .brand__mark { background: #5865d6; color: #fff; }
.foot__note { font-size: .9rem; color: #a9a9bd; max-width: 60ch; margin: 0; }
.foot__meta { font-family: var(--mono); font-size: .78rem; color: #8c8ca3; margin: 0; }

/* ---------- scroll reveal ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.is-visible { opacity: 1; transform: none; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; }
  .hero__form { max-width: 460px; }
  .flow, .shots { grid-template-columns: 1fr; }
  .cards { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .nav__links a:not(.nav__cta) { display: none; }
  .form__row { grid-template-columns: 1fr; }
  .rx { transform: none; }
  /* decorative hero form: clip its own overflow so the page never scrolls sideways */
  .hero__form { max-width: 100%; overflow: hidden; }
  /* on mobile, match the featured screenshot to the 3 gallery tiles below:
     same full-width 16/10 tile cropped from the top (desktop untouched) */
  .showcase img { width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .dot { animation: none; }
  .rx__caret::after { animation: none; }
  .printing__video { display: none; }
}
