/* Wen Studio — site styles
   Palette comes from the Miss Sunshine mascot (cream ground, sun yellow, orange)
   and the app's own interface (forest green on off-white). The magenta hairline
   is the CutContour cut line the app exports: 0.1 mm, magenta. */

:root {
  color-scheme: light;
  --ground: #faf3df;
  --paper: #fffbef;
  --paper-2: #f2e9cf;
  --ink: #26221a;
  --ink-2: #5f5847;
  --ink-3: #8d8571;
  --line: #ddd2b4;
  --green: #2f5d4a;
  --green-2: #244b3b;
  --green-soft: #e3ecdc;
  --green-ink: #f4f8f2;
  --sun: #f5c23b;
  --orange: #ef8a2c;
  --cut: #ff00c8;
  --shadow: 0 1px 2px rgba(60, 45, 10, .08), 0 12px 32px -16px rgba(60, 45, 10, .28);
  --radius: 22px;
  --measure: 34rem;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --ground: #1b1913;
    --paper: #24211a;
    --paper-2: #2d2920;
    --ink: #f3ecd8;
    --ink-2: #bcb39c;
    --ink-3: #8d8571;
    --line: #3d3829;
    --green: #86bc9f;
    --green-2: #a3d0b7;
    --green-soft: #26312a;
    --green-ink: #10201a;
    --sun: #f5c23b;
    --orange: #f2953f;
    --cut: #ff4fd8;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 12px 32px -16px rgba(0, 0, 0, .6);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --ground: #1b1913;
  --paper: #24211a;
  --paper-2: #2d2920;
  --ink: #f3ecd8;
  --ink-2: #bcb39c;
  --ink-3: #8d8571;
  --line: #3d3829;
  --green: #86bc9f;
  --green-2: #a3d0b7;
  --green-soft: #26312a;
  --green-ink: #10201a;
  --sun: #f5c23b;
  --orange: #f2953f;
  --cut: #ff4fd8;
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 12px 32px -16px rgba(0, 0, 0, .6);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.75;
  font-feature-settings: "palt";
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--green); text-decoration-thickness: 1px; text-underline-offset: .18em; }
a:hover { color: var(--green-2); }
:focus-visible { outline: 2px solid var(--orange); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3 {
  font-family: "Fredoka", "Noto Sans TC", "PingFang TC", system-ui, sans-serif;
  font-weight: 600;
  line-height: 1.2;
  margin: 0;
  text-wrap: balance;
  letter-spacing: -.005em;
}
h1 { font-size: clamp(2rem, 1.2rem + 3.4vw, 3.6rem); }
h2 { font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.2rem); }
h3 { font-size: 1.25rem; }
p { margin: 0; }
p + p { margin-top: .9em; }
.measure { max-width: var(--measure); }
.lede { font-size: 1.15rem; color: var(--ink-2); }
.eyebrow {
  font-family: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: .78rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--green);
  margin: 0 0 .9rem;
}
.mono {
  font-family: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-variant-numeric: tabular-nums;
}

.wrap { width: min(1080px, 100% - 2.5rem); margin-inline: auto; }
section { padding-block: clamp(3.5rem, 8vw, 6.5rem); }
section + section { border-top: 1px solid var(--line); }

/* header */
.site-head {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--ground) 86%, transparent);
  backdrop-filter: saturate(1.2) blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-head .wrap {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding-block: .7rem;
}
.brand {
  display: flex; align-items: center; gap: .65rem;
  font-family: "Fredoka", sans-serif; font-weight: 600; font-size: 1.25rem;
  color: var(--ink); text-decoration: none;
}
.brand img { width: 38px; height: 38px; border-radius: 10px; box-shadow: 0 0 0 2px var(--paper), 0 0 0 3px var(--line); }
.site-nav { display: flex; gap: 1.4rem; font-size: .95rem; }
.site-nav a { text-decoration: none; color: var(--ink-2); }
.site-nav a:hover { color: var(--ink); }

