/*
 * site.css: THE LOOK OF THE PURPLE WONTON WEBSITE
 *
 * In plain words: colours, fonts, spacing and layout for every page of
 * purplewonton.com. No fonts or files are loaded from other companies, so
 * visiting the site sends nothing to third parties.
 *
 * Colours ("tokens") are defined once at the top, for light mode and dark mode.
 *   --paper   page background (pale lilac)     --ink     main text (deep plum)
 *   --muted   secondary text                   --line    borders
 *   --wonton  brand purple (links, buttons)    --dup     red, used for duplicate tabs
 *   --keep    green, used for the tab that stays
 */
:root {
  --paper: #f5f2fb;
  --surface: #ffffff;
  --ink: #24123f;
  --muted: #5e5375;
  --line: #e2dbf0;
  --wonton: #7140e0;
  --wonton-deep: #5528c2;
  --wonton-soft: #ebe3fc;
  --dup: #d6455d;
  --dup-soft: #fbe3e7;
  --keep: #0e8a7b;
  --keep-soft: #dcf2ee;
  --radius-lg: 22px;
  --radius-sm: 10px;
  --shadow: 0 18px 40px -22px rgba(52, 22, 110, 0.45);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}

/* Dark mode: follows the visitor's computer setting. */
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #160f24;
    --surface: #211833;
    --ink: #efe9fb;
    --muted: #b3a8cc;
    --line: #372b4f;
    --wonton: #a98bff;
    --wonton-deep: #c3adff;
    --wonton-soft: #2c2145;
    --dup: #f07a8d;
    --dup-soft: #3a1d29;
    --keep: #4fcab8;
    --keep-soft: #173530;
    --shadow: 0 18px 40px -22px rgba(0, 0, 0, 0.8);
    color-scheme: dark;
  }
}

/* ---------- Basics ---------- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 17px/1.6 var(--font);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--wonton-deep); text-underline-offset: 3px; }
a:hover { color: var(--wonton); }
:focus-visible { outline: 3px solid var(--wonton); outline-offset: 3px; border-radius: 6px; }
.wrap { width: min(1080px, 100% - 32px); margin: 0 auto; }
.narrow { width: min(720px, 100% - 32px); margin: 0 auto; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 12px; background: var(--surface); padding: 8px 12px; z-index: 10; }

/* Headlines: heavy and tightly spaced; this is the site's typographic voice. */
h1, h2, h3 { line-height: 1.08; letter-spacing: -0.025em; margin: 0 0 0.5em; }
h1 { font-size: clamp(2.3rem, 5.6vw, 4rem); font-weight: 850; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); font-weight: 800; }
h3 { font-size: 1.25rem; font-weight: 750; letter-spacing: -0.01em; }
p { margin: 0 0 1em; }
.lead { font-size: 1.2rem; color: var(--muted); max-width: 34em; }

