/* Offlinova homepage design preview — original visual system.
   Not for development or deployment. */

@font-face {
  font-family: "Fraunces";
  src: url("fonts/Fraunces.ttf") format("truetype");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Fraunces";
  src: url("fonts/Fraunces-Italic.ttf") format("truetype");
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Sans";
  src: url("fonts/InstrumentSans.ttf") format("truetype");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Sans";
  src: url("fonts/InstrumentSans-Italic.ttf") format("truetype");
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Serif";
  src: url("fonts/InstrumentSerif.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Serif";
  src: url("fonts/InstrumentSerif-Italic.ttf") format("truetype");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

:root {
  --paper: #F3EEE4;
  --paper-deep: #E8E1D2;
  --surface: #FFFCF6;
  --ink: #1A1714;
  --ink-soft: #5C564D;
  --ink-faint: #8A8378;
  --line: #D6CEBE;
  --line-strong: #C4BBAA;
  --brand: #311F94;
  --brand-deep: #24166E;
  --copper: #C45C26;
  --copper-deep: #9E481C;
  --copper-soft: #F3E1D4;
  --cream: #F4EFE6;
  --footer: #1A1714;
  --preview-bg: #2A251F;
  --preview-fg: #F4EFE6;
  --preview-muted: #C8BCA9;
  --success: #2A6B4E;
  --font-display: "Fraunces", "Times New Roman", serif;
  --font-sans: "Instrument Sans", "Segoe UI", sans-serif;
  --font-serif: "Instrument Serif", "Times New Roman", serif;
  --font-cjk: "Noto Sans CJK SC", "Noto Sans SC", "Source Han Sans SC", sans-serif;
  --wrap: 1180px;
  --gutter: 48px;
  --radius: 12px;
  --header-h: 76px;
  --ease: cubic-bezier(.22, 1, .36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; }
h1, h2, h3, p { margin: 0; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

.wrap {
  width: min(var(--wrap), calc(100% - var(--gutter) * 2));
  margin-inline: auto;
}

/* ——— Preview banner (required) ——— */
.preview-banner {
  background: var(--preview-bg);
  color: var(--preview-fg);
  text-align: center;
  padding: 9px 20px 10px;
  position: sticky;
  top: 0;
  z-index: 80;
}
.preview-banner .en {
  font-size: 12px;
  letter-spacing: 0.06em;
  font-weight: 500;
}
.preview-banner .en::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #D89A4A;
  margin-right: 10px;
  vertical-align: 1px;
}
.preview-banner .zh {
  display: block;
  margin-top: 2px;
  font-family: var(--font-cjk), var(--font-sans);
  font-size: 11px;
  color: var(--preview-muted);
  letter-spacing: 0.08em;
}

/* ——— Header ——— */
.masthead {
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--paper) 88%, white);
  position: sticky;
  top: 52px;
  z-index: 70;
  backdrop-filter: blur(10px);
}
.masthead-inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 28px;
  min-height: var(--header-h);
}
.logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
.logo img {
  height: 30px;
  width: auto;
}
.primary-nav {
  display: flex;
  align-items: center;
  gap: 2px;
  justify-content: center;
}
.primary-nav a {
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.01em;
  padding: 8px 11px;
  color: var(--ink-soft);
  border-radius: 6px;
  transition: color 160ms var(--ease), background 160ms var(--ease);
}
.primary-nav a:hover,
.primary-nav a:focus-visible {
  color: var(--ink);
  background: color-mix(in srgb, var(--paper-deep) 70%, white);
}
.primary-nav a.is-current {
  color: var(--brand);
}
.search {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 230px;
  height: 40px;
  padding: 0 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  transition: border-color 160ms var(--ease), box-shadow 160ms var(--ease);
}
.search:focus-within {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 16%, transparent);
}
.search svg {
  width: 16px;
  height: 16px;
  stroke: var(--ink-faint);
  fill: none;
  stroke-width: 1.7;
  flex-shrink: 0;
}
.search input {
  border: 0;
  outline: 0;
  background: transparent;
  width: 100%;
  font-size: 13.5px;
  letter-spacing: 0.01em;
}
.search input::placeholder { color: var(--ink-faint); }
.search input::-webkit-search-cancel-button { -webkit-appearance: none; }

.menu-toggle,
.mobile-cats,
.mobile-search {
  display: none;
}

