/* ==========================================================================
   Foundryline — stylesheet
   Tokens mirror brand.json. If you change a token here, change it there too.

   Sections
     1. tokens          6.  cards and prices
     2. base            7.  process, tables, samples
     3. animation       8.  faq, forms
     4. header + lang   9.  cta, footer, utilities
     5. hero           10.  portal (login, register, dashboard)
     6. blocks         11.  motion preferences
   ========================================================================== */

/* ============================ 1. TOKENS ================================= */

:root {
  --ink: #111114;
  --ink-soft: #2b2b31;
  --paper: #f5f0e8;
  --paper-2: #ede6da;
  --paper-3: #fffdf8;
  --accent: #c6472b;
  --accent-dark: #a23a22;
  --accent-soft: rgba(198, 71, 43, 0.09);
  --gold: #d9a441;
  --green: #2f6b4f;
  --green-soft: rgba(47, 107, 79, 0.12);
  --muted: #6e6a63;
  --line: #d8d0c2;
  --line-soft: #e6dfd2;

  --display: "Bricolage Grotesque", "Space Grotesk", system-ui, sans-serif;
  --body: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, monospace;

  --wrap: 1180px;
  --radius: 12px;
  --radius-lg: 18px;
  --shadow-sm: 0 1px 2px rgba(17, 17, 20, 0.05);
  --shadow: 0 2px 4px rgba(17, 17, 20, 0.04), 0 14px 40px -22px rgba(17, 17, 20, 0.35);
  --shadow-lg: 0 4px 8px rgba(17, 17, 20, 0.05), 0 32px 64px -32px rgba(17, 17, 20, 0.45);

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --fast: 0.16s;
  --mid: 0.32s;
  --slow: 0.6s;

  --header-h: 68px;
}

/* ============================ 2. BASE =================================== */

*,
*::before,
*::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.62;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* faint paper grain so it does not look like every other flat site */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.42;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='0.055'/%3E%3C/svg%3E");
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin: 0 0 0.5em;
  text-wrap: balance;
}
h1 { font-size: clamp(2.35rem, 6vw, 4.15rem); letter-spacing: -0.04em; }
h2 { font-size: clamp(1.8rem, 4.2vw, 2.85rem); }
h3 { font-size: 1.26rem; letter-spacing: -0.02em; }
p { margin: 0 0 1.1em; }
a { color: inherit; }

.lede {
  font-size: clamp(1.05rem, 1.9vw, 1.26rem);
  color: var(--ink-soft);
  max-width: 64ch;
  line-height: 1.55;
}
.muted { color: var(--muted); }
.small { font-size: 0.875rem; }
.tiny { font-size: 0.8rem; }
.tight { max-width: 62ch; }
.ok { color: var(--green); }
.warn { color: var(--accent); }

.mono {
  font-family: var(--mono);
  font-size: 0.76rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}
.eyebrow::before {
  content: "";
  width: 22px;
  height: 1px;
  background: currentColor;
  display: block;
}

::selection { background: var(--accent); color: #fff; }

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

/* ============================ 3. ANIMATION ============================== */

@keyframes fade-up {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: none; }
}
@keyframes fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes scale-in {
  from { opacity: 0; transform: scale(0.96); }
  to   { opacity: 1; transform: none; }
}
@keyframes slide-down {
  from { opacity: 0; transform: translateY(-10px); }
  to   { opacity: 1; transform: none; }
}
@keyframes pulse-ring {
  0%   { box-shadow: 0 0 0 0 rgba(47, 107, 79, 0.4); }
  70%  { box-shadow: 0 0 0 9px rgba(47, 107, 79, 0); }
  100% { box-shadow: 0 0 0 0 rgba(47, 107, 79, 0); }
}
@keyframes shimmer {
  0%   { background-position: -420px 0; }
  100% { background-position: 420px 0; }
}
@keyframes float-y {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-9px); }
}
@keyframes grow-bar {
  from { transform: scaleY(0.08); }
  to   { transform: scaleY(1); }
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Page load: the page itself fades in, so navigation never feels like a jump */
body { animation: fade-in 0.32s var(--ease-out) both; }

/* Scroll reveal. .reveal is set by JS; without JS everything is simply visible */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity var(--slow) var(--ease-out), transform var(--slow) var(--ease-out);
  will-change: opacity, transform;
}
.reveal.in { opacity: 1; transform: none; }