/* ---------- Header and footer ---------- */
.site-head { padding: 18px 0; }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 800; letter-spacing: -0.01em; font-size: 1.1rem; }
.brand img { width: 36px; height: 36px; }
.nav { display: flex; gap: 22px; font-weight: 600; font-size: 0.97rem; }
.nav a { color: var(--ink); text-decoration: none; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--wonton); }
.site-foot { margin-top: 96px; padding: 36px 0 48px; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.93rem; }
.site-foot .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 18px 32px; align-items: center; }
.site-foot nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.site-foot a { color: var(--muted); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 22px; border-radius: 999px;
  background: var(--wonton); color: #fff; font-weight: 700; text-decoration: none;
  border: 0; font: inherit; font-weight: 700; cursor: pointer;
}
.btn:hover { background: var(--wonton-deep); color: #fff; }
@media (prefers-color-scheme: dark) { .btn { color: #1a1030; } .btn:hover { color: #1a1030; } }
.btn.ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 2px var(--line); }
.btn.ghost:hover { box-shadow: inset 0 0 0 2px var(--wonton); color: var(--ink); }
.btn[aria-disabled="true"] { opacity: 0.75; cursor: default; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 28px; }
.fine { color: var(--muted); font-size: 0.92rem; }

/* ---------- THE TAB STRIP (the one memorable element) ----------
 * A row of browser tabs. Three copies of the same page glow red, then fold
 * into the green copy that stays. Plays once when the page opens; people who
 * prefer less motion see the finished state straight away. */
.strip {
  display: flex; gap: 6px; align-items: flex-end;
  padding: 14px 14px 0; border-radius: 16px 16px 0 0;
  background: var(--wonton-soft); overflow: hidden;
}
.tab {
  flex: 1 1 0; min-width: 0;
  display: flex; align-items: center; gap: 8px;
  padding: 13px 14px; border-radius: 12px 12px 0 0;
  background: var(--surface); color: var(--ink);
  font-size: 0.88rem; font-weight: 600; white-space: nowrap;
  box-shadow: 0 -1px 0 var(--line) inset;
}
.tab span { overflow: hidden; text-overflow: ellipsis; }
.tab i { flex: none; width: 14px; height: 14px; border-radius: 4px; background: var(--line); }
.tab.dup i { background: var(--dup); }
.tab.kept i { background: var(--keep); }
.strip-body {
  padding: 14px 18px 22px; border-radius: 0 0 16px 16px;
  background: var(--surface); box-shadow: var(--shadow);
}
/* A pretend address bar and page, so the strip reads as a browser window. */
.addr {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 14px; border-radius: 999px; background: var(--paper);
  color: var(--muted); font-size: 0.9rem;
}
.addr i { width: 10px; height: 10px; border-radius: 50%; background: var(--keep); flex: none; }
.addr span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.page-lines { display: grid; gap: 10px; margin-top: 18px; }
.page-lines b { display: block; height: 12px; border-radius: 6px; background: var(--line); }
.page-lines b:nth-child(1) { width: 46%; height: 18px; background: var(--wonton-soft); }
.page-lines b:nth-child(2) { width: 88%; }
.page-lines b:nth-child(3) { width: 72%; }
.tab.dup { animation: dupGlow 2.6s ease-in-out 0.4s both, dupFold 0.7s cubic-bezier(.6,0,.4,1) 2.8s forwards; }
.tab.kept { animation: keptGlow 0.9s ease-out 3.3s both; }
@keyframes dupGlow {
  0%, 15% { background: var(--surface); }
  35%, 100% { background: var(--dup-soft); box-shadow: 0 0 0 2px var(--dup) inset; }
}
@keyframes dupFold {
  to { flex-grow: 0; flex-basis: 0; padding-left: 0; padding-right: 0; margin-left: -6px; opacity: 0; }
}
@keyframes keptGlow {
  from { background: var(--surface); }
  to { background: var(--keep-soft); box-shadow: 0 0 0 2px var(--keep) inset; }
}
.strip-caption { margin-top: 14px; color: var(--muted); font-size: 0.95rem; }
.strip-caption b { color: var(--keep); }
@media (prefers-reduced-motion: reduce) {
  .tab.dup { animation: none; display: none; }
  .tab.kept { animation: none; background: var(--keep-soft); box-shadow: 0 0 0 2px var(--keep) inset; }
}
@media (max-width: 640px) {
  .tab { padding: 9px 8px; font-size: 0.8rem; }
  .tab.hide-sm { display: none; }
}

/* ---------- Home page ---------- */
.hero { padding: 48px 0 24px; }
.hero h1 { max-width: 13em; }
.product-card {
  display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 40px; align-items: center;
  margin-top: 64px; padding: 40px; border-radius: var(--radius-lg);
  background: var(--surface); box-shadow: var(--shadow);
}
.product-card .icon { width: 56px; height: 56px; margin-bottom: 16px; }
.product-card .shot { border-radius: 16px; border: 1px solid var(--line); max-height: 460px; object-fit: cover; object-position: top; width: 100%; }
.studio { margin-top: 80px; display: grid; grid-template-columns: 200px 1fr; gap: 40px; align-items: center; }
.studio .logo-dark { display: none; }
@media (prefers-color-scheme: dark) { .studio .logo-light { display: none; } .studio .logo-dark { display: block; } }

/* ---------- Product page ---------- */
.p-hero { padding: 40px 0 8px; display: grid; grid-template-columns: 1fr; gap: 36px; }
.p-hero .title { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-bottom: 18px; color: var(--muted); font-weight: 650; }
.p-hero .title img { width: 44px; height: 44px; }
.feature {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 360px); gap: 56px;
  align-items: center; margin-top: 96px;
}
.feature.flip { grid-template-columns: minmax(0, 360px) minmax(0, 1fr); }
.feature.flip .shot-wrap { order: -1; }
.shot-wrap img { border-radius: 18px; border: 1px solid var(--line); box-shadow: var(--shadow); max-height: 560px; width: 100%; object-fit: cover; object-position: top; background: var(--surface); }
.pro-tag {
  display: inline-block; margin-left: 8px; padding: 1px 9px; border-radius: 999px;
  border: 1.5px solid var(--keep); color: var(--keep);
  font-size: 0.8rem; font-weight: 700; letter-spacing: 0; vertical-align: 0.3em;
}
.points { margin: 0; padding: 0; list-style: none; }
.points li { padding: 10px 0 10px 30px; border-top: 1px solid var(--line); position: relative; }
.points li::before {
  content: ""; position: absolute; left: 4px; top: 19px; width: 12px; height: 7px;
  border-left: 2.5px solid var(--keep); border-bottom: 2.5px solid var(--keep); transform: rotate(-45deg);
}

/* Free vs Lifetime Pro */
.pricing { margin-top: 112px; }
.plans { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 28px; }
.plan { padding: 30px; border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--line); }
.plan.pro { border: 2px solid var(--wonton); box-shadow: var(--shadow); }
.plan .price { font-size: 2.6rem; font-weight: 850; letter-spacing: -0.03em; line-height: 1; margin: 10px 0 4px; }
.plan .price small { font-size: 1rem; font-weight: 600; color: var(--muted); letter-spacing: 0; }
.plan .points { margin-top: 18px; }