/* hero */
.hero { padding-block: clamp(3rem, 8vw, 6rem); }
.hero .wrap {
  display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(2rem, 5vw, 5rem); align-items: center;
}
.hero h1 { margin-bottom: 1.2rem; }
.hero .actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 2rem; }

/* the mascot presented the way the app presents a sticker:
   white border, then the magenta cut line just outside it */
.sticker-stage {
  position: relative;
  display: grid; place-items: center;
  padding: clamp(1.2rem, 4vw, 2.4rem);
  background:
    linear-gradient(var(--line) 1px, transparent 1px) 0 0 / 24px 24px,
    linear-gradient(90deg, var(--line) 1px, transparent 1px) 0 0 / 24px 24px,
    var(--paper-2);
  border-radius: var(--radius);
}
.sticker {
  position: relative;
  width: min(100%, 360px);
  border-radius: 28%;
  padding: 10px;                 /* the white border, ~3 mm at this scale */
  background: #fff;
  box-shadow: var(--shadow);
}
.sticker::after {               /* CutContour */
  content: "";
  position: absolute; inset: -3px;
  border-radius: calc(28% + 3px);
  border: 1px solid var(--cut);
  pointer-events: none;
}
.sticker img { border-radius: calc(28% - 6px); }
.sticker-spec {
  margin-top: 1.1rem;
  font-size: .8rem; color: var(--ink-3);
  display: flex; gap: .9rem; flex-wrap: wrap; justify-content: center;
}
.sticker-spec .cut { color: var(--cut); }

/* buttons */
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .7rem 1.25rem; border-radius: 999px;
  font-weight: 600; font-size: .98rem; text-decoration: none;
  border: 1px solid transparent; line-height: 1.3;
}
.btn-primary { background: var(--green); color: var(--green-ink); }
.btn-primary:hover { background: var(--green-2); color: var(--green-ink); }
.btn-ghost { background: var(--green-soft); color: var(--green); border-color: transparent; }
.btn-ghost:hover { background: color-mix(in srgb, var(--green-soft) 70%, var(--green) 30%); color: var(--green-2); }
.btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; }

/* purpose */
.pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; margin-top: 2.5rem; }
.pillar { display: grid; gap: .5rem; padding-top: 1.1rem; border-top: 3px solid var(--sun); }
.pillar:nth-child(2) { border-top-color: var(--orange); }
.pillar:nth-child(3) { border-top-color: var(--green); }
.pillar p { color: var(--ink-2); font-size: .98rem; }