/* ——— Hero ——— */
.hero {
  padding: 72px 0 28px;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 72px;
  align-items: center;
}
.eyebrow {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: 18px;
}
.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(3rem, 5.2vw, 4.6rem);
  font-weight: 500;
  line-height: 1.04;
  letter-spacing: -0.03em;
  font-variation-settings: "SOFT" 30, "WONK" 0, "opsz" 72;
  color: var(--ink);
}
.hero h1 em {
  font-style: italic;
  font-weight: 450;
  font-variation-settings: "SOFT" 60, "WONK" 1, "opsz" 72;
  color: var(--brand);
}
.lede {
  margin-top: 22px;
  max-width: 36em;
  font-size: 17.5px;
  line-height: 1.55;
  color: var(--ink-soft);
}
.hero-actions {
  margin-top: 28px;
  display: flex;
  align-items: center;
  gap: 18px;
}
.link-arrow {
  font-size: 15px;
  font-weight: 550;
  color: var(--brand);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid color-mix(in srgb, var(--brand) 35%, transparent);
  padding-bottom: 2px;
}
.link-arrow:hover { border-bottom-color: var(--brand); }

/* Workbench */
.workbench {
  background: var(--brand);
  color: var(--cream);
  border-radius: var(--radius);
  padding: 28px 26px 26px;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.14),
    0 22px 48px rgba(26, 23, 20, 0.14);
}
.workbench-kicker {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--cream) 70%, #9aa0d8);
  margin-bottom: 8px;
}
.workbench h2 {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 500;
  letter-spacing: -0.02em;
  font-variation-settings: "SOFT" 40, "WONK" 0, "opsz" 28;
  line-height: 1.15;
}
.workbench .hint {
  margin-top: 8px;
  font-size: 14px;
  line-height: 1.5;
  color: color-mix(in srgb, var(--cream) 78%, #8b90c8);
}
.dropzone {
  margin-top: 22px;
  border: 1.5px dashed color-mix(in srgb, var(--cream) 42%, transparent);
  border-radius: 10px;
  min-height: 168px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  text-align: center;
  padding: 24px 16px;
  background: color-mix(in srgb, black 10%, var(--brand));
}
.dropzone .glyph {
  width: 36px;
  height: 36px;
  color: var(--cream);
  opacity: 0.85;
}
.dropzone p {
  font-size: 14px;
  color: color-mix(in srgb, var(--cream) 82%, white);
  max-width: 22em;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 42px;
  padding: 0 18px;
  border-radius: 8px;
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: background 160ms var(--ease), transform 160ms var(--ease), box-shadow 160ms var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn-copper {
  background: var(--copper);
  color: #fffaf6;
}
.btn-copper:hover { background: var(--copper-deep); }
.btn-ghost {
  background: transparent;
  color: var(--cream);
  border: 1px solid color-mix(in srgb, var(--cream) 35%, transparent);
}
.btn-ghost:hover {
  background: color-mix(in srgb, white 8%, transparent);
}
.btn-ink {
  background: var(--ink);
  color: var(--cream);
}
.btn-ink:hover { background: #000; }
.btn-line {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line-strong);
}
.btn-line:hover { background: var(--paper-deep); }
.workbench-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

/* ——— Steps ——— */
.steps {
  padding: 56px 0 8px;
}
.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.step {
  padding: 28px 32px 28px 0;
  position: relative;
}
.step + .step {
  padding-left: 32px;
  border-left: 1px solid var(--line);
}
.step-num {
  font-family: var(--font-display);
  font-size: 13px;
  font-variation-settings: "SOFT" 20, "opsz" 14, "WONK" 0;
  letter-spacing: 0.08em;
  color: var(--brand);
  font-weight: 600;
}
.step h3 {
  margin-top: 8px;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.02em;
  font-variation-settings: "SOFT" 35, "opsz" 22, "WONK" 0;
}
.step p {
  margin-top: 8px;
  font-size: 14.5px;
  color: var(--ink-soft);
  max-width: 28em;
}

/* ——— Catalog ——— */
.catalog {
  padding: 72px 0 88px;
}
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}
.section-head h2 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 3.4vw, 2.75rem);
  font-weight: 500;
  letter-spacing: -0.03em;
  font-variation-settings: "SOFT" 40, "opsz" 36, "WONK" 0;
  line-height: 1.1;
}
.section-head p {
  font-size: 15px;
  color: var(--ink-soft);
  max-width: 28em;
  text-align: right;
}
.plates {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.plate {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 26px 12px;
  box-shadow: 0 1px 0 rgba(26,23,20,0.03);
  display: flex;
  flex-direction: column;
  min-height: 100%;
}
.plate-top {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 16px 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 4px;
}
.plate-idx {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  color: var(--brand);
  letter-spacing: 0.08em;
  padding-top: 6px;
}
.plate-top h3 {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1;
  font-variation-settings: "SOFT" 40, "opsz" 32, "WONK" 0;
}
.plate-top p {
  grid-column: 2;
  font-size: 14px;
  color: var(--ink-soft);
  margin-top: -4px;
}
.catalog-note {
  margin: -8px 0 24px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink-soft);
  max-width: 46em;
}
.catalog-note a {
  color: var(--brand);
  font-weight: 550;
  border-bottom: 1px solid color-mix(in srgb, var(--brand) 35%, transparent);
}
.catalog-note a:hover { border-bottom-color: var(--brand); }