/* FAQ */
.faq { margin-top: 112px; }
.faq details { border-top: 1px solid var(--line); padding: 4px 0; }
.faq details:last-of-type { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; padding: 14px 0; font-weight: 700; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--wonton); font-size: 1.4rem; line-height: 1; }
.faq details[open] summary::after { content: "\2212"; }
.faq details p { color: var(--muted); max-width: 40em; }

/* Plain promise strip */
.promise { margin-top: 96px; padding: 32px 36px; border-radius: var(--radius-lg); background: var(--keep-soft); }
.promise h2 { font-size: 1.6rem; }
.promise p { margin: 0; max-width: 46em; }

/* ---------- Text pages (privacy, terms, support) ---------- */
.doc { padding-top: 32px; }
.doc h1 { font-size: clamp(2rem, 4.4vw, 3rem); }
.doc h2 { font-size: 1.4rem; margin-top: 2em; }
.doc li { margin-bottom: 0.4em; }
.doc .updated { color: var(--muted); }
.contact-card { margin-top: 28px; padding: 28px; border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--line); }

/* ---------- Phones and small tablets ---------- */
@media (max-width: 860px) {
  .product-card, .feature, .feature.flip, .studio, .plans { grid-template-columns: 1fr; }
  .feature.flip .shot-wrap { order: 0; }
  .product-card { padding: 26px; gap: 28px; }
  .shot-wrap { max-width: 380px; }
  .feature { margin-top: 72px; gap: 28px; }
  .studio img { width: 150px; }
}
@media (max-width: 520px) {
  body { font-size: 16px; }
  .nav { gap: 14px; font-size: 0.92rem; }
  .brand span { display: none; }
}

/* ---------- Home page: studio hero ---------- */
.home-hero {
  display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 48px;
  align-items: center; padding: 56px 0 24px;
}
.home-hero h1 { max-width: 12em; }
.hero-logo { justify-self: end; }
.hero-logo img { width: 240px; }
.hero-logo .logo-dark { display: none; }
@media (prefers-color-scheme: dark) { .hero-logo .logo-light { display: none; } .hero-logo .logo-dark { display: block; } }

/* What we build: three areas, separated by a purple rule rather than boxed in cards. */
.capabilities { margin-top: 88px; }
.cap-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; margin-top: 24px; }
.cap { border-top: 3px solid var(--wonton); padding-top: 18px; }
.cap p { color: var(--muted); margin: 0; }