/* stagger children */
.stagger > * { opacity: 0; transform: translateY(18px); }
.stagger.in > * {
  animation: fade-up 0.6s var(--ease-out) both;
}
.stagger.in > *:nth-child(1) { animation-delay: 0.02s; }
.stagger.in > *:nth-child(2) { animation-delay: 0.10s; }
.stagger.in > *:nth-child(3) { animation-delay: 0.18s; }
.stagger.in > *:nth-child(4) { animation-delay: 0.26s; }
.stagger.in > *:nth-child(5) { animation-delay: 0.34s; }
.stagger.in > *:nth-child(6) { animation-delay: 0.42s; }
.stagger.in > *:nth-child(7) { animation-delay: 0.50s; }
.stagger.in > *:nth-child(8) { animation-delay: 0.58s; }

/* ---------- reading progress, a quiet line under the header ---------- */
.scroll-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  width: 0;
  background: linear-gradient(90deg, var(--accent), var(--gold));
  z-index: 70;
  transition: width 0.08s linear;
  pointer-events: none;
}

/* ---------- inner-page header band ---------- */
.page-head {
  padding: 54px 0 12px;
  position: relative;
}
.page-head::before {
  content: "";
  position: absolute;
  inset: -60% -10% auto -10%;
  height: 220%;
  background: radial-gradient(38% 60% at 22% 40%, rgba(198, 71, 43, 0.11), transparent 70%),
              radial-gradient(32% 50% at 78% 20%, rgba(217, 164, 65, 0.14), transparent 72%);
  filter: blur(24px);
  pointer-events: none;
  z-index: 0;
}
.page-head .wrap { position: relative; z-index: 1; }

/* ============================ 4. HEADER ================================= */

.site-head {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(245, 240, 232, 0.82);
  backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--mid) var(--ease),
              background var(--mid) var(--ease),
              box-shadow var(--mid) var(--ease);
}
.site-head.stuck {
  border-bottom-color: var(--line);
  background: rgba(245, 240, 232, 0.95);
  box-shadow: 0 10px 30px -24px rgba(17, 17, 20, 0.5);
}
.site-head .wrap {
  display: flex;
  align-items: center;
  gap: 16px;
  height: var(--header-h);
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.2rem;
  letter-spacing: -0.035em;
  transition: opacity var(--fast) var(--ease);
}
.brand:hover { opacity: 0.78; }
.brand svg { width: 30px; height: 30px; flex: none; transition: transform var(--mid) var(--ease-out); }
.brand:hover svg { transform: rotate(-6deg) scale(1.06); }
.brand em { font-style: normal; color: var(--accent); }

.nav { margin-left: auto; display: flex; align-items: center; gap: 4px; }

.nav a.navlink {
  position: relative;
  text-decoration: none;
  font-size: 0.94rem;
  color: var(--ink-soft);
  padding: 8px 11px;
  border-radius: 7px;
  transition: color var(--fast) var(--ease), background var(--fast) var(--ease);
}
.nav a.navlink::after {
  content: "";
  position: absolute;
  left: 11px;
  right: 11px;
  bottom: 3px;
  height: 1.5px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--mid) var(--ease-out);
}
.nav a.navlink:hover { color: var(--ink); background: rgba(17, 17, 20, 0.04); }
.nav a.navlink:hover::after { transform: scaleX(1); }
.nav a.navlink[aria-current="page"] { color: var(--ink); font-weight: 600; }
.nav a.navlink[aria-current="page"]::after { transform: scaleX(1); }

