/* Adsraft landing page. Design system: the Pomelli tokens (4 colours, Playfair Display + Google Sans Flex,
   4px base spacing, one radius: full). Composition after Apple / Intercom / Clay: the product is the picture.
   Every value below references a token. */

:root {
  /* Colour */
  --color-ink: #2C3400;        /* text primary, dark fields */
  --color-sage: #C1CD7D;       /* hero, accent on dark */
  --color-stone: #E5E3D9;      /* quiet surfaces */
  --color-white: #FFFFFF;      /* page, panels */

  /* Type */
  --font-display: 'Playfair Display', 'Times New Roman', serif;
  --font-text: 'Google Sans Flex', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --text-xs: 14px;
  --text-sm: 16px;
  --text-body: 18px;
  --text-md: 22px;
  --text-lg: clamp(24px, 2.4vw, 32px);
  --text-xl: clamp(40px, 5.6vw, 80px);
  --text-display: clamp(40px, 7.4vw, 120px);
  --text-figure: clamp(56px, 6vw, 88px);
  --weight-regular: 400;
  --weight-medium: 500;
  --leading-text: 28px;
  --leading-tight: 20px;

  /* Space (base 4px) */
  --space-quarter: 4px;
  --space-half: 12px;
  --space-0: 16px;
  --space-1: 24px;
  --space-2: 32px;
  --space-3: 64px;
  --space-4: 100px;
  --space-5: 160px;
  --gutter: clamp(16px, 4vw, 48px);

  /* Shape + motion */
  --radius-full: 9999px;
  --duration-fast: 0.16s;
  --duration-base: 0.28s;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--color-white);
  color: var(--color-ink);
  font: var(--weight-regular) var(--text-body)/var(--leading-text) var(--font-text);
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p, ul, ol, figure, blockquote { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; }
[hidden] { display: none !important; }
::selection { background: var(--color-sage); color: var(--color-ink); }
:focus-visible { outline: 3px solid var(--color-ink); outline-offset: 3px; }
.dark :focus-visible { outline-color: var(--color-sage); }

.wrap { padding-inline: var(--gutter); max-width: 1360px; margin-inline: auto; }
.display, .head, h3 { font-family: var(--font-display); font-weight: var(--weight-regular); letter-spacing: -0.02em; }
.head { font-size: var(--text-xl); line-height: 1.02; max-width: 12em; }
h3 { font-size: var(--text-lg); line-height: 1.15; }
.lead { font-size: var(--text-md); line-height: 32px; max-width: 32em; }
.small { font-size: var(--text-xs); line-height: var(--leading-tight); }
.band { padding-block: var(--space-4) var(--space-5); }
.band--stone { background: var(--color-stone); }
.dark { background: var(--color-ink); color: var(--color-white); }

/* Buttons and links: one shape, every state */
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-half);
  min-height: 48px; padding: var(--space-half) var(--space-1);
  border: 0; border-radius: var(--radius-full);
  background: var(--color-ink); color: var(--color-white);
  font: var(--weight-medium) var(--text-sm)/var(--leading-text) var(--font-text);
  text-decoration: none; cursor: pointer;
  transition: box-shadow var(--duration-base) var(--ease), transform var(--duration-fast) var(--ease), background-color var(--duration-fast) var(--ease);
}
.button:hover { box-shadow: 0 0 0 4px var(--color-sage); } /* taste-skill-ignore: hover ring from the Pomelli motion token, hover only */
.button:active { transform: scale(0.97); }
.button[disabled] { background: var(--color-stone); color: var(--color-ink); cursor: not-allowed; box-shadow: none; transform: none; opacity: 0.6; } /* taste-skill-ignore: removes the hover ring */
.button--light { background: var(--color-white); color: var(--color-ink); }
.button--light:hover { box-shadow: 0 0 0 4px var(--color-ink); } /* taste-skill-ignore: hover ring from the Pomelli motion token, hover only */
.button--sage { background: var(--color-sage); color: var(--color-ink); }
.button--sage:hover { box-shadow: 0 0 0 4px var(--color-white); } /* taste-skill-ignore: hover ring from the Pomelli motion token, hover only */
.dark .button--light:hover { box-shadow: 0 0 0 4px var(--color-sage); } /* taste-skill-ignore: hover ring from the Pomelli motion token, hover only */
.arrow { transition: transform var(--duration-base) var(--ease); }
.button:hover .arrow { transform: translateX(4px); }
.textlink { text-underline-offset: 4px; text-decoration-thickness: 1px; }
.textlink:hover { text-decoration-thickness: 2px; }

