/* Designloop — base system: tokens, type, layout and page sections.
   Stage artifacts and ink illustrations live in artifacts.css. */

:root {
  color-scheme: light;

  /* Surfaces */
  --paper: #faf9f6;
  --paper-2: #f3f1eb;
  --paper-3: #ebe8e0;
  --card: #ffffff;
  --night: #1b1b19;
  --ash: #3a3a37;

  /* Ink */
  --ink: #171716;
  --ink-2: #3b3b38;
  --ink-hover: #2e2e2b;
  --muted: #6d6c66;
  --faint: #a19f97;
  --line: #e5e2da;
  --line-strong: #d4d0c5;

  /* Accent: design-tool selection blue, used sparingly */
  --accent: #3b5bdb;
  --accent-soft: #e4e9fb;

  /* Tiles */
  --tile-sand: #e9dfcb;
  --tile-clay: #e8c6b2;
  --tile-sage: #c6d4cb;
  --tile-sky: #c7d3ec;
  --tile-lilac: #d4d1e3;

  /* Type */
  --serif: 'Newsreader', 'Iowan Old Style', Georgia, serif;
  --sans: 'Geist', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'Geist Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  --text-xs: 13px;
  --text-sm: 14px;
  --text-md: 16px;
  --text-lg: 18px;
  --title: clamp(22px, 1.6vw + 12px, 26px);
  --heading: clamp(36px, 3.4vw + 18px, 58px);
  --display: clamp(44px, 5vw + 22px, 84px);

  /* Shape */
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --shadow-card: 0 1px 2px rgb(23 23 22 / 4%), 0 12px 32px -16px rgb(23 23 22 / 18%);

  /* Motion */
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-in-out: cubic-bezier(.65, 0, .35, 1);
  --dur-micro: 180ms;
  --dur-ui: 340ms;
  --dur-reveal: 900ms;

  --gutter: 24px;
  --max: 1200px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 88px; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 var(--text-md)/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
h1, h2, h3, h4, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
::selection { background: var(--accent-soft); color: var(--ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.wrap { width: min(100%, var(--max) + var(--gutter) * 2); margin-inline: auto; padding-inline: var(--gutter); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.svg-defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.skip-link { position: fixed; left: 16px; top: -60px; z-index: 100; padding: 10px 14px; background: var(--ink); color: var(--paper); border-radius: var(--radius-sm); text-decoration: none; transition: top var(--dur-ui) var(--ease-out); }
.skip-link:focus { top: 16px; }
.mono { font-family: var(--mono); font-feature-settings: 'zero' 0; }

/* Type */
h1, h2 { font-family: var(--serif); font-weight: 340; letter-spacing: -0.022em; font-optical-sizing: auto; text-wrap: balance; }
h1 { font-size: var(--display); line-height: 1.02; }
h2 { font-size: var(--heading); line-height: 1.06; }
h3 { font-family: var(--serif); font-weight: 400; font-size: var(--title); line-height: 1.2; letter-spacing: -0.01em; }
em { font-style: italic; }

/* Buttons */
/* Button: the shared rules live in button.css (also used by the portal). Landing-only additions here. */
.button svg { fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

.text-link { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; text-decoration: none; border-bottom: 1px solid var(--line-strong); padding-bottom: 2px; transition: border-color var(--dur-micro) ease; }
.text-link svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; transition: transform var(--dur-ui) var(--ease-out); }
.text-link:hover { border-color: var(--ink); }
.text-link:hover svg { transform: translateX(3px); }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgb(250 249 246 / 0%);
  transition: background-color var(--dur-ui) ease, backdrop-filter var(--dur-ui) ease;
}
.site-header.is-scrolled { background: rgb(250 249 246 / 86%); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); }
.header-inner { display: flex; align-items: center; gap: 32px; height: 68px; }
.wordmark { display: inline-flex; flex-shrink: 0; align-items: center; gap: 0.28em; white-space: nowrap; font-family: var(--serif); font-size: 27px; font-weight: 400; letter-spacing: -0.03em; line-height: 1; text-decoration: none; }
.brand-mark { width: 1.2em; height: 1.2em; flex-shrink: 0; }
.desktop-nav { display: flex; gap: 28px; margin-left: auto; font-size: var(--text-sm); }
.desktop-nav a { color: var(--ink-2); text-decoration: none; transition: color var(--dur-micro) ease; }
.desktop-nav a:hover { color: var(--ink); }
.nav-actions { display: flex; align-items: center; gap: 8px; }
.menu-toggle { display: none; position: relative; width: 40px; height: 40px; border: 0; border-radius: 10px; background: transparent; }
.menu-toggle span { position: absolute; left: 11px; right: 11px; height: 1.5px; background: var(--ink); border-radius: 2px; transition: transform var(--dur-ui) var(--ease-out); }
.menu-toggle span:first-child { top: 16px; }
.menu-toggle span:last-child { top: 23px; }
.menu-toggle[aria-expanded='true'] span:first-child { transform: translateY(3.5px) rotate(45deg); }
.menu-toggle[aria-expanded='true'] span:last-child { transform: translateY(-3.5px) rotate(-45deg); }
.mobile-nav { display: grid; gap: 4px; padding-bottom: 16px; }
.mobile-nav[hidden] { display: none; }
.mobile-nav a:not(.button) { padding: 12px 0; font-size: var(--text-lg); text-decoration: none; }

/* Sections */
.section { padding-block: clamp(88px, 9vw, 144px); }
.section-head { display: grid; gap: 18px; max-width: 760px; margin-bottom: clamp(40px, 5vw, 64px); }
.section-head p { font-size: var(--text-lg); color: var(--muted); max-width: 560px; }
.section-head.is-center { margin-inline: auto; text-align: center; justify-items: center; }

/* 1. Hero */
.hero { padding-top: clamp(96px, 11vw, 168px); padding-bottom: clamp(72px, 8vw, 120px); }
.hero-copy { display: grid; justify-items: center; text-align: center; gap: 24px; }
.hero-copy h1 { max-width: 20ch; }
.hero-lede { max-width: 600px; text-wrap: balance; font-size: clamp(17px, .5vw + 15px, 20px); line-height: 1.55; color: var(--muted); }
.hero-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 4px; }
.stage-wrap { margin-top: clamp(112px, 13vw, 200px); display: grid; justify-items: center; gap: 16px; }

/* 2. Pricing */
.pricing { background: var(--paper-2); }
.plan {
  display: grid; grid-template-columns: minmax(280px, 5fr) 7fr;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-xl);
  overflow: hidden;
  max-width: 1080px; margin-inline: auto;
}
.plan-main { display: flex; flex-direction: column; gap: 20px; padding: clamp(28px, 4vw, 48px); }
.plan-name { font-size: var(--text-sm); font-weight: 500; color: var(--muted); }
.plan-price { display: flex; align-items: flex-end; gap: 12px; }
.plan-price strong { font-family: var(--serif); font-weight: 340; font-size: clamp(56px, 5vw + 20px, 88px); line-height: .9; letter-spacing: -0.035em; font-variant-numeric: lining-nums; }
.plan-price > span { display: grid; gap: 2px; padding-bottom: 6px; font-size: var(--text-md); color: var(--ink-2); }
.plan-price small { font-size: var(--text-sm); color: var(--muted); }
.plan-summary { font-size: var(--text-lg); line-height: 1.45; max-width: 26ch; text-wrap: balance; }
.plan-actions { display: grid; gap: 14px; margin-top: auto; padding-top: 12px; }
.plan-note { font-size: var(--text-sm); color: var(--muted); text-align: center; }
.plan-included { padding: clamp(28px, 4vw, 48px); background: linear-gradient(180deg, var(--card), #fdfcfa); }
.plan-included-title { font-size: var(--text-sm); font-weight: 500; color: var(--muted); margin-bottom: 28px; }
.plan-weekly { padding: 22px 24px; margin-bottom: 28px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--paper-2); }
.plan-weekly h3 { font-size: 24px; line-height: 1.25; margin-bottom: 8px; }
.plan-weekly p { font-size: var(--text-sm); line-height: 1.5; color: var(--ink-2); }
.included-checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(232px, 1fr)); gap: 16px 32px; }
.included-checks li { position: relative; padding-left: 26px; font-size: 15px; line-height: 1.45; color: var(--ink-2); }
.included-checks li::before {
  content: ''; position: absolute; left: 0; top: 2.5px; width: 17px; height: 17px;
  background: no-repeat center / 17px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%233b5bdb' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m3.5 8.5 3 3 6-7'/%3E%3C/svg%3E");
}
.plan-extras { display: grid; gap: 16px; max-width: 1080px; margin: 16px auto 0; }
.plan-extras > div { display: flex; align-items: center; gap: 6px; padding: 26px 28px; border-radius: var(--radius-lg); }
.plan-extras h3 { font-size: 20px; }
.plan-extras p { font-size: 15px; color: var(--muted); }
.plan-extras .call-block { justify-content: space-between; gap: 18px; background: var(--night); color: var(--paper); }
.call-block > div { display: grid; gap: 6px; }
.call-block h3 { color: var(--paper); }
.call-block p { color: #a9a79f; }
.call-block .button { align-self: center; }

/* 3. How it works */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(20px, 2.4vw, 32px); counter-reset: step; }
.step { display: grid; align-content: start; gap: 10px; }
.step .tile { margin-bottom: 14px; }
.step-num { font-size: var(--text-xs); color: var(--faint); font-variant-numeric: tabular-nums; }
.step p { color: var(--muted); font-size: 15px; max-width: 36ch; }