.tool-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.tool-list a,
.tool-list .tool-item {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 4px;
  border-bottom: 1px solid color-mix(in srgb, var(--line) 80%, transparent);
}
.tool-list a {
  transition: color 160ms var(--ease), padding-left 160ms var(--ease);
}
.tool-list li:last-child a,
.tool-list li:last-child .tool-item { border-bottom: 0; }
.tool-list a:hover,
.tool-list a:focus-visible {
  color: var(--brand);
  padding-left: 6px;
}
.tool-name {
  font-size: 15.5px;
  font-weight: 500;
  letter-spacing: -0.01em;
}
.tool-blurb {
  font-size: 13px;
  color: var(--ink-faint);
  text-align: right;
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tool-list a:hover .tool-blurb { color: var(--brand); }

/* ——— Footer ——— */
.site-footer {
  background: var(--footer);
  color: var(--cream);
  padding: 64px 0 36px;
  position: relative;
  overflow: hidden;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 48px;
  position: relative;
  z-index: 1;
}
.footer-brand img {
  height: 28px;
  width: auto;
}
.footer-brand p {
  margin-top: 18px;
  font-size: 14.5px;
  line-height: 1.6;
  color: color-mix(in srgb, var(--cream) 72%, #8a8378);
  max-width: 32em;
}
.footer-col h4 {
  margin: 0 0 14px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--cream) 55%, #8a8378);
}
.footer-col a {
  display: block;
  font-size: 14.5px;
  padding: 5px 0;
  color: color-mix(in srgb, var(--cream) 86%, white);
}
.footer-col a:hover { color: #fff; }
.footer-note {
  margin-top: 48px;
  padding-top: 28px;
  border-top: 1px solid color-mix(in srgb, var(--cream) 14%, transparent);
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: flex-start;
  position: relative;
  z-index: 1;
}
.footer-note p {
  font-size: 12.5px;
  line-height: 1.6;
  color: color-mix(in srgb, var(--cream) 55%, #8a8378);
  max-width: 54em;
}
.footer-note small {
  font-size: 12.5px;
  color: color-mix(in srgb, var(--cream) 48%, #8a8378);
  white-space: nowrap;
}

/* ——— Tool page ——— */
.tool-page .crumbs {
  padding: 28px 0 8px;
  font-size: 13px;
  color: var(--ink-faint);
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.tool-page .crumbs a { color: var(--ink-soft); }
.tool-page .crumbs a:hover { color: var(--brand); }
.tool-page .crumbs .sep { opacity: 0.5; }
.tool-hero {
  padding: 8px 0 28px;
  display: flex;
  justify-content: space-between;
  gap: 32px;
  align-items: flex-end;
}
.tool-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 4.4vw, 3.6rem);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.05;
  font-variation-settings: "SOFT" 35, "opsz" 48, "WONK" 0;
}
.tool-hero .deck {
  margin-top: 10px;
  font-size: 16.5px;
  color: var(--ink-soft);
  max-width: 32em;
}
.tool-meta {
  font-size: 13px;
  color: var(--ink-faint);
  text-align: right;
  max-width: 22em;
  line-height: 1.5;
}
.tool-meta strong {
  display: block;
  color: var(--brand);
  font-weight: 600;
  letter-spacing: 0.08em;
  font-size: 11px;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.studio {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  padding-bottom: 20px;
}
.pane {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 540px;
}
.pane-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--paper) 65%, var(--surface));
}
.pane-bar h2 {
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.pane-bar span {
  font-size: 12.5px;
  color: var(--ink-faint);
}
.stage {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  min-height: 380px;
}
.stage-photo {
  width: 100%;
  height: 100%;
  min-height: 380px;
  border-radius: 8px;
  overflow: hidden;
  background: #e8d3bc;
}
.stage-photo svg { width: 100%; height: 100%; display: block; }
.stage-result {
  width: 100%;
  min-height: 380px;
  border-radius: 8px;
  background-color: #f6f1e6;
  background-image:
    linear-gradient(45deg, #e4dccb 25%, transparent 25%),
    linear-gradient(-45deg, #e4dccb 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #e4dccb 75%),
    linear-gradient(-45deg, transparent 75%, #e4dccb 75%);
  background-size: 18px 18px;
  background-position: 0 0, 0 9px, 9px -9px, -9px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.stage-result img {
  width: 82%;
  max-width: 480px;
  height: auto;
  max-height: 360px;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 16px 16px rgba(26,23,20,0.12));
}
.stage-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.pane-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-top: 1px solid var(--line);
  background: var(--surface);
}
.file-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.file-chip .mark {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: var(--paper-deep);
  color: var(--brand);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.file-chip p { font-size: 13.5px; font-weight: 550; }
.file-chip small { display: block; font-size: 12px; color: var(--ink-faint); font-weight: 400; }
.replace-link {
  font-size: 13px;
  font-weight: 550;
  color: var(--brand);
  border-bottom: 1px solid color-mix(in srgb, var(--brand) 30%, transparent);
}
.result-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

.honest-note {
  margin: 8px auto 80px;
  width: min(var(--wrap), calc(100% - var(--gutter) * 2));
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--ink-soft);
  padding: 14px 16px;
  border-left: 3px solid var(--brand);
  background: color-mix(in srgb, var(--surface) 80%, var(--paper));
}

/* ——— Mobile ——— */
@media (max-width: 920px) {
  :root { --gutter: 22px; --header-h: 60px; }
  .masthead { top: 58px; }
  .masthead-inner {
    grid-template-columns: 1fr auto;
    gap: 12px;
    min-height: 58px;
  }
  .primary-nav { display: none; }
  .search.desktop-only { display: none; }
  .menu-toggle {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 8px;
  }
  .menu-toggle svg { width: 22px; height: 22px; stroke: var(--ink); fill: none; stroke-width: 1.7; }
  .mobile-cats {
    display: flex;
    justify-content: space-between;
    gap: 0;
    overflow-x: auto;
    padding: 0 0 12px;
    scrollbar-width: none;
    border-bottom: 1px solid var(--line);
  }
  .mobile-cats::-webkit-scrollbar { display: none; }
  .mobile-cats a {
    flex: 0 0 auto;
    font-size: 13px;
    font-weight: 550;
    padding: 6px 5px;
    color: var(--ink-soft);
    border-radius: 999px;
  }
  .mobile-cats a.is-current {
    color: var(--brand);
    background: color-mix(in srgb, var(--brand) 8%, var(--surface));
  }
  .mobile-search {
    display: flex;
    width: 100%;
    margin: 10px 0 0;
  }
  .hero { padding: 36px 0 12px; }
  .hero-grid,
  .plates,
  .steps-grid,
  .studio,
  .footer-grid,
  .tool-hero {
    grid-template-columns: 1fr;
  }
  .hero-grid { gap: 32px; }
  .hero h1 { font-size: 2.55rem; letter-spacing: -0.03em; }
  .lede { font-size: 16px; }
  .section-head {
    flex-direction: column;
    align-items: flex-start;
  }
  .section-head p { text-align: left; }
  .step + .step {
    border-left: 0;
    padding-left: 0;
    border-top: 1px solid var(--line);
  }
  .step { padding: 22px 0; }
  .tool-hero { flex-direction: column; align-items: flex-start; gap: 16px; }
  .tool-meta { text-align: left; max-width: none; }
  .result-actions { width: 100%; }
  .result-actions .btn { flex: 1 1 auto; min-width: 44%; }
  .pane { min-height: 0; }
  .stage, .stage-photo, .stage-result { min-height: 280px; }
  .pane-foot { flex-wrap: wrap; }
  .footer-note { flex-direction: column; }
  .footer-note small { white-space: normal; }
  .catalog { padding: 52px 0 64px; }
}

@media (max-width: 420px) {
  .hero h1 { font-size: 2.25rem; }
  .workbench { padding: 22px 18px; }
  .plate { padding: 20px 16px 8px; }
  .tool-blurb { display: none; }
  .plate-top h3 { font-size: 28px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
