/* Charmity — the website.
   The tokens mirror ios/MarketplaceKit/Sources/MarketplaceUI/Theme.swift exactly:
   warm ivory canvas / warm charcoal by evening, warm ink, one antique-brass
   accent used sparingly, hairline dividers, serif display type. If the app's
   theme moves, move this file with it. */

:root {
  --canvas: #F6F2EA;
  --surface: #FFFFFF;
  --ink: #241F18;
  --ink-2: #877D6C;
  --ink-3: #AEA595;
  --accent: #9B7C3B;
  --hairline: #E7DFCF;
  --shadow: 0 1px 2px rgba(36, 31, 24, .05), 0 14px 36px rgba(36, 31, 24, .07);

  /* The hero artwork — a dusk over the dunes, seen through an arch. */
  --art-sky-a: #E3D0BA;
  --art-sky-b: #C7AC90;
  --art-arch: #F8F2E4;
  --art-sun: #A9894A;
  --art-dune-a: #B7BFAC;
  --art-dune-b: #C8BCAB;
  --art-dune-c: #B99C83;

  --serif: ui-serif, "New York", "Iowan Old Style", Palatino, Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", system-ui, Helvetica, Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --canvas: #4E483E;
    --surface: #5C5449;
    --ink: #F2EEE3;
    --ink-2: #CBC0A9;
    --ink-3: #A89C83;
    --accent: #CEB273;
    --hairline: #6F6555;
    --shadow: 0 1px 2px rgba(0, 0, 0, .14), 0 14px 36px rgba(0, 0, 0, .20);

    --art-sky-a: #6F6450;
    --art-sky-b: #544C3D;
    --art-arch: #BFB499;
    --art-sun: #CEB273;
    --art-dune-a: #666D5B;
    --art-dune-b: #6F675A;
    --art-dune-c: #63564A;
  }
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--canvas);
  color: var(--ink);
  font: 400 17px/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* A whisper of paper grain over everything, so the flats read as print. */
body::after {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 2147483647;
  opacity: .045;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='2'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)'/%3E%3C/svg%3E");
}

.wrap { max-width: 1100px; margin: 0 auto; padding: 0 24px; }

a { color: inherit; }
a:focus-visible, button:focus-visible, summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

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

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

.site-header { border-bottom: 1px solid var(--hairline); }

.site-header .wrap {
  display: flex; align-items: baseline; justify-content: space-between;
  padding-top: 22px; padding-bottom: 22px;
}

.wordmark {
  font: 500 1.35rem/1 var(--serif);
  letter-spacing: .01em;
  text-decoration: none;
}
.wordmark::after { content: "."; color: var(--accent); }

.site-nav a {
  font-size: .95rem;
  color: var(--ink-2);
  text-decoration: none;
  margin-left: 28px;
}
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--ink); }

/* --- Shared type -------------------------------------------------------- */

.eyebrow {
  font: 600 .72rem/1 var(--sans);
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--accent);
}

h1 {
  font: 400 clamp(2.5rem, 5.2vw, 3.8rem)/1.08 var(--serif);
  letter-spacing: -.012em;
  text-wrap: balance;
}

h2 {
  font: 400 clamp(1.7rem, 3vw, 2.25rem)/1.2 var(--serif);
  letter-spacing: -.01em;
  text-wrap: balance;
}

.lede { font-size: 1.14rem; line-height: 1.7; color: var(--ink-2); max-width: 34em; }
.lede strong { color: var(--ink); font-weight: 500; }

/* --- Buttons & badges --------------------------------------------------- */

.btn {
  display: inline-block;
  background: var(--ink);
  color: var(--canvas);
  font: 600 .95rem/1 var(--sans);
  padding: .95rem 1.6rem;
  border-radius: 999px;
  text-decoration: none;
  transition: transform .15s ease, opacity .15s ease;
}
.btn:hover { opacity: .92; transform: translateY(-1px); }