/* Tiles */
.tile { position: relative; aspect-ratio: 16 / 11; border-radius: var(--radius-lg); overflow: hidden; display: grid; place-items: center; }
.tile-sand { background: var(--tile-sand); }
.tile-clay { background: var(--tile-clay); }
.tile-sage { background: var(--tile-sage); }
.tile-sky { background: var(--tile-sky); }
.tile-lilac { background: var(--tile-lilac); }
.tile-night { background: var(--night); }

/* 4. Benefits */
.benefits { padding-top: 0; }
.benefits .section-head { margin-bottom: clamp(48px, 6vw, 80px); }
.benefit-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 56px clamp(24px, 3vw, 48px); }
.benefit-grid li { display: grid; align-content: start; gap: 10px; }
.benefit-grid .num { font-size: var(--text-xs); color: var(--faint); font-variant-numeric: tabular-nums; margin-bottom: 10px; }
.benefit-grid h3 { font-size: 22px; }
.benefit-grid p { color: var(--muted); font-size: 15px; max-width: 34ch; }

/* 5. Included — the cloud lives in cloud.css */
.included { background: var(--card); }

/* 6. Studio */
.studio-inner { display: grid; grid-template-columns: 5fr 6fr; gap: clamp(32px, 6vw, 96px); align-items: center; }
.studio-tile { aspect-ratio: 1 / 1; }
.studio-copy { display: grid; gap: 20px; justify-items: start; max-width: 520px; }
.studio-copy p { font-size: var(--text-lg); color: var(--ink-2); line-height: 1.6; }
.studio-copy p + p { color: var(--muted); }