/* Hero: one colour field, the headline, then the product, large, sitting across the edge into white */
.hero { position: relative; isolation: isolate; background: var(--color-white); }
.hero::before { content: ''; position: absolute; inset: 0 0 28% 0; background: var(--color-sage); z-index: -1; }
.bar { display: flex; align-items: center; justify-content: space-between; gap: var(--space-1); padding-block: var(--space-1); }
.mark { font-family: var(--font-display); font-size: 28px; line-height: 1; text-decoration: none; letter-spacing: -0.02em; }
.bar nav { display: flex; align-items: center; gap: var(--space-2); }
.bar nav a:not(.button) { text-decoration: none; font-size: var(--text-sm); font-weight: var(--weight-medium); }
.bar nav a:not(.button):hover { text-decoration: underline; text-underline-offset: 4px; }
.hero__copy { display: grid; justify-items: center; text-align: center; gap: var(--space-2); padding-block: var(--space-4) var(--space-3); }
.hero h1 { font-size: var(--text-display); line-height: 0.98; letter-spacing: -0.035em; max-width: 9.5em; }
.hero__copy .lead { max-width: 28em; }
.actions { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--space-half); }

/* The app window (an interface fragment: its own quiet borders are allowed) */
.app {
  display: grid; grid-template-columns: 200px minmax(280px, 360px) 1fr; min-height: 620px;
  background: var(--color-white); border: 1px solid var(--color-stone); font-size: var(--text-sm); line-height: 24px; /* taste-skill-ignore: product UI frame (data-ui) */
}
.app__side { background: var(--color-stone); padding: var(--space-1) var(--space-0); display: flex; flex-direction: column; gap: var(--space-1); }
.app__brand { font-family: var(--font-display); font-size: 22px; padding-inline: var(--space-half); }
.app__side ul { display: grid; gap: var(--space-quarter); }
.app__side li { display: flex; justify-content: space-between; padding: var(--space-quarter) var(--space-half); border-radius: var(--radius-full); }
.app__side li.is-on { background: var(--color-white); font-weight: var(--weight-medium); }
.app__side li span { background: var(--color-ink); color: var(--color-white); border-radius: var(--radius-full); min-width: 24px; text-align: center; font-size: 12px; line-height: 24px; }
.app__note { margin-top: auto; font-size: var(--text-xs); padding-inline: var(--space-half); }
.app__list { padding: var(--space-1) var(--space-0); display: grid; align-content: start; gap: var(--space-0); border-right: 1px solid var(--color-stone); min-width: 0; } /* taste-skill-ignore: product UI pane divider (data-ui) */
.app__head { display: flex; justify-content: space-between; align-items: baseline; gap: var(--space-half); padding-inline: var(--space-half); flex-wrap: wrap; }
.app__title { font-weight: var(--weight-medium); }
.app__count { font-size: var(--text-xs); }
.app__list ul { display: grid; gap: var(--space-quarter); }
.app__list li { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: var(--space-half); align-items: center; padding: var(--space-half); border-radius: var(--radius-full); cursor: pointer; transition: background-color var(--duration-fast) var(--ease); }
.app__list li:hover { background: var(--color-stone); }
.app__list li[aria-selected="true"] { background: var(--color-sage); }
.app__list li img { width: 44px; height: 44px; object-fit: cover; border-radius: var(--radius-full); }
.app__list li span { display: grid; min-width: 0; }
.app__list li b { font-weight: var(--weight-medium); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.app__list li small, .app__list li em { font-size: var(--text-xs); line-height: var(--leading-tight); font-style: normal; }
.app__list li small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.app__list li[data-state="approved"] em::before { content: 'Approved · '; }
.app__list li[data-state="changes"] em::before { content: 'Sent back · '; }
.app__list li.is-held { cursor: default; opacity: 0.6; grid-template-columns: 44px minmax(0, 1fr); }
.app__list li.is-held:hover { background: none; }
.app__list li.is-held img { filter: grayscale(1); }
.app__view { background: var(--color-stone); padding: var(--space-2); display: grid; justify-items: center; align-content: start; gap: var(--space-0); }
.post { width: min(100%, 380px); background: var(--color-white); }
.post__top { display: flex; gap: var(--space-half); align-items: center; padding: var(--space-half) var(--space-0); }
.post__top span:last-child { display: grid; }
.post__top b { font-weight: var(--weight-medium); }
.post__top small { font-size: var(--text-xs); line-height: var(--leading-tight); }
.post__avatar { width: 36px; height: 36px; border-radius: var(--radius-full); background: var(--color-ink); color: var(--color-sage); display: grid; place-items: center; font-family: var(--font-display); font-size: 18px; }
.post__pic { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; }
.post__copy { padding: var(--space-half) var(--space-0) var(--space-0); }
.checks { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--space-quarter) var(--space-half); width: min(100%, 380px); }
.checks span { font-size: var(--text-xs); line-height: var(--leading-tight); background: var(--color-white); border-radius: var(--radius-full); padding: var(--space-quarter) var(--space-half); }
.decide { display: flex; gap: var(--space-half); flex-wrap: wrap; justify-content: center; }
.decide__status:empty { display: none; }
.decide__status { width: min(100%, 380px); text-align: center; font-size: var(--text-xs); line-height: var(--leading-tight); }