.pill {
  display: inline-flex; align-items: center; gap: .6em;
  border: 1px solid var(--hairline);
  background: var(--surface);
  color: var(--ink-2);
  font: 500 .9rem/1 var(--sans);
  letter-spacing: .01em;
  padding: .9rem 1.4rem;
  border-radius: 999px;
}
.pill::before {
  content: "";
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent);
}

.textlink {
  color: var(--ink-2);
  font-size: .95rem;
  text-decoration: none;
  border-bottom: 1px solid var(--hairline);
  padding-bottom: 1px;
}
.textlink:hover { color: var(--ink); border-bottom-color: var(--accent); }

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

.hero {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 56px;
  align-items: center;
  padding: 72px 0 88px;
}

.hero-copy > * + * { margin-top: 22px; }
.hero-copy .cta { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; margin-top: 34px; }

/* The stage: the dusk artwork as a plate, the app standing in front of it,
   one of its cards drifting off the corner — a collage, not a screenshot. */

.hero-stage { position: relative; aspect-ratio: 480 / 566; }

.scene {
  position: absolute;
  inset: 9% 0 4% 0;
  border-radius: 26px;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.scene svg { width: 100%; height: 100%; display: block; }

.phone {
  background: #241F18;
  padding: 11px;
  border-radius: 42px;
  box-shadow: 0 30px 70px rgba(30, 24, 16, .38);
}
.phone img { width: 100%; height: auto; display: block; border-radius: 31px; }

.hero-stage .phone {
  position: absolute;
  top: 0; right: 4%;
  width: 52%;
  z-index: 2;
}

.float-card {
  position: absolute;
  left: 2%; bottom: 4%;
  width: 37%;
  z-index: 3;
}

.pcard {
  background: var(--surface);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 18px 44px rgba(30, 24, 16, .22);
}

.ph {
  position: relative;
  aspect-ratio: 4 / 5;
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, var(--ph-a), var(--ph-b));
}
.ph::before {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(circle at 50% 28%, rgba(255, 255, 255, .22), transparent 62%);
}
.ph::after {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(circle at 50% 55%, transparent 55%, rgba(0, 0, 0, .10));
}
.ph svg {
  width: 38%; height: auto;
  stroke: #2A2018; opacity: .27;
  fill: none; stroke-width: 1.4;
  stroke-linecap: round; stroke-linejoin: round;
}