/* 7. FAQ */
.faq { background: var(--paper-2); }
.faq-inner { display: grid; grid-template-columns: 4fr 7fr; gap: clamp(32px, 6vw, 96px); align-items: start; }
.faq-intro { display: grid; gap: 16px; justify-items: start; position: sticky; top: 112px; }
.faq-intro p { color: var(--muted); font-size: var(--text-lg); }
.faq-list summary { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 22px 0; cursor: pointer; list-style: none; font-family: var(--serif); font-size: 21px; line-height: 1.3; letter-spacing: -0.005em; }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary i { position: relative; flex: none; width: 14px; height: 14px; transition: transform var(--dur-ui) var(--ease-out); }
.faq-list summary i::before, .faq-list summary i::after { content: ''; position: absolute; left: 0; right: 0; top: 50%; height: 1.5px; margin-top: -.75px; background: var(--ink); border-radius: 2px; }
.faq-list summary i::after { transform: rotate(90deg); }
.faq-list details[open] summary i { transform: rotate(45deg); }
.faq-answer p { padding: 0 48px 24px 0; color: var(--muted); max-width: 64ch; }
@supports (interpolate-size: allow-keywords) {
  .faq-list { interpolate-size: allow-keywords; }
  .faq-list details::details-content { height: 0; overflow: clip; transition: height var(--dur-ui) var(--ease-out), content-visibility var(--dur-ui) allow-discrete; }
  .faq-list details[open]::details-content { height: auto; }
}