/* Week */
.split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-2) var(--space-3); align-items: end; }
.split__text { display: grid; gap: var(--space-0); }
.cal { margin-top: var(--space-3); display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); background: var(--color-stone); gap: 1px; border: 1px solid var(--color-stone); } /* taste-skill-ignore: product UI calendar grid (data-ui) */
.cal__day { background: var(--color-white); min-height: 200px; padding: var(--space-0); display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-half); }
.cal__day p { font-size: var(--text-sm); font-weight: var(--weight-medium); margin-bottom: var(--space-quarter); }
.chip { background: var(--color-stone); border-radius: var(--radius-full); padding: var(--space-quarter) var(--space-half); font-size: var(--text-xs); line-height: var(--leading-tight); }
.chip--plan { background: var(--color-ink); color: var(--color-white); }
.chip--mail { background: var(--color-sage); }
.chip--rest { background: none; padding-inline: 0; }

/* Checks: a bento of tiles, each one proving one claim with a piece of the product */
#checks .head { margin-bottom: var(--space-3); }
.bento { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-1); }
.tile { background: var(--color-white); padding: var(--space-2); display: grid; gap: var(--space-0); align-content: start; }
.tile p { max-width: 32em; }
.redline, .match { margin-top: var(--space-0); background: var(--color-stone); padding: var(--space-1); }
.redline p:first-child { font-size: var(--text-md); line-height: 32px; }
.redline del { text-decoration-thickness: 2px; background: var(--color-sage); }
.redline__why { margin-top: var(--space-half); font-size: var(--text-xs); }
.match { display: flex; gap: var(--space-0); align-items: center; }
.match img { width: 72px; height: 72px; object-fit: cover; border-radius: var(--radius-full); }
.match span { display: grid; }
.match b { font-weight: var(--weight-medium); }
.match small { font-size: var(--text-xs); }
.calc { margin-top: var(--space-0); background: var(--color-stone); padding: var(--space-1); display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-0); }
.calc label { display: grid; gap: var(--space-quarter); font-size: var(--text-xs); font-weight: var(--weight-medium); }
.field { display: flex; align-items: center; gap: var(--space-quarter); background: var(--color-white); border-radius: var(--radius-full); padding: var(--space-quarter) var(--space-0); }
.field b { font-weight: var(--weight-regular); }
.field input { width: 100%; min-width: 0; border: 0; background: none; font: var(--weight-medium) var(--text-body)/var(--leading-text) var(--font-text); color: var(--color-ink); padding: var(--space-quarter) 0; }
.field input:focus { outline: none; }
.field:focus-within { outline: 3px solid var(--color-ink); outline-offset: 2px; }
.calc__out { grid-column: 1 / -1; display: grid; gap: var(--space-quarter); }
.calc__out b { font-family: var(--font-display); font-weight: var(--weight-regular); font-size: var(--text-figure); line-height: 1; letter-spacing: -0.03em; }
.calc__out span:last-child { font-size: var(--text-xs); }
.tile--dark { background: var(--color-ink); }
.zeros { margin-top: var(--space-0); display: grid; gap: var(--space-1); }
.zeros li { display: flex; align-items: baseline; gap: var(--space-0); }
.zeros b { font-family: var(--font-display); font-weight: var(--weight-regular); color: var(--color-sage); font-size: var(--text-figure); line-height: 1; letter-spacing: -0.03em; min-width: 2.2ch; }