/* Products */
.products { margin-top: 104px; }
.products .product-card { margin-top: 32px; }
.kind { margin: 0 0 4px; color: var(--muted); font-weight: 650; font-size: 0.95rem; }
.product-name { font-size: clamp(1.7rem, 3.2vw, 2.3rem); font-weight: 820; letter-spacing: -0.025em; margin-bottom: 12px; }
.more { margin-top: 28px; color: var(--muted); }

/* How we work: a two-column list of plain promises. */
.how { margin-top: 104px; }
.how-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 48px; margin: 24px 0 0; }
.how-list div { padding: 18px 0; border-top: 1px solid var(--line); }
.how-list dt { font-weight: 750; font-size: 1.1rem; margin-bottom: 4px; }
.how-list dd { margin: 0; color: var(--muted); }

.contact-band { margin-top: 96px; padding: 36px 40px; border-radius: var(--radius-lg); background: var(--wonton-soft); }
.contact-band h2 { font-size: 1.7rem; }
.contact-band p { margin: 0; }

@media (max-width: 860px) {
  .home-hero { grid-template-columns: 1fr; padding-top: 32px; }
  .hero-logo { justify-self: start; order: -1; }
  .hero-logo img { width: 120px; }
  .cap-grid, .how-list { grid-template-columns: 1fr; }
  .contact-band { padding: 28px 24px; }
}

/* ---------- Pricing: free-version limits and the fuller Pro list ---------- */
.plan .limit { color: var(--dup); font-weight: 800; }
.plan .points.missing { margin-top: 6px; }
/* Items the free version doesn't include: a grey dash instead of the green tick. */
.plan .points.missing li { color: var(--muted); }
.plan .points.missing li::before {
  border: 0; transform: none; top: 22px; left: 3px; width: 13px; height: 2.5px;
  background: var(--muted); border-radius: 2px;
}
.plan .points.headline li { font-size: 1.02rem; }
.plan .also { margin: 22px 0 4px; font-weight: 750; color: var(--wonton-deep); }
/* Grid children may shrink below their content width (prevents sideways scrolling on phones). */
.p-hero > * { min-width: 0; }

/* ---------- Language menu (opens without any script) ---------- */
.head-right { display: flex; align-items: center; gap: 22px; }
.lang { position: relative; }
.lang summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; gap: 6px;
  padding: 6px 10px; border-radius: 999px; font-weight: 600; font-size: 0.93rem;
  box-shadow: inset 0 0 0 1.5px var(--line);
}
.lang summary::-webkit-details-marker { display: none; }
.lang summary:hover { box-shadow: inset 0 0 0 1.5px var(--wonton); }
.lang summary svg { width: 17px; height: 17px; fill: currentColor; flex: none; }
.lang ul {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 20;
  margin: 0; padding: 6px; list-style: none; min-width: 170px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow);
}
.lang li a { display: block; padding: 9px 12px; border-radius: 9px; color: var(--ink); text-decoration: none; font-weight: 600; }
.lang li a:hover { background: var(--wonton-soft); }
.lang li a[aria-current="true"] { color: var(--wonton-deep); background: var(--wonton-soft); }

/* Note on translated pages that the privacy policy and terms are in English. */
.legal-note { margin-bottom: 18px; font-size: 0.88rem; color: var(--muted); }
.lang-note { margin-top: -6px; }

/* ---------- Japanese: no tight letter-spacing, slightly taller lines ---------- */
:lang(ja) h1, :lang(ja) h2, :lang(ja) h3, :lang(ja) .product-name, :lang(ja) .plan .price { letter-spacing: 0; }
:lang(ja) h1 { font-size: clamp(2rem, 4.6vw, 3.3rem); line-height: 1.25; }
:lang(ja) h2 { line-height: 1.3; }
:lang(ja) body, body:lang(ja) { line-height: 1.8; }
:lang(ja) p, :lang(ja) li, :lang(ja) dd { line-break: strict; overflow-wrap: anywhere; }

@media (max-width: 640px) {
  .head-right { gap: 12px; }
  .lang summary span { display: none; }   /* on phones, just the globe icon */
  .lang summary { padding: 7px; }
}