.ph-taupe { --ph-a: #C9BEB0; --ph-b: #A4967F; }

.pcard .meta { padding: 13px 15px 15px; }
.pcard .meta .b {
  font: 600 .62rem/1 var(--sans);
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.pcard .meta .t {
  font: 400 1.04rem/1.3 var(--serif);
  margin-top: 5px;
}
.pcard .meta .p {
  font: 600 .9rem/1 var(--sans);
  margin-top: 7px;
}

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

.section { border-top: 1px solid var(--hairline); padding: 76px 0; }
.section-head { max-width: 620px; }
.section-head h2 { margin-top: 14px; }
.section-head p { margin-top: 14px; color: var(--ink-2); }

/* --- The departments band ------------------------------------------------ */

.tiles {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
  margin-top: 38px;
}

.tile {
  position: relative;
  aspect-ratio: 3 / 4.1;
  border-radius: 16px;
  overflow: hidden;
  background: linear-gradient(180deg, var(--t-a), var(--t-b));
  box-shadow: var(--shadow);
}
.tile::before {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(circle at 50% 24%, rgba(255, 255, 255, .22), transparent 60%),
              radial-gradient(circle at 50% 60%, transparent 55%, rgba(0, 0, 0, .12));
}
.tile svg {
  position: absolute; inset: 0 0 14% 0; margin: auto;
  width: 38%; height: auto;
  stroke: #2A2018; opacity: .3;
  fill: none; stroke-width: 1.5;
  stroke-linecap: round; stroke-linejoin: round;
}
.tile span {
  position: absolute; left: 0; right: 0; bottom: 13px;
  text-align: center;
  font: 600 .64rem/1 var(--sans);
  letter-spacing: .16em;
  text-transform: uppercase;
  color: #241F18; opacity: .6;
}

.t-taupe { --t-a: #C9BEB0; --t-b: #A4967F; }
.t-clay  { --t-a: #CCB4A3; --t-b: #A98A72; }
.t-slate { --t-a: #AEB8C1; --t-b: #87929C; }
.t-sage  { --t-a: #B9C1AF; --t-b: #94A085; }
.t-mauve { --t-a: #BEB2BC; --t-b: #958799; }
.t-stone { --t-a: #C3C1BA; --t-b: #9C9A91; }

/* --- How it works -------------------------------------------------------- */

.how {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  margin-top: 48px;
}

.col-label {
  font: 400 1.25rem/1 var(--serif);
  padding-bottom: 14px;
  border-bottom: 2px solid var(--ink);
}

.steps { list-style: none; }
.steps li {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 16px;
  padding: 18px 0;
}
.steps li + li { border-top: 1px solid var(--hairline); }
.steps .n {
  font: 400 1.35rem/1.2 var(--serif);
  font-variant-numeric: oldstyle-nums;
  color: var(--accent);
}
.steps .s-t { font-weight: 600; font-size: .98rem; }
.steps .s-d { color: var(--ink-2); font-size: .95rem; line-height: 1.6; margin-top: 4px; }

/* --- The designer lane — an espresso plate, ivory on dark ---------------- */

.plate {
  --canvas: #463F35;
  --surface: #534B40;
  --ink: #F2EEE3;
  --ink-2: #CFC4AC;
  --ink-3: #A89C83;
  --accent: #CEB273;
  --hairline: #5F5749;
  --shadow: 0 1px 2px rgba(0, 0, 0, .16), 0 14px 36px rgba(0, 0, 0, .22);
  background: var(--canvas);
  color: var(--ink);
  border-top: none;
  padding: 88px 0;
}
@media (prefers-color-scheme: dark) {
  .plate { --canvas: #3E382F; --surface: #4A4339; --hairline: #554E42; }
}

.lane {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 64px;
  align-items: center;
}
.lane-copy > * + * { margin-top: 18px; }
.lane-copy h2 { margin-top: 14px; }
.lane-copy p { color: var(--ink-2); }
.lane-copy ul { list-style: none; margin-top: 26px; }
.lane-copy ul li {
  padding: 13px 0 13px 26px;
  position: relative;
  font-size: .97rem;
  color: var(--ink);
}
.lane-copy ul li + li { border-top: 1px solid var(--hairline); }
.lane-copy ul li::before {
  content: "";
  position: absolute; left: 2px; top: 1.45em;
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent);
}

/* The certificate card — the app icon's framed motif, borrowed. */
.cert {
  background: var(--surface);
  border-radius: 20px;
  box-shadow: var(--shadow);
  padding: 26px;
  max-width: 380px;
  justify-self: center;
  width: 100%;
}
.cert-frame {
  border: 1px solid var(--accent);
  border-radius: 6px;
  padding: 52px 28px;
  text-align: center;
}
.cert-frame svg {
  width: 64px; height: 64px;
  stroke: var(--ink); fill: none;
  stroke-width: 1.3; stroke-linecap: round; stroke-linejoin: round;
  opacity: .85;
}
.cert-frame .cert-line {
  margin-top: 26px;
  font: 600 .66rem/1.8 var(--sans);
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.cert-frame .cert-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent);
  margin: 22px auto 0;
}

/* --- App section --------------------------------------------------------- */

.app-duo {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 64px;
  align-items: center;
}
.app-duo h2 { margin-top: 14px; }
.app-duo p { margin-top: 16px; max-width: 34em; color: var(--ink-2); }
.app-duo .cta { margin-top: 30px; display: flex; gap: 20px; flex-wrap: wrap; }

.app-duo .phone {
  width: min(64%, 292px);
  margin: 0 auto;
}

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

.site-footer { border-top: 1px solid var(--hairline); padding: 44px 0 56px; }
.site-footer .cols {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: 24px; flex-wrap: wrap;
}
.site-footer nav a {
  color: var(--ink-2); font-size: .92rem; text-decoration: none; margin-right: 24px;
}
.site-footer nav a:hover { color: var(--ink); }
.site-footer .fine {
  margin-top: 26px;
  color: var(--ink-3);
  font-size: .85rem;
}
.site-footer .fine a { color: var(--ink-2); text-decoration: none; }
.site-footer .fine a:hover { color: var(--ink); }

/* --- Subpages (support, legal) ------------------------------------------ */

.page-head { padding: 64px 0 20px; }
.page-head h1 { margin-top: 14px; }
.page-head .lede { margin-top: 18px; }

.prose { max-width: 720px; padding: 28px 0 90px; }
.prose h2 {
  font: 400 1.4rem/1.3 var(--serif);
  margin-top: 2.6rem;
}
.prose h2:first-child { margin-top: 1rem; }
.prose p { margin-top: 1rem; }
.prose ul { margin: 1rem 0 0 1.2rem; }
.prose li { margin-top: .5rem; }
.prose li::marker { color: var(--accent); }
.prose .updated {
  font-size: .85rem; color: var(--ink-3);
  margin-top: 3.2rem; padding-top: 1.2rem;
  border-top: 1px solid var(--hairline);
}
.prose a { color: var(--ink); text-decoration-color: var(--accent); text-underline-offset: 3px; }

/* --- Support page -------------------------------------------------------- */

.contact-card {
  background: var(--surface);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 30px 32px;
  margin: 34px 0 14px;
  max-width: 720px;
}
.contact-card .cc-t { font: 400 1.3rem/1.3 var(--serif); }
.contact-card p { color: var(--ink-2); font-size: .97rem; margin-top: 8px; }
.contact-card .cc-mail {
  display: inline-block;
  margin-top: 16px;
  font: 500 1.05rem/1 var(--sans);
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--accent);
  padding-bottom: 3px;
}

.faq { max-width: 720px; padding-bottom: 90px; }
.faq h2 {
  font: 600 .72rem/1 var(--sans);
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-top: 46px;
}
.faq details { border-bottom: 1px solid var(--hairline); }
.faq summary {
  cursor: pointer;
  list-style: none;
  display: flex; justify-content: space-between; align-items: baseline; gap: 18px;
  font: 400 1.08rem/1.4 var(--serif);
  padding: 18px 0;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  color: var(--accent);
  font: 300 1.3rem/1 var(--serif);
  flex-shrink: 0;
}
.faq details[open] summary::after { content: "\2212"; }
.faq details p {
  color: var(--ink-2);
  font-size: .96rem;
  line-height: 1.65;
  padding: 0 34px 20px 0;
  max-width: 60ch;
}
.faq details p + p { padding-top: 0; margin-top: -8px; }

/* --- Small screens ------------------------------------------------------- */

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; gap: 60px; padding: 56px 0 72px; }
  .hero-stage { max-width: 460px; margin: 0 auto; width: 100%; }
  .how { grid-template-columns: 1fr; gap: 40px; }
  .lane { grid-template-columns: 1fr; gap: 48px; }
  .cert { justify-self: start; }
  .app-duo { grid-template-columns: 1fr; gap: 48px; }
  .tiles { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 560px) {
  body { font-size: 16px; }
  .section { padding: 56px 0; }
  .site-nav a { margin-left: 18px; }
  .faq details p { padding-right: 10px; }
  .tiles {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 10px;
    margin-right: -24px;
  }
  .tile { flex: 0 0 132px; scroll-snap-align: start; }
}

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