/* sellostark.app: the same tokens as the app (crates/sellostark-app/ui/app.css).
   Phone first, widened with min-width queries. No remote fonts, no images in CSS. */

:root {
  color-scheme: light;
  --paper: #f7f4ef;
  --surface: #ffffff;
  --surface-2: #f3efe8;
  --surface-3: #ebe5db;
  --line: #e6e0d6;
  --line-strong: #d4ccbf;
  --ink: #17181c;
  --text: #2b2d33;
  --text-2: #4f525b;
  --muted: #696c74;
  --primary: #17181c;
  --primary-hover: #2e3037;
  --on-primary: #ffffff;
  --accent-text: #b23c18;
  --accent-soft: #fff1e9;
  --accent-line: #fbcdb5;
  --brand-gradient: linear-gradient(135deg, #ff8a4c 0%, #e0432a 100%);
  --cta-gradient: linear-gradient(180deg, #cc4a22 0%, #b93d17 100%);
  --cta-gradient-hover: linear-gradient(180deg, #bd431d 0%, #a53413 100%);
  --success: #1e6b45;
  --success-bg: #e6f3eb;
  --success-line: #b9dcc7;
  --warning: #7f5000;
  --warning-bg: #fcf1da;
  --warning-line: #eed8a8;
  --focus: #c2441b;
  --header-bg: rgb(247 244 239 / 88%);
  --shadow-1: 0 1px 2px rgb(23 24 28 / 6%);
  --shadow-2: 0 1px 2px rgb(23 24 28 / 4%), 0 8px 24px -10px rgb(23 24 28 / 16%);
  --shadow-3: 0 2px 6px rgb(23 24 28 / 6%), 0 28px 70px -18px rgb(23 24 28 / 34%);

  --font-ui: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, "Inter", "Helvetica Neue", Arial, sans-serif;
  --font-display: "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, "Inter", "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "Cascadia Mono", "SF Mono", Menlo, Consolas, monospace;

  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 22px;
  --r-full: 999px;
  --gutter: 20px;
  --content: 1120px;
  --touch: 44px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --paper: #121316;
    --surface: #1a1b1f;
    --surface-2: #212328;
    --surface-3: #2a2d33;
    --line: #2c2f35;
    --line-strong: #3d4149;
    --ink: #f4f1ec;
    --text: #e6e2dc;
    --text-2: #c3bfb8;
    --muted: #a39f98;
    --primary: #f4f1ec;
    --primary-hover: #ffffff;
    --on-primary: #17181c;
    --accent-text: #ff9c74;
    --accent-soft: #2d1d16;
    --accent-line: #5a3322;
    --success: #74d29c;
    --success-bg: #14271c;
    --success-line: #24432f;
    --warning: #f0bd60;
    --warning-bg: #2a2112;
    --warning-line: #4a3a1b;
    --focus: #ff9a6b;
    --header-bg: rgb(18 19 22 / 88%);
    --shadow-1: 0 1px 2px rgb(0 0 0 / 30%);
    --shadow-2: 0 1px 2px rgb(0 0 0 / 30%), 0 10px 28px -12px rgb(0 0 0 / 60%);
    --shadow-3: 0 2px 6px rgb(0 0 0 / 35%), 0 30px 80px -20px rgb(0 0 0 / 70%);
  }
}

/* ---------- Base ---------- */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 76px;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font: 16px/1.6 var(--font-ui);
  -webkit-font-smoothing: antialiased;
  font-synthesis: none;
  overflow-wrap: break-word;
}

h1,
h2,
h3 {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-display);
  line-height: 1.15;
  letter-spacing: -.02em;
  text-wrap: balance;
}

p,
ul,
ol {
  margin: 0;
}

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

a {
  color: var(--accent-text);
  text-underline-offset: 3px;
}

code {
  font-family: var(--font-mono);
  font-size: .86em;
}

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

::selection {
  background: var(--accent-line);
  color: var(--ink);
}

[hidden] {
  display: none !important;
}

.wrap {
  width: 100%;
  max-width: calc(var(--content) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip {
  position: absolute;
  left: var(--gutter);
  top: -80px;
  z-index: 20;
  padding: 10px 16px;
  border-radius: var(--r-sm);
  background: var(--primary);
  color: var(--on-primary);
  font-weight: 600;
}

.skip:focus {
  top: 12px;
}

.icon {
  width: 24px;
  height: 24px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon--sm {
  width: 18px;
  height: 18px;
}

/* ---------- Buttons and chips ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: var(--touch);
  padding: 10px 18px;
  border: 1px solid transparent;
  border-radius: var(--r-md);
  font: 600 15px/1.2 var(--font-ui);
  text-align: center;
  text-decoration: none;
  transition: background-color .15s var(--ease), border-color .15s var(--ease), transform .15s var(--ease);
}

.btn:active {
  transform: translateY(1px);
}

.btn--lg {
  min-height: 52px;
  padding: 14px 22px;
  border-radius: 14px;
  font-size: 16px;
}

.btn--brand {
  background: var(--cta-gradient);
  color: #fff;
  box-shadow: 0 6px 18px -8px rgb(185 61 23 / 70%);
}

.btn--brand:hover {
  background: var(--cta-gradient-hover);
}

.btn--primary {
  background: var(--primary);
  color: var(--on-primary);
}

.btn--primary:hover {
  background: var(--primary-hover);
}

.btn--secondary {
  border-color: var(--line-strong);
  background: var(--surface);
  color: var(--ink);
}

.btn--secondary:hover {
  border-color: var(--muted);
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-full);
  background: var(--surface-2);
  color: var(--text-2);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
}

.chip--ok {
  border-color: var(--success-line);
  background: var(--success-bg);
  color: var(--success);
}

.chip--open {
  border-color: var(--warning-line);
  background: var(--warning-bg);
  color: var(--warning);
}

.chip--you {
  border-color: var(--accent-line);
  background: var(--accent-soft);
  color: var(--accent-text);
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid var(--line);
  background: var(--header-bg);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 60px;
}

.wordmark {
  display: inline-flex;
  margin-right: auto;
  color: var(--ink);
}

.wordmark svg {
  width: 134px;
  height: 32px;
}

.site-nav {
  display: none;
  gap: 4px;
}

.site-nav a,
.lang {
  display: inline-flex;
  align-items: center;
  min-height: var(--touch);
  padding: 0 10px;
  border-radius: var(--r-sm);
  color: var(--text-2);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
}

.site-nav a:hover,
.lang:hover {
  color: var(--ink);
  background: var(--surface-2);
}

.site-header .btn {
  min-height: 40px;
  padding: 8px 14px;
}

/* ---------- Sections ---------- */

.section {
  padding-block: 56px;
}

.section--tint {
  border-block: 1px solid var(--line);
  background: var(--surface-2);
}

.section-head {
  max-width: 720px;
  margin-bottom: 28px;
}

.section-head h2 {
  font-size: clamp(26px, 2.2vw + 18px, 38px);
}

.section-head p {
  margin-top: 12px;
  color: var(--text-2);
  font-size: 17px;
}

.card {
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow-1);
}

.grid {
  display: grid;
  gap: 16px;
}

/* ---------- Hero ---------- */

.hero {
  overflow: hidden;
  padding-block: 40px 16px;
}

.hero-grid {
  display: grid;
  gap: 24px;
}

.hero h1 {
  font-size: clamp(34px, 6.4vw + 10px, 62px);
  font-weight: 700;
  letter-spacing: -.03em;
}

.hero-lead {
  margin-top: 18px;
  max-width: 34em;
  color: var(--text-2);
  font-size: clamp(17px, .5vw + 16px, 20px);
  line-height: 1.5;
}

.hero-actions {
  display: grid;
  gap: 10px;
  margin-top: 26px;
}

.hero-meta {
  margin-top: 16px;
  color: var(--muted);
  font-size: 14px;
}

.hero-meta .chip {
  margin-right: 6px;
  vertical-align: 1px;
}

.hero-note {
  margin-top: 12px;
  padding: 10px 14px;
  border: 1px solid var(--warning-line);
  border-radius: var(--r-md);
  background: var(--warning-bg);
  color: var(--warning);
  font-size: 14px;
}

.hero-art {
  position: relative;
  display: grid;
  place-items: center;
  padding-block: 36px 40px;
}

/* The brand's postage stamp: an ember field with a punched edge, tilted by 8 degrees. */
.stamp {
  --p: 13px;
  position: absolute;
  width: calc(var(--p) * 24);
  height: calc(var(--p) * 30);
  background: var(--brand-gradient);
  transform: rotate(-8deg);
  -webkit-mask:
    radial-gradient(circle at center, transparent 0 calc(var(--p) * .3), #000 calc(var(--p) * .3 + .6px)) calc(var(--p) / -2) calc(var(--p) / -2) / var(--p) var(--p),
    linear-gradient(#000 0 0) center / calc(100% - var(--p)) calc(100% - var(--p)) no-repeat;
  mask:
    radial-gradient(circle at center, transparent 0 calc(var(--p) * .3), #000 calc(var(--p) * .3 + .6px)) calc(var(--p) / -2) calc(var(--p) / -2) / var(--p) var(--p),
    linear-gradient(#000 0 0) center / calc(100% - var(--p)) calc(100% - var(--p)) no-repeat;
}

.phone {
  position: relative;
  width: min(248px, 66vw);
  border: 9px solid #17181c;
  border-radius: 38px;
  background: #17181c;
  box-shadow: var(--shadow-3), 0 0 0 1px rgb(255 255 255 / 14%);
  overflow: hidden;
}

.phone img {
  width: 100%;
  height: auto;
  aspect-ratio: 375 / 812;
  border-radius: 29px;
}

/* ---------- Steps ---------- */

.steps {
  counter-reset: step;
  list-style: none;
  padding: 0;
}

.step {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.step-text {
  padding: 20px 20px 18px;
}

.step-text h3 {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 21px;
}

.step-text h3::before {
  counter-increment: step;
  content: counter(step);
  display: grid;
  place-items: center;
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent-text);
  font-size: 16px;
  font-variant-numeric: tabular-nums;
}

.step-text p {
  margin-top: 10px;
  color: var(--text-2);
}

.shot {
  margin: auto 20px 0;
  aspect-ratio: 375 / 430;
  border: 1px solid var(--line-strong);
  border-bottom: 0;
  border-radius: 18px 18px 0 0;
  overflow: hidden;
  background: #f7f4ef;
}

.shot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
}

.shot--bottom img {
  object-position: bottom;
}

/* ---------- Features ---------- */

.feature {
  padding: 20px;
}

.feature .badge,
.fact .badge,
.dl-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: var(--r-md);
  background: var(--accent-soft);
  color: var(--accent-text);
}

.feature h3,
.fact h3 {
  margin-top: 14px;
  font-size: 19px;
  letter-spacing: -.01em;
}

.feature p,
.fact p {
  margin-top: 8px;
  color: var(--text-2);
  font-size: 15px;
}

.callout {
  margin-top: 16px;
  padding: 18px 20px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--r-lg);
  color: var(--text-2);
  font-size: 15px;
}

.callout strong {
  color: var(--ink);
}

/* ---------- AI ---------- */

.ai-card {
  padding: 22px 20px;
}

.ai-card h3 {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  font-size: 21px;
}

.ai-card p {
  margin-top: 10px;
  color: var(--text-2);
}

.ai-card ul,
.dl-more ol,
.dl-more ul {
  margin-top: 12px;
  padding-left: 20px;
  color: var(--text-2);
  font-size: 15px;
}

.ai-card li + li,
.dl-more li + li {
  margin-top: 6px;
}

.fineprint {
  margin-top: 18px;
  color: var(--muted);
  font-size: 14px;
}

/* ---------- Downloads ---------- */

.dl {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 20px;
}

.dl.is-yours {
  border-color: var(--accent-line);
  box-shadow: var(--shadow-2);
}

.dl-head {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 14px;
  align-items: center;
}

.dl-head h3 {
  font-size: 21px;
}

.dl-icon {
  grid-row: span 2;
  background: var(--surface-2);
  color: var(--ink);
}

.dl-sub {
  color: var(--muted);
  font-size: 14px;
}

.dl-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.dl-file {
  display: grid;
  gap: 8px;
}

.dl-file + .dl-file {
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.dl-actions {
  display: grid;
  gap: 8px;
}

.dl-meta {
  color: var(--muted);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}

.hash {
  margin-top: 12px;
  color: var(--muted);
  font-size: 13px;
}

.hash code {
  display: block;
  margin-top: 4px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--surface-2);
  color: var(--text);
  overflow-wrap: anywhere;
  user-select: all;
}

.note {
  padding: 10px 14px;
  border: 1px solid var(--warning-line);
  border-radius: var(--r-md);
  background: var(--warning-bg);
  color: var(--warning);
  font-size: 14px;
}

details {
  border-top: 1px solid var(--line);
}

summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: var(--touch);
  padding-block: 10px;
  color: var(--ink);
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}

summary::-webkit-details-marker {
  display: none;
}

summary::after {
  content: "";
  flex: none;
  width: 9px;
  height: 9px;
  margin-right: 4px;
  border: solid var(--muted);
  border-width: 0 2px 2px 0;
  transform: translateY(-2px) rotate(45deg);
  transition: transform .15s var(--ease);
}

details[open] > summary::after {
  transform: translateY(2px) rotate(-135deg);
}

.dl-more {
  margin-top: auto;
}

.dl-more > :last-child {
  padding-bottom: 4px;
}

.dl-more summary {
  font-size: 15px;
}

.dl-more > p:not(.hash) {
  margin-top: 12px;
  color: var(--text-2);
  font-size: 15px;
}

.dl-foot {
  margin-top: 20px;
  color: var(--muted);
  font-size: 14px;
}

/* ---------- Facts ---------- */

.fact {
  padding: 20px;
}

.fact .badge {
  background: var(--success-bg);
  color: var(--success);
}

/* ---------- FAQ ---------- */

.faq {
  max-width: 820px;
  border-bottom: 1px solid var(--line);
}

.faq summary {
  padding-block: 16px;
  font-size: 17px;
}

.faq details > div {
  padding-bottom: 18px;
  color: var(--text-2);
}

.faq details > div p + p {
  margin-top: 10px;
}

/* ---------- Footer ---------- */

.site-footer {
  padding-block: 36px 44px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 18px;
  margin: 0 0 16px;
  padding: 0;
  list-style: none;
}

.footer-links a {
  display: inline-flex;
  align-items: center;
  min-height: var(--touch);
  color: var(--text-2);
  font-weight: 600;
}

.site-footer p + p {
  margin-top: 8px;
}

/* ---------- Legal pages ---------- */

.legal {
  max-width: 760px;
  padding-block: 40px 64px;
}

.account-deletion-card {
  margin-block: 24px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow-1);
}

.legal .account-deletion-card h2 { margin-top: 0; }
.account-deletion-card p { overflow-wrap: anywhere; }

.account-deletion form {
  display: grid;
  gap: .5rem;
  max-width: 28rem;
  margin-top: 1.25rem;
}

.account-deletion input:not([type="checkbox"]) {
  min-height: 44px;
  padding: .5rem .75rem;
  border: 1px solid var(--line-strong);
  border-radius: .5rem;
  background: var(--surface);
  color: inherit;
  font: inherit;
}

.account-deletion form button { justify-self: start; margin-top: .5rem; }
.account-deletion-actions { display: flex; flex-wrap: wrap; gap: .75rem; }
.account-deletion-check {
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  min-height: 44px;
  cursor: pointer;
}
.account-deletion-check input { flex: none; width: 1.25rem; height: 1.25rem; margin: .2em 0 0; }
.account-deletion button:disabled { cursor: wait; opacity: .65; }

.legal h1 {
  font-size: clamp(30px, 3vw + 18px, 42px);
}

.legal h2 {
  margin-top: 36px;
  font-size: 21px;
  letter-spacing: -.01em;
}

.legal p,
.legal address {
  margin-top: 12px;
  color: var(--text-2);
  font-style: normal;
}

.legal .stand {
  margin-top: 8px;
  color: var(--muted);
  font-size: 14px;
}

.legal .note {
  margin-top: 16px;
}

/* ---------- Wider screens ---------- */

@media (min-width: 480px) {
  .hero-actions {
    display: flex;
    flex-wrap: wrap;
  }

  .stamp {
    --p: 16px;
  }

  .phone {
    width: 272px;
  }

  .dl-actions {
    display: flex;
    flex-wrap: wrap;
  }
}

@media (min-width: 720px) {
  :root {
    --gutter: 32px;
  }

  .site-nav {
    display: flex;
  }

  .section {
    padding-block: 80px;
  }

  .section-head {
    margin-bottom: 36px;
  }

  .grid--2,
  .grid--3 {
    grid-template-columns: repeat(2, 1fr);
  }

  .steps {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 960px) {
  .hero {
    padding-block: 64px 40px;
  }

  .hero-grid {
    grid-template-columns: 1.1fr .9fr;
    align-items: center;
    gap: 40px;
  }

  .hero-art {
    padding-block: 44px;
  }

  .phone {
    width: 292px;
  }

  .grid--3 {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  * {
    transition: none !important;
  }
}

@media print {
  .site-header,
  .hero-art,
  .skip {
    display: none;
  }
}