/* Email flows */
.flows-wrap { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--space-3); align-items: center; }
.flows__text { display: grid; gap: var(--space-1); }
.flows { background: var(--color-stone); padding: var(--space-2); display: grid; gap: var(--space-1); }
.flow { display: grid; gap: var(--space-half); }
.flow__name { font-weight: var(--weight-medium); }
.flow ol { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-half); }
.flow li { background: var(--color-white); padding: var(--space-0); display: grid; gap: var(--space-quarter); min-height: 112px; align-content: start; }
.flow li small { font-size: var(--text-xs); line-height: var(--leading-tight); }
.flow li b { font-family: var(--font-display); font-weight: var(--weight-regular); font-size: var(--text-md); line-height: 1.2; }
.flows__state { justify-self: start; background: var(--color-ink); color: var(--color-white); border-radius: var(--radius-full); padding: var(--space-quarter) var(--space-0); font-size: var(--text-xs); }

/* Pricing */
.plans { margin-top: var(--space-3); display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-1); }
.plan { background: var(--color-stone); padding: var(--space-2); display: grid; gap: var(--space-1); align-content: start; }
.plan h3 { font-size: var(--text-lg); line-height: 1; }
.plan__price { display: flex; align-items: baseline; gap: var(--space-half); }
.plan__price b { font-family: var(--font-display); font-weight: var(--weight-regular); font-size: var(--text-figure); line-height: 0.9; letter-spacing: -0.04em; }
.plan__price span { font-size: var(--text-sm); }
.plan ul { display: grid; gap: var(--space-half); }
.plan li { padding-left: var(--space-1); position: relative; }
.plan li::before { content: ''; position: absolute; left: 0; top: 10px; width: 8px; height: 8px; border-radius: var(--radius-full); background: var(--color-ink); }
.plan--growth { background: var(--color-ink); }
.plan--growth li::before { background: var(--color-sage); }
.plan > .button { justify-self: start; }
.plans__note { margin-top: var(--space-2); display: grid; gap: var(--space-quarter); }

/* Questions */
.faq { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--space-2) var(--space-1); align-items: start; }
.faq .head { grid-column: 1 / span 4; }
.faq__list { grid-column: 5 / -1; display: grid; gap: var(--space-half); }
.faq details { display: grid; gap: var(--space-half); }
.faq summary {
  list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: var(--space-0);
  padding: var(--space-0) var(--space-1); border-radius: var(--radius-full); background: var(--color-white); font-size: var(--text-body); font-weight: var(--weight-medium);
  transition: background-color var(--duration-fast) var(--ease);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; font-family: var(--font-display); font-size: 32px; line-height: 1; transition: transform var(--duration-base) var(--ease); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq summary:hover { background: var(--color-sage); }
.faq details p { padding: var(--space-quarter) var(--space-1) var(--space-1); max-width: 40em; }

/* Close + footer */
.close { padding-block: var(--space-5) var(--space-4); }
.close h2 { font-size: var(--text-display); line-height: 0.98; letter-spacing: -0.035em; max-width: 10em; }
.close__lead { margin-top: var(--space-2); }
.close__row { margin-top: var(--space-2); display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-0); }
.foot { padding-block: var(--space-3) var(--space-1); }
.foot__name { display: inline-block; font-family: var(--font-display); color: var(--color-sage); line-height: 0.85; letter-spacing: -0.04em; white-space: nowrap; font-size: 22vw; }
.foot__row { margin-top: var(--space-2); display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--space-2) var(--space-1); }
.foot__places { grid-column: 1 / span 4; display: grid; gap: var(--space-quarter); align-content: start; }
.foot__links { grid-column: 7 / -1; display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-1); }
.foot__links p { color: var(--color-sage); font-size: var(--text-xs); margin-bottom: var(--space-half); }
.foot__links ul { display: grid; gap: var(--space-quarter); }
.foot a { text-decoration: none; }
.foot a:hover { text-decoration: underline; text-underline-offset: 4px; }
.foot__legal { margin-top: var(--space-3); display: flex; justify-content: space-between; flex-wrap: wrap; gap: var(--space-0); font-size: var(--text-xs); line-height: var(--leading-tight); }