/* ---------- language dropdown, top right ---------- */
.lang {
  position: relative;
  margin-left: 8px;
  flex: none;
}
.lang-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--line);
  background: var(--paper-3);
  border-radius: 999px;
  padding: 7px 11px 7px 12px;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
  cursor: pointer;
  transition: border-color var(--fast) var(--ease),
              background var(--fast) var(--ease),
              transform var(--fast) var(--ease-out);
}
.lang-btn:hover { border-color: #bfb4a1; background: #fff; transform: translateY(-1px); }
.lang-btn svg { width: 14px; height: 14px; flex: none; opacity: 0.7; }
.lang-btn .chev {
  width: 9px; height: 9px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  transition: transform var(--mid) var(--ease-out);
  margin-left: 1px;
  opacity: 0.65;
}
.lang.open .lang-btn { border-color: var(--ink); background: #fff; }
.lang.open .chev { transform: rotate(-135deg) translateY(-1px); }

.lang-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 190px;
  background: var(--paper-3);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  padding: 6px;
  z-index: 80;
  display: block;
  animation: lang-in 0.2s var(--ease-out) both;
}
.lang:not(.open) .lang-menu { display: none; }
@keyframes lang-in {
  from { opacity: 0; transform: translateY(-7px) scale(0.98); }
  to   { opacity: 1; transform: none; }
}
.lang-menu a {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 11px;
  border-radius: 8px;
  text-decoration: none;
  color: var(--ink-soft);
  font-size: 0.9rem;
  transition: background var(--fast) var(--ease), color var(--fast) var(--ease);
}
.lang-menu a:hover { background: var(--paper-2); color: var(--ink); }
.lang-menu a[aria-current="true"] { color: var(--ink); font-weight: 600; background: var(--accent-soft); }
.lang-menu .code {
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.1em;
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 3px 6px;
  min-width: 32px;
  text-align: center;
  flex: none;
  color: var(--muted);
}
.lang-menu a[aria-current="true"] .code { border-color: var(--accent); color: var(--accent); }
.lang-menu .native { margin-left: auto; font-size: 0.76rem; color: var(--muted); }
.lang-menu .tick { color: var(--accent); font-weight: 700; margin-left: auto; }
.lang-note {
  display: block;
  font-size: 0.71rem;
  color: var(--muted);
  padding: 8px 11px 5px;
  border-top: 1px solid var(--line-soft);
  margin-top: 4px;
  line-height: 1.45;
}

.nav-toggle {
  display: none;
  margin-left: auto;
  align-items: center;
  gap: 8px;
  background: var(--paper-3);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 12px;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background var(--fast) var(--ease);
}
.nav-toggle:hover { background: var(--paper-2); }
.nav-toggle i {
  display: block;
  width: 14px;
  height: 10px;
  position: relative;
}
.nav-toggle i::before,
.nav-toggle i::after {
  content: "";
  position: absolute;
  left: 0;
  width: 100%;
  height: 1.5px;
  background: var(--ink);
  transition: transform var(--mid) var(--ease-out), top var(--mid) var(--ease-out);
}
.nav-toggle i::before { top: 2px; }
.nav-toggle i::after { top: 7px; }
.nav-toggle[aria-expanded="true"] i::before { top: 5px; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] i::after { top: 5px; transform: rotate(-45deg); }

/* ============================ 5. HERO =================================== */

.hero { padding: 66px 0 58px; position: relative; overflow: hidden; }

/* a soft warm mesh behind the hero, so the page has depth instead of being flat */
.hero::before {
  content: "";
  position: absolute;
  inset: -40% -20% auto -20%;
  height: 150%;
  background:
    radial-gradient(46% 54% at 18% 26%, rgba(198, 71, 43, 0.16), transparent 68%),
    radial-gradient(40% 46% at 82% 12%, rgba(217, 164, 65, 0.20), transparent 70%),
    radial-gradient(52% 48% at 62% 84%, rgba(47, 107, 79, 0.10), transparent 72%);
  filter: blur(26px);
  pointer-events: none;
  z-index: 0;
  animation: mesh-drift 22s ease-in-out infinite alternate;
}
@keyframes mesh-drift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to   { transform: translate3d(-2.5%, 1.6%, 0) scale(1.06); }
}
.hero .wrap { z-index: 1; }

.hero-grid {
  display: grid;
  grid-template-columns: 1.28fr 1fr;
  gap: 52px;
  align-items: center;
}
@media (max-width: 940px) { .hero-grid { grid-template-columns: 1fr; gap: 40px; } }

.hero h1 { animation: fade-up 0.7s var(--ease-out) both; }
.hero .lede { animation: fade-up 0.7s 0.1s var(--ease-out) both; }
.hero .btn-row { animation: fade-up 0.7s 0.2s var(--ease-out) both; }
.hero .avail { animation: fade-up 0.6s var(--ease-out) both; }

/* the marked word inside a headline — a highlighter stroke, not a colour change */
.hl {
  position: relative;
  white-space: nowrap;
}
.hl::after {
  content: "";
  position: absolute;
  left: -2px;
  right: -2px;
  bottom: 0.08em;
  height: 0.36em;
  background: linear-gradient(90deg, rgba(217, 164, 65, 0.62), rgba(198, 71, 43, 0.42));
  border-radius: 3px;
  z-index: -1;
  animation: hl-in 0.85s 0.35s var(--ease-out) both;
}
@keyframes hl-in {
  from { transform: scaleX(0); transform-origin: left; }
  to   { transform: scaleX(1); transform-origin: left; }
}

.avail {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--green);
  background: var(--green-soft);
  padding: 6px 13px;
  border-radius: 999px;
  margin-bottom: 22px;
}
.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  animation: pulse-ring 2.4s infinite;
}

/* price ticker under the hero, so the number is never hidden */
.price-line {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px;
  margin-top: 20px;
  font-size: 0.9rem;
  color: var(--muted);
}
.price-line b {
  font-family: var(--display);
  font-size: 1.5rem;
  letter-spacing: -0.03em;
  color: var(--ink);
}

/* browser mock, replaces the old phone skeleton */
.mock {
  background: var(--paper-3);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  animation: scale-in 0.8s 0.15s var(--ease-out) both;
  transition: transform var(--slow) var(--ease-out), box-shadow var(--slow) var(--ease);
}
.mock:hover { transform: translateY(-4px); box-shadow: 0 8px 16px rgba(17,17,20,.06), 0 44px 80px -38px rgba(17,17,20,.5); }
.mock-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 11px 14px;
  border-bottom: 1px solid var(--line-soft);
  background: var(--paper-2);
}
.mock-bar span {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--line);
  display: block;
}
.mock-bar span:first-child { background: #e0a099; }
.mock-bar .url {
  width: auto; height: auto; border-radius: 5px;
  background: var(--paper-3);
  font-family: var(--mono);
  font-size: 0.63rem;
  color: var(--muted);
  padding: 3px 9px;
  margin-left: 6px;
  flex: 1;
  text-align: center;
  letter-spacing: 0.04em;
}
.mock-body { padding: 18px; }
.sk { background: linear-gradient(90deg, #e4dbcb 25%, #efe8da 50%, #e4dbcb 75%); background-size: 420px 100%; border-radius: 5px; animation: shimmer 1.6s infinite linear; }
.sk-hero { height: 92px; margin-bottom: 12px; }
.sk-row { display: flex; gap: 10px; margin-bottom: 12px; }
.sk-row .sk { flex: 1; height: 54px; }
.sk-line { height: 9px; margin-bottom: 7px; }
.sk-line.w70 { width: 70%; }
.sk-line.w45 { width: 45%; }
.sk-btn { height: 30px; width: 118px; background: var(--ink); border-radius: 6px; }
.mock-cap {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 14px;
  text-align: center;
}
.mock-float { animation: float-y 6s ease-in-out infinite; }

/* ============================ 6. BLOCKS ================================= */

section { padding: 76px 0; position: relative; }
section.pad-sm { padding: 46px 0; }
section.dark { background: var(--ink); color: var(--paper); }
section.dark .muted, section.dark .mono { color: #9a938a; }
section.dark .lede { color: #d6cfc4; }
section.alt { background: var(--paper-2); border-block: 1px solid var(--line); }
hr.rule { border: 0; border-top: 1px solid var(--line); margin: 0; }

.grid { display: grid; gap: 20px; }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid.gap-lg { gap: 30px; }
@media (max-width: 980px) { .grid.three, .grid.four { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .grid.two, .grid.three, .grid.four { grid-template-columns: 1fr; } }

/* stats with animated counters */
.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.stat { background: var(--paper); padding: 22px 20px; transition: background var(--fast) var(--ease); }
.stat:hover { background: var(--paper-3); }
.stat b {
  display: block;
  font-family: var(--display);
  font-size: 2rem;
  letter-spacing: -0.045em;
  line-height: 1;
  margin-bottom: 7px;
  font-variant-numeric: tabular-nums;
}
.stat span { font-size: 0.83rem; color: var(--muted); line-height: 1.45; display: block; }
@media (max-width: 780px) { .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ============================ 7. CARDS + PRICES ========================= */

.card {
  background: var(--paper-3);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
  transition: transform var(--mid) var(--ease-out),
              box-shadow var(--mid) var(--ease),
              border-color var(--mid) var(--ease);
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  border-color: #c9bfae;
}
.card.flat { background: transparent; }
.card.flat:hover { transform: none; box-shadow: none; }
.card h3 { margin-bottom: 8px; }
.card .num {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.13em;
  color: var(--accent);
  display: block;
  margin-bottom: 12px;
}
section.dark .card { background: #1a1a1f; border-color: #2c2c33; }
section.dark .card:hover { border-color: #3a3a42; }

.prices {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  align-items: stretch;
}
@media (max-width: 1120px) { .prices { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .prices { grid-template-columns: 1fr; } }

.price-card {
  background: var(--paper-3);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 26px 24px 24px;
  display: flex;
  flex-direction: column;
  height: 100%;
  position: relative;
  transition: transform var(--mid) var(--ease-out),
              box-shadow var(--mid) var(--ease),
              border-color var(--mid) var(--ease);
}
.price-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: #c4b9a6;
}
.price-card.popular { border-color: var(--ink); border-width: 2px; box-shadow: var(--shadow); }
.price-card.popular:hover { border-color: var(--accent); }

.tag {
  position: absolute;
  top: -11px;
  left: 22px;
  background: var(--accent);
  color: #fff;
  font-family: var(--mono);
  font-size: 0.64rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  padding: 5px 10px;
  border-radius: 4px;
  box-shadow: 0 4px 12px -6px rgba(198, 71, 43, 0.9);
}
.price-card h3 { font-size: 1.14rem; margin-bottom: 4px; }
.price {
  font-family: var(--display);
  font-size: 2.45rem;
  letter-spacing: -0.05em;
  line-height: 1;
  margin: 16px 0 4px;
  font-variant-numeric: tabular-nums;
}
.price .cur { font-size: 1.35rem; vertical-align: super; letter-spacing: 0; color: var(--muted); }
.price-alt {
  font-family: var(--mono);
  font-size: 0.76rem;
  color: var(--muted);
  letter-spacing: 0.04em;
  margin-bottom: 2px;
}
.best-for {
  font-size: 0.89rem;
  color: var(--ink-soft);
  min-height: 3.6em;
  margin: 10px 0 16px;
  line-height: 1.5;
}
.ticks { list-style: none; padding: 0; margin: 0 0 18px; font-size: 0.905rem; }
.ticks li { padding-left: 25px; position: relative; margin-bottom: 9px; line-height: 1.5; }
.ticks li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 7px;
  width: 9px;
  height: 9px;
  border-radius: 3px;
  background: var(--accent);
}
.ticks.no li::before { background: var(--line); }
.ticks.no li { color: var(--muted); }
.price-foot { margin-top: auto; padding-top: 18px; border-top: 1px solid var(--line-soft); }
.eta {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 12px;
}

/* ============================ 8. BUTTONS ================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 9px;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  font-family: var(--body);
  font-weight: 600;
  font-size: 0.94rem;
  text-decoration: none;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: transform var(--fast) var(--ease-out),
              background var(--fast) var(--ease),
              border-color var(--fast) var(--ease),
              box-shadow var(--fast) var(--ease);
}
.btn::after {
  content: "";
  position: absolute;
  inset: 0;
  background: currentColor;
  opacity: 0;
  transition: opacity var(--fast) var(--ease);
}
.btn > * { position: relative; z-index: 1; }
.btn:hover { transform: translateY(-2px); box-shadow: 0 10px 22px -12px rgba(17, 17, 20, 0.7); }
.btn:active { transform: translateY(0); }
.btn:hover { background: var(--accent); border-color: var(--accent); }
.btn.ghost { background: transparent; color: var(--ink); }
.btn.ghost:hover { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.btn.accent { background: var(--accent); border-color: var(--accent); }
.btn.accent:hover { background: var(--accent-dark); border-color: var(--accent-dark); }
.btn.big { padding: 15px 27px; font-size: 1rem; border-radius: 10px; }
.btn.full { width: 100%; }
.btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none; box-shadow: none; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

/* ============================ 9. PROCESS + TABLE ======================== */

.steps { counter-reset: s; display: grid; gap: 28px; }
.step { display: grid; grid-template-columns: 56px 1fr; gap: 20px; align-items: start; }
.step::before {
  counter-increment: s;
  content: "0" counter(s);
  font-family: var(--mono);
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  color: var(--accent);
  padding-top: 6px;
  border-top: 2px solid var(--ink);
}
.step h3 { margin-bottom: 5px; }

table { width: 100%; border-collapse: collapse; font-size: 0.93rem; }
th, td { text-align: left; padding: 13px 14px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
th {
  font-family: var(--mono);
  font-size: 0.69rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 400;
}
tbody tr { transition: background var(--fast) var(--ease); }
tbody tr:hover { background: var(--paper-3); }
td.n { font-family: var(--mono); white-space: nowrap; }
.table-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper-3); }
.table-scroll table { min-width: 580px; }
.table-scroll tr:last-child td { border-bottom: 0; }

/* ============================ 10. TEMPLATE SHOWCASE ===================== */

.tpl-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
}
.tpl-tab {
  font-family: var(--mono);
  font-size: 0.71rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 9px 15px;
  border: 1px solid var(--line);
  background: var(--paper-3);
  border-radius: 999px;
  cursor: pointer;
  color: var(--muted);
  transition: all var(--fast) var(--ease);
}
.tpl-tab:hover { border-color: var(--ink); color: var(--ink); transform: translateY(-1px); }
.tpl-tab[aria-selected="true"] { background: var(--ink); border-color: var(--ink); color: var(--paper); }

.tpl-panel { display: none; }
.tpl-panel.on { display: block; animation: fade-up 0.45s var(--ease-out) both; }

.tpl-frame {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--paper-3);
  box-shadow: var(--shadow);
}
.tpl-frame .bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: var(--paper-2);
  border-bottom: 1px solid var(--line-soft);
}
.tpl-frame .bar i { width: 9px; height: 9px; border-radius: 50%; background: var(--line); display: block; }
.tpl-frame .bar .u {
  flex: 1;
  font-family: var(--mono);
  font-size: 0.64rem;
  color: var(--muted);
  background: var(--paper-3);
  border-radius: 5px;
  padding: 3px 10px;
  text-align: center;
}
.tpl-frame .bar a {
  font-family: var(--mono);
  font-size: 0.64rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--accent);
  border: 1px solid var(--accent);
  padding: 3px 9px;
  border-radius: 5px;
  transition: all var(--fast) var(--ease);
}
.tpl-frame .bar a:hover { background: var(--accent); color: #fff; }
.tpl-frame iframe {
  width: 100%;
  height: 560px;
  border: 0;
  display: block;
  background: #fff;
}
@media (max-width: 700px) { .tpl-frame iframe { height: 400px; } }

.tpl-swatch { display: flex; gap: 7px; margin: 14px 0 0; }
.tpl-swatch i {
  width: 26px; height: 26px; border-radius: 7px; display: block;
  border: 1px solid rgba(17, 17, 20, 0.12);
  transition: transform var(--fast) var(--ease-out);
}
.tpl-swatch i:hover { transform: scale(1.14) translateY(-2px); }

.tpl-meta { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin-top: 20px; }
@media (max-width: 640px) { .tpl-meta { grid-template-columns: 1fr; } }
.tpl-meta dl { margin: 0; }
.tpl-meta dt {
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 4px;
}
.tpl-meta dd { margin: 0 0 12px; font-size: 0.92rem; }

.tpl-note {
  background: var(--accent-soft);
  border-left: 3px solid var(--accent);
  padding: 14px 16px;
  border-radius: 6px;
  font-size: 0.9rem;
  margin-top: 20px;
}

/* ============================ 11. QUOTES + FAQ ========================== */

.quote {
  background: var(--paper-3);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: 8px;
  padding: 22px 24px;
  transition: transform var(--mid) var(--ease-out), box-shadow var(--mid) var(--ease);
}
.quote:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.quote p { font-size: 1rem; margin-bottom: 14px; }
.who { display: flex; align-items: center; gap: 11px; font-size: 0.85rem; }
.avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--ink); color: var(--paper);
  display: grid; place-items: center;
  font-family: var(--display); font-weight: 700; font-size: 0.84rem;
  flex: none;
}
.who b { display: block; font-weight: 600; }
.who small { color: var(--muted); }

details {
  border-bottom: 1px solid var(--line);
  transition: background var(--fast) var(--ease);
}
details summary {
  cursor: pointer;
  padding: 18px 44px 18px 0;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.06rem;
  letter-spacing: -0.02em;
  position: relative;
  list-style: none;
  transition: color var(--fast) var(--ease);
}
details summary::-webkit-details-marker { display: none; }
details summary:hover { color: var(--accent); }
details summary::after {
  content: "";
  position: absolute;
  right: 10px;
  top: 50%;
  width: 11px;
  height: 11px;
  margin-top: -5px;
  border-right: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  transform: rotate(45deg);
  transition: transform var(--mid) var(--ease-out);
}
details[open] summary::after { transform: rotate(-135deg); margin-top: -1px; }
details .ans {
  padding: 0 0 20px;
  max-width: 74ch;
  color: var(--ink-soft);
  animation: slide-down 0.3s var(--ease-out) both;
}
details .ans p:last-child { margin-bottom: 0; }

/* ============================ 12. FORMS ================================= */

form { display: grid; gap: 16px; }
label {
  display: block;
  font-family: var(--mono);
  font-size: 0.69rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 7px;
}
input, select, textarea {
  width: 100%;
  padding: 13px 14px;
  font-family: var(--body);
  font-size: 1rem;
  background: var(--paper-3);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  transition: border-color var(--fast) var(--ease),
              box-shadow var(--fast) var(--ease),
              background var(--fast) var(--ease);
}
input:hover, select:hover, textarea:hover { border-color: #c4b9a6; }
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
  background: #fff;
}
input::placeholder, textarea::placeholder { color: #a9a29a; }
textarea { min-height: 130px; resize: vertical; }
.field-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 640px) { .field-2 { grid-template-columns: 1fr; } }

.note {
  background: var(--paper-2);
  border-left: 3px solid var(--gold);
  padding: 14px 16px;
  border-radius: 6px;
  font-size: 0.9rem;
}
.note.warn-note { border-left-color: var(--accent); background: var(--accent-soft); }
.note.ok-note { border-left-color: var(--green); background: var(--green-soft); }

.field-error {
  color: var(--accent);
  font-size: 0.82rem;
  margin-top: 5px;
  display: none;
}
.field-error.on { display: block; animation: slide-down 0.2s var(--ease-out) both; }
input.bad, select.bad { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

/* ============================ 13. CTA + FOOTER ========================== */

.cta-band {
  background: var(--ink);
  color: var(--paper);
  border-radius: var(--radius-lg);
  padding: 46px;
  position: relative;
  overflow: hidden;
}
.cta-band::after {
  content: "";
  position: absolute;
  right: -120px;
  top: -120px;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(198, 71, 43, 0.36), transparent 68%);
  pointer-events: none;
}
@media (max-width: 640px) { .cta-band { padding: 28px 22px; } }
.cta-band h2 { max-width: 24ch; position: relative; }
.offer {
  display: flex;
  flex-wrap: wrap;
  gap: 26px;
  align-items: center;
  justify-content: space-between;
  position: relative;
  z-index: 1;
}
.badge {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border: 1px dashed var(--gold);
  color: var(--gold);
  padding: 6px 12px;
  border-radius: 6px;
}

footer.site-foot { background: var(--ink); color: #b8b1a6; padding: 58px 0 30px; margin-top: 74px; }
footer.site-foot a { color: #e8e2d8; text-decoration: none; transition: color var(--fast) var(--ease); }
footer.site-foot a:hover { color: var(--accent); }
.foot-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 32px; }
@media (max-width: 860px) { .foot-grid { grid-template-columns: 1fr 1fr; gap: 28px; } }
@media (max-width: 540px) { .foot-grid { grid-template-columns: 1fr; } }
.foot-grid h4 {
  font-family: var(--mono);
  font-size: 0.69rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: #7e776d;
  font-weight: 400;
  margin-bottom: 14px;
}
.foot-grid ul { list-style: none; padding: 0; margin: 0; }
.foot-grid li { margin-bottom: 9px; font-size: 0.91rem; }
.foot-bottom {
  border-top: 1px solid #2c2c33;
  margin-top: 42px;
  padding-top: 22px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  font-size: 0.81rem;
}

/* ============================ 14. PORTAL ================================ */

.portal-shell {
  min-height: calc(100vh - var(--header-h) - 80px);
  display: grid;
  place-items: center;
  padding: 56px 0;
}
.auth-card {
  width: 100%;
  max-width: 452px;
  background: var(--paper-3);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 34px;
  animation: scale-in 0.45s var(--ease-out) both;
}
@media (max-width: 520px) { .auth-card { padding: 24px; } }
.auth-card h1 { font-size: 1.8rem; margin-bottom: 6px; }

.auth-switch {
  display: flex;
  background: var(--paper-2);
  border-radius: 10px;
  padding: 4px;
  margin-bottom: 24px;
}
.auth-switch button {
  flex: 1;
  border: 0;
  background: transparent;
  font-family: var(--body);
  font-size: 0.9rem;
  font-weight: 600;
  padding: 9px;
  border-radius: 7px;
  cursor: pointer;
  color: var(--muted);
  transition: all var(--fast) var(--ease);
}
.auth-switch button[aria-selected="true"] {
  background: var(--paper-3);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}

.auth-form { display: none; }
.auth-form.on { display: grid; gap: 16px; animation: fade-up 0.35s var(--ease-out) both; }

.demo-flag {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  background: var(--accent-soft);
  border: 1px solid rgba(198, 71, 43, 0.28);
  border-radius: 8px;
  padding: 12px 14px;
  font-size: 0.83rem;
  color: var(--ink-soft);
  margin-bottom: 22px;
  line-height: 1.5;
}
.demo-flag b { color: var(--accent); }

/* dashboard */
.dash-head {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 28px;
}
.dash-hello { font-family: var(--display); font-size: 1.7rem; letter-spacing: -0.03em; margin: 0; }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 5px 11px;
  border-radius: 999px;
  background: var(--paper-2);
  color: var(--muted);
}
.pill.live { background: var(--green-soft); color: var(--green); }
.pill.warn { background: var(--accent-soft); color: var(--accent); }

.progress-track {
  height: 7px;
  background: var(--paper-2);
  border-radius: 999px;
  overflow: hidden;
  margin: 10px 0 6px;
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--gold));
  border-radius: 999px;
  width: 0;
  transition: width 1.1s var(--ease-out);
}

.dash-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 24px; align-items: start; }
@media (max-width: 940px) { .dash-grid { grid-template-columns: 1fr; } }

.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li {
  display: grid;
  grid-template-columns: 26px 1fr;
  gap: 14px;
  padding-bottom: 20px;
  position: relative;
}
.timeline li::before {
  content: "";
  position: absolute;
  left: 12px;
  top: 24px;
  bottom: 0;
  width: 1px;
  background: var(--line);
}
.timeline li:last-child::before { display: none; }
.timeline .mark {
  width: 25px; height: 25px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--paper-3);
  display: grid;
  place-items: center;
  font-size: 0.7rem;
  color: var(--muted);
  z-index: 1;
  transition: all var(--mid) var(--ease);
}
.timeline li.done .mark { background: var(--green); border-color: var(--green); color: #fff; }
.timeline li.now .mark { background: var(--accent); border-color: var(--accent); color: #fff; }
.timeline li.now .mark { animation: pulse-ring 2.2s infinite; }
.timeline h4 { margin: 2px 0 3px; font-size: 0.98rem; font-family: var(--body); font-weight: 600; letter-spacing: 0; }
.timeline p { margin: 0; font-size: 0.86rem; color: var(--muted); }

.invoice-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line-soft);
  font-size: 0.9rem;
}
.invoice-row:last-child { border-bottom: 0; }
.invoice-row .amt { font-family: var(--mono); font-weight: 500; }