/* products */
.product-tile {
  margin-top: 2.5rem;
  display: grid; grid-template-columns: 160px 1fr; gap: 2rem; align-items: start;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: clamp(1.4rem, 3vw, 2.2rem);
  box-shadow: var(--shadow);
}
.product-tile .icon { position: relative; }
.product-tile .icon img { border-radius: 22.4%; box-shadow: 0 0 0 5px #fff; }
.product-tile .icon::after {
  content: ""; position: absolute; inset: -8px; border-radius: 26%;
  border: 1px solid var(--cut); pointer-events: none;
}
.product-summary { margin-top: .65rem; color: var(--ink-2); }
.product-bpm, .product-scanner { scroll-margin-top: 6rem; }
.product-bpm .icon img { width: 100%; background: #6001d2; box-shadow: 0 0 0 5px #6001d2; }
.product-features { margin: 1.5rem 0 0; display: grid; gap: 1rem; max-width: var(--measure); }
.product-features > div { padding-left: 1rem; border-left: 3px solid var(--sun); }
.product-features dt { font-weight: 700; color: var(--ink); }
.product-features dd { margin: .3rem 0 0; font-size: .95rem; color: var(--ink-2); }
.development-note {
  margin-top: 1.4rem; padding-top: 1rem; border-top: 1px solid var(--line);
  font-size: .9rem; color: var(--green);
}
.tags { display: flex; flex-wrap: wrap; gap: .45rem; margin: .8rem 0 1rem; }
.tag {
  font-size: .78rem; padding: .18rem .65rem; border-radius: 999px;
  background: var(--green-soft); color: var(--green); font-weight: 500;
}
.product-tile .actions { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 1.4rem; }
.note { font-size: .88rem; color: var(--ink-3); }

/* footer */
.site-foot { border-top: 1px solid var(--line); padding-block: 2rem; font-size: .88rem; color: var(--ink-3); }
.site-foot .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; }
.site-foot a { color: var(--ink-2); }

/* ---------- product page ---------- */
.page-hero { padding-block: clamp(2.5rem, 6vw, 5rem); }
.page-hero .wrap { display: grid; grid-template-columns: 1fr auto; gap: 2rem; align-items: end; }
.page-hero .icon { width: 132px; }
.page-hero .icon img { border-radius: 22.4%; box-shadow: 0 0 0 5px #fff, var(--shadow); }
.crumb { font-size: .9rem; margin-bottom: 1.2rem; }
.crumb a { text-decoration: none; color: var(--ink-3); }
.crumb a:hover { color: var(--ink); }

.story { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.story blockquote {
  margin: 0; padding: 1.4rem 1.6rem;
  background: var(--paper); border-left: 4px solid var(--sun); border-radius: 0 16px 16px 0;
  font-size: 1.05rem; color: var(--ink-2);
}
.story blockquote footer { margin-top: .8rem; font-size: .85rem; color: var(--ink-3); }

/* steps: this IS a sequence (upload → edit → output), so it is numbered */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; margin-top: 2.5rem; counter-reset: step; }
.step {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.5rem; display: grid; gap: .6rem; align-content: start;
}
.step::before {
  counter-increment: step; content: counter(step, decimal-leading-zero);
  font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: .85rem; color: var(--orange);
  letter-spacing: .1em;
}
.step ul { margin: .2rem 0 0; padding-left: 1.1rem; color: var(--ink-2); font-size: .95rem; }
.step li + li { margin-top: .25rem; }

.outputs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.2rem; margin-top: 2.2rem; }
.output { padding: 1.1rem 1.2rem; border-radius: 16px; background: var(--green-soft); display: grid; gap: .3rem; }
.output strong { color: var(--green); font-family: "Fredoka", "Noto Sans TC", sans-serif; font-size: 1.05rem; }
.output span { font-size: .9rem; color: var(--ink-2); }

.shots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; margin-top: 2.5rem; }
.shot figure { margin: 0; display: grid; gap: .7rem; }
.shot img { border-radius: 26px; border: 1px solid var(--line); box-shadow: var(--shadow); background: var(--paper); }
.shot figcaption { font-size: .88rem; color: var(--ink-2); text-align: center; }