/* Legal pages (make_legal.py) */
.grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--space-1); }
.doc-bar { background: var(--color-sage); display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: var(--space-0);
  padding: var(--space-1) var(--gutter); }
.doc-bar nav { display: flex; gap: var(--space-half); flex-wrap: wrap; }
.doc-bar nav a { text-decoration: none; background: var(--color-white); border-radius: var(--radius-full); padding: var(--space-quarter) var(--space-0); font-size: var(--text-sm); font-weight: var(--weight-medium); }
.doc-bar nav a:hover { background: var(--color-stone); }
.doc-bar nav a[aria-current="page"] { background: var(--color-ink); color: var(--color-white); }
.doc { padding: var(--space-3) var(--gutter) var(--space-4); max-width: 1360px; margin-inline: auto; row-gap: var(--space-2); }
.doc__head { grid-column: 1 / span 4; display: grid; gap: var(--space-half); align-content: start; }
.doc__head h1 { font-family: var(--font-display); font-weight: var(--weight-regular); font-size: var(--text-xl); line-height: 1; letter-spacing: -0.02em; }
.soft { font-size: var(--text-xs); }
.doc__body { grid-column: 6 / -1; max-width: 44em; font-size: var(--text-sm); line-height: 26px; }
.doc__body h2 { font-family: var(--font-display); font-weight: var(--weight-regular); font-size: 28px; line-height: 1.15; margin: var(--space-2) 0 var(--space-half); }
.doc__body h2:first-child { margin-top: 0; }
.doc__body p, .doc__body li { margin-bottom: var(--space-half); }
.doc__body ul { list-style: disc; padding-left: var(--space-1); }

/* Motion: content is visible without script; with it, parts rise once as they arrive */
@media (prefers-reduced-motion: no-preference) {
  .js [data-rise] { opacity: 0; transform: translateY(24px); transition: opacity 0.6s var(--ease), transform 0.6s var(--ease); transition-delay: calc(var(--i, 0) * 80ms); }
  .js [data-rise].in { opacity: 1; transform: none; }
  .hero__copy > * { animation: arrive 0.8s var(--ease) both; }
  .hero__copy > :nth-child(2) { animation-delay: 0.1s; }
  .hero__copy > :nth-child(3) { animation-delay: 0.2s; }
  .app { animation: lift 1s var(--ease) 0.25s both; }
  .post__pic.swap { animation: swap 0.4s var(--ease); }
  .tile { transition: transform var(--duration-base) var(--ease); }
  .tile:hover { transform: translateY(-4px); }
}
@keyframes arrive { from { opacity: 0; transform: translateY(24px); } }
@keyframes lift { from { opacity: 0; transform: translateY(64px) scale(0.97); } }
@keyframes swap { from { opacity: 0.3; transform: scale(1.03); } }

/* Tablet */
@media (max-width: 1023px) {
  .app { grid-template-columns: minmax(260px, 1fr) 1.2fr; }
  .app__side { display: none; }
  .split, .bento, .plans, .flows-wrap { grid-template-columns: 1fr; }
  .cal { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .faq .head, .faq__list, .foot__places, .foot__links, .doc__head, .doc__body { grid-column: 1 / -1; }
  .band { padding-block: var(--space-4); }
}

/* Phone */
@media (max-width: 640px) {
  :root { --text-body: 16px; --leading-text: 24px; --text-md: 18px; }
  .lead { line-height: 28px; }
  .bar nav a:not(.button) { display: none; }
  .hero::before { bottom: 40%; }
  .hero__copy { padding-block: var(--space-3) var(--space-2); }
  .app { grid-template-columns: 1fr; min-height: 0; }
  .app__list { border-right: 0; padding-bottom: var(--space-quarter); }
  .app__list ul { grid-auto-flow: column; grid-auto-columns: 78%; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: var(--space-quarter); }
  .app__list li { scroll-snap-align: start; }
  .app__view { padding: var(--space-0); }
  .cal { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cal__day { min-height: 0; }
  .tile, .plan { padding: var(--space-1); }
  .calc { grid-template-columns: 1fr; }
  .flows { padding: var(--space-0); }
  .flow ol { grid-template-columns: 1fr; }
  .flow li { min-height: 0; }
  .foot__links { grid-template-columns: repeat(2, 1fr); }
}
.ask { width: min(100%, 380px); display: grid; gap: var(--space-half); font-size: var(--text-xs); font-weight: var(--weight-medium); }
.ask .button { justify-self: center; }