.activity { list-style: none; padding: 0; margin: 0; font-size: 0.87rem; }
.activity li {
  padding: 10px 0;
  border-bottom: 1px solid var(--line-soft);
  display: flex;
  gap: 10px;
  align-items: baseline;
  color: var(--ink-soft);
}
.activity li:last-child { border-bottom: 0; }
.activity time {
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--muted);
  flex: none;
  letter-spacing: 0.04em;
}

/* ============================ 15. UTILITIES ============================= */

.center { text-align: center; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.mt-2 { margin-top: 18px; }
.mt-3 { margin-top: 32px; }
.mt-4 { margin-top: 48px; }
.sr {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.skip-link {
  position: absolute;
  left: -9999px;
  top: 8px;
  background: var(--ink);
  color: var(--paper);
  padding: 10px 16px;
  border-radius: 7px;
  z-index: 100;
}
.skip-link:focus { left: 12px; }

/* ============================ 16. MOTION ================================ */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .reveal, .stagger > * { opacity: 1 !important; transform: none !important; }
  body { animation: none; }
  .mock-float { animation: none; }
}

@media print {
  .site-head, footer.site-foot, .cta-band, .nav-toggle, .lang { display: none; }
  body { background: #fff; animation: none; }
  body::before { display: none; }
  .reveal, .stagger > * { opacity: 1 !important; transform: none !important; }
}