.spec { margin-top: 2rem; overflow-x: auto; }
.spec table { border-collapse: collapse; width: 100%; min-width: 560px; font-size: .95rem; }
.spec th, .spec td { text-align: left; padding: .8rem .6rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.spec th { width: 32%; font-weight: 600; color: var(--ink); }
.spec td { color: var(--ink-2); }

.get { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(1.5rem, 4vw, 2.5rem); display: grid; grid-template-columns: 1fr auto; gap: 1.5rem; align-items: center; }
.get .actions { display: flex; flex-wrap: wrap; gap: .7rem; }

@media (max-width: 860px) {
  .hero .wrap, .story, .page-hero .wrap, .get { grid-template-columns: 1fr; }
  .page-hero .wrap { align-items: start; }
  .pillars, .steps, .shots { grid-template-columns: 1fr; }
  .outputs { grid-template-columns: 1fr 1fr; }
  .product-tile { grid-template-columns: 1fr; }
  .product-tile .icon { width: 120px; }
  .site-nav { gap: 1rem; font-size: .9rem; }
}
@media (max-width: 480px) {
  .site-head .wrap { flex-wrap: wrap; row-gap: .4rem; }
  .brand { white-space: nowrap; }
  .site-nav { gap: .8rem; font-size: .88rem; }
  .site-nav a { white-space: nowrap; }
}
@media (prefers-reduced-motion: no-preference) {
  .btn, .site-nav a { transition: background-color .15s, color .15s; }
}

/* language toggle */
.site-nav .lang {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: .8rem; letter-spacing: .06em;
  padding: .2rem .6rem; border-radius: 999px;
  border: 1px solid var(--line); color: var(--ink-2); background: var(--paper);
}
.site-nav .lang:hover { border-color: var(--green); color: var(--green); }

/* how the work splits: one bar, four parts */
.recipe { margin-top: 2.2rem; display: grid; gap: .7rem; max-width: 34rem; }
.recipe-bar { display: flex; height: 10px; border-radius: 999px; overflow: hidden; background: var(--paper-2); }
.recipe-bar span { display: block; height: 100%; }
.recipe-bar .r1 { background: var(--sun); }
.recipe-bar .r2 { background: var(--orange); }
.recipe-bar .r3 { background: var(--green); }
.recipe-bar .r4 { background: var(--ink-3); }
.recipe-bar .r5 { background: var(--cut); }
.recipe-bar .r6 { background: var(--ink); }
.recipe-key { display: flex; flex-wrap: wrap; gap: .4rem 1.2rem; font-size: .88rem; color: var(--ink-2); }
.recipe-key li { list-style: none; display: flex; align-items: center; gap: .45rem; }
.recipe-key i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.recipe-key b { font-family: "IBM Plex Mono", ui-monospace, monospace; font-weight: 500; color: var(--ink); font-variant-numeric: tabular-nums; }
.recipe-key ul { margin: 0; padding: 0; display: contents; }

/* about */
.about-intro { display: grid; grid-template-columns: 200px 1fr; gap: clamp(1.5rem, 4vw, 3rem); align-items: start; }
.about-photo { position: relative; width: 200px; }
.about-photo img { border-radius: 22.4%; box-shadow: 0 0 0 5px #fff, var(--shadow); }
.about-photo::after { content: ""; position: absolute; inset: -8px; border-radius: 26%; border: 1px solid var(--cut); pointer-events: none; }
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; margin-top: 2.5rem; }
.about-grid ul, .about-grid ol { margin: .2rem 0 0; padding-left: 1.1rem; color: var(--ink-2); font-size: .95rem; }
.about-grid li + li { margin-top: .5rem; }
.about-grid li b { color: var(--ink); font-weight: 600; }
.nowrap { white-space: nowrap; }
@media (max-width: 860px) {
  .about-intro, .about-grid { grid-template-columns: 1fr; }
  .about-photo { width: 140px; }
}

/* multiple product tiles on the home page */
.product-list { display: grid; gap: 1.5rem; margin-top: 2.5rem; }
.product-list .product-tile { margin-top: 0; }
.product-tile h3 { font-size: 1.45rem; }
.product-tile .tagline { color: var(--ink-2); margin-top: .2rem; }
.tag.soon { background: color-mix(in srgb, var(--sun) 35%, var(--paper)); color: var(--ink); }

/* unordered facets (not a sequence, so not numbered) */
.facets { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; margin-top: 2.5rem; }
.facet { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; display: grid; gap: .6rem; align-content: start; }
.facet p { color: var(--ink-2); font-size: .98rem; }
@media (max-width: 860px) { .facets { grid-template-columns: 1fr; } }

/* Shared princess icon for home and product pages. */
.product-tile .bpm-icon img,
.page-hero .bpm-icon img {
  width: 100%;
  box-shadow: none;
}
.product-tile .bpm-icon::after { content: none; }