/* 8. Closing */
.closing-inner { display: grid; justify-items: center; text-align: center; gap: 20px; }
.closing-inner > p { font-size: var(--text-lg); color: var(--muted); max-width: 520px; }
.prompt {
  width: min(100%, 680px); margin-top: 16px; text-align: left;
  background: var(--card); border: 1px solid var(--line-strong); border-radius: 20px;
  box-shadow: var(--shadow-card);
  transition: border-color var(--dur-micro) ease, box-shadow var(--dur-ui) ease;
}
.prompt:focus-within { border-color: var(--ink-2); box-shadow: 0 0 0 4px rgb(23 23 22 / 6%), var(--shadow-card); }
.prompt textarea { display: block; width: 100%; min-height: 96px; padding: 20px 22px 8px; border: 0; background: transparent; resize: none; font-size: var(--text-md); line-height: 1.55; outline: none; field-sizing: content; max-height: 240px; }
.prompt textarea::placeholder { color: var(--faint); }
.prompt-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 10px 10px 22px; }
.prompt-hint { font-size: var(--text-xs); color: var(--faint); }
.closing-call { margin-top: 8px; color: var(--ink-2); }

/* Footer */
.site-footer { background: var(--night); color: #d8d6cf; padding-block: 64px 40px; }
.footer-inner { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; align-items: start; }
.footer-brand { display: grid; gap: 12px; }
.footer-brand .wordmark { color: var(--paper); font-size: 32px; }
.footer-brand p { color: #9c9a92; font-size: var(--text-sm); max-width: 28ch; }
.footer-nav, .footer-contact { display: grid; gap: 10px; font-size: var(--text-sm); }
.footer-nav a, .footer-contact a { text-decoration: none; color: #c9c7bf; transition: color var(--dur-micro) ease; }
.footer-nav a:hover, .footer-contact a:hover { color: var(--paper); }
.footer-meta { display: grid; gap: 16px; justify-items: end; font-size: var(--text-sm); color: #8a8880; }
.footer-legal { display: flex; gap: 16px; }
.footer-legal a { color: inherit; }
.footer-legal a:hover { color: var(--paper); }
.language-switch { position: relative; }
.language-switch summary { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border: 1px solid #3a3a37; border-radius: 10px; cursor: pointer; list-style: none; color: #d8d6cf; }
.language-switch summary::-webkit-details-marker { display: none; }
.language-chevron { width: 7px; height: 7px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: translateY(-2px) rotate(45deg); transition: transform var(--dur-ui) var(--ease-out); }
.language-switch[open] .language-chevron { transform: translateY(1px) rotate(-135deg); }
.language-dropdown { position: absolute; right: 0; bottom: calc(100% + 8px); display: grid; min-width: 140px; padding: 6px; background: #262624; border: 1px solid #3a3a37; border-radius: 12px; box-shadow: 0 16px 40px rgb(0 0 0 / 35%); }
.language-dropdown button { padding: 8px 10px; border: 0; border-radius: 8px; background: transparent; color: #d8d6cf; text-align: left; }
.language-dropdown button:hover { background: #33332f; }
.language-dropdown button[aria-pressed='true'] { color: var(--paper); font-weight: 500; }

/* Dialogs */
dialog { border: 0; padding: 0; background: transparent; color: var(--ink); max-width: calc(100vw - 32px); }
dialog::backdrop { background: rgb(23 23 22 / 40%); backdrop-filter: blur(4px); }
dialog[open] { animation: dialog-in var(--dur-ui) var(--ease-out); }
@keyframes dialog-in { from { opacity: 0; transform: translateY(12px) scale(.97); } }
.booking-close { position: absolute; top: 14px; right: 14px; display: grid; place-items: center; width: 36px; height: 36px; border: 0; border-radius: 10px; background: transparent; }
.booking-close:hover { background: var(--paper-2); }
.booking-close svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; }
.booking-dialog { width: min(1000px, calc(100vw - 32px)); height: min(760px, calc(100dvh - 32px)); background: var(--card); border-radius: var(--radius-lg); overflow: hidden; }
.booking-dialog[open] { display: grid; grid-template-rows: auto 1fr auto; }
.booking-header { position: relative; padding: 18px 64px 18px 24px; }
.booking-header h2 { font-size: 24px; }
.booking-close { top: 12px; }
.booking-frame { width: 100%; height: 100%; border: 0; }
.booking-fallback { padding: 10px 24px; font-size: var(--text-sm); text-align: right; }

/* Reveal system — only when JS is available */
.js [data-reveal] { opacity: 0; transform: translateY(18px); transition: opacity var(--dur-reveal) var(--ease-out), transform var(--dur-reveal) var(--ease-out); transition-delay: calc(var(--i, 0) * 90ms); }
.js [data-reveal].is-in { opacity: 1; transform: none; }
.split-word { display: inline-block; white-space: pre; }
.js [data-split] .split-word { opacity: 0; transform: translateY(.28em); filter: blur(8px); transition: opacity 800ms var(--ease-out), transform 800ms var(--ease-out), filter 800ms var(--ease-out); transition-delay: calc(var(--w) * 55ms); }
.js [data-split].is-in .split-word { opacity: 1; transform: none; filter: none; }

/* Responsive */
@media (max-width: 1080px) {
  .desktop-nav { display: none; }
  .nav-actions { margin-left: auto; }
  .menu-toggle { display: block; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .footer-meta { justify-items: start; }
}
@media (min-width: 1081px) { .mobile-nav { display: none !important; } }
@media (max-width: 900px) {
  .plan { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; gap: 48px; }
  .step .tile { max-width: 560px; }
  .benefit-grid { grid-template-columns: 1fr 1fr; }
  .studio-inner { grid-template-columns: 1fr; }
  .studio-tile { aspect-ratio: 16 / 11; }
  .faq-inner { grid-template-columns: 1fr; }
  .faq-intro { position: static; }
}
@media (max-width: 640px) {
  :root { --gutter: 16px; }
  /* The desktop line break leaves orphans at this width; let balance place the lines. */
  .hero-copy h1 br { display: none; }
  .header-inner { gap: 12px; height: 60px; }
  .nav-actions .button-outline { display: none; }
  .hero-actions { display: grid; width: 100%; }
  .hero-actions .button { width: 100%; }
  .plan-extras .call-block { flex-direction: column; align-items: stretch; }
  .call-block .button { align-self: stretch; min-height: 44px; }
  .benefit-grid { grid-template-columns: 1fr; gap: 36px; }
  .faq-list summary { font-size: 19px; }
  .faq-answer p { padding-right: 0; }
  .footer-inner { grid-template-columns: 1fr; }
}

@media (max-width: 360px) {
  .header-inner { gap: 8px; }
  .site-header .wordmark { font-size: 22px; }
  .nav-actions { gap: 4px; }
  .nav-actions [data-book-demo] { padding-inline: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js [data-reveal], .js [data-split] .split-word { opacity: 1; transform: none; filter: none; transition: none; }
  *, *::before, *::after { transition-duration: 1ms !important; animation-duration: 1ms !important; animation-iteration-count: 1 !important; }
}
