/* ArtBorder — Mobile editorial (4-act) */

:root {
  --accent: #FF9500;
  --bg: #FAF9F6;
  --bg-top: #FCFBF8;
  --bg-mid: #F6F2EC;
  --bg-bottom: #F0EBE3;
  --bg-outer: #E6E1D9;
  --accent-glow: rgba(255, 149, 0, 0.09);
  --accent-glow-soft: rgba(255, 176, 80, 0.06);
  --ink: #1A1A1A;
  --text-secondary: #8A8A8A;
  --text-tertiary: #BFBFBF;
  --phone-max: 430px;
  --page-x: max(28px, env(safe-area-inset-left, 28px));
  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "PingFang SC", sans-serif;
  --font-display: "Songti SC", "STSong", "Instrument Serif", Georgia, serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.47;
  color: var(--ink);
  background: var(--bg-outer);
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
}

body.site-mobile {
  position: relative;
  width: 100%;
  max-width: var(--phone-max);
  min-height: 100dvh;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  isolation: isolate;
  background-color: var(--bg-top);
  background-image:
    radial-gradient(ellipse 130% 55% at 50% -8%, var(--accent-glow) 0%, transparent 58%),
    radial-gradient(ellipse 70% 45% at 100% 28%, var(--accent-glow-soft) 0%, transparent 52%),
    radial-gradient(ellipse 60% 40% at 0% 72%, rgba(210, 198, 180, 0.1) 0%, transparent 50%),
    linear-gradient(180deg, var(--bg-top) 0%, var(--bg-mid) 48%, var(--bg-bottom) 100%);
  box-shadow:
    0 0 0 1px rgba(26, 26, 26, 0.04),
    0 24px 80px rgba(40, 32, 20, 0.08);
}

.page-home {
  background-image:
    radial-gradient(ellipse 120% 50% at 50% 0%, rgba(255, 149, 0, 0.11) 0%, transparent 62%),
    radial-gradient(ellipse 90% 55% at 50% 42%, rgba(255, 196, 120, 0.07) 0%, transparent 68%),
    radial-gradient(ellipse 70% 45% at 100% 28%, var(--accent-glow-soft) 0%, transparent 52%),
    radial-gradient(ellipse 60% 40% at 0% 72%, rgba(210, 198, 180, 0.1) 0%, transparent 50%),
    linear-gradient(180deg, var(--bg-top) 0%, var(--bg-mid) 48%, var(--bg-bottom) 100%);
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }

html[lang="en"] .lang-zh { display: none !important; }
html:not([lang="en"]) .lang-en { display: none !important; }

.site-grain {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: var(--phone-max);
  height: 100%;
  pointer-events: none;
  z-index: 0;
  opacity: 0.28;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.55'/%3E%3C/svg%3E");
  background-size: 180px 180px;
}

/* ── Nav ── */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  padding: max(12px, env(safe-area-inset-top)) var(--page-x) 0;
  background: rgba(252, 251, 248, 0.72);
  backdrop-filter: blur(18px) saturate(1.2);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
  border-bottom: 1px solid rgba(26, 26, 26, 0.04);
}

.site-nav__inner {
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-nav__brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.site-nav__logo {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  display: block;
  flex-shrink: 0;
}

.site-nav__name {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.site-nav__version {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--text-tertiary);
  margin-left: 6px;
  transform: translateY(1px);
}

.lang-toggle {
  background: none;
  border: none;
  padding: 8px 0;
  font-size: 15px;
  color: var(--text-secondary);
  cursor: pointer;
  font-family: inherit;
}

main { flex: 1; position: relative; z-index: 1; }

.container {
  padding: 0 var(--page-x);
}

/* ── Act 1: Hero ── */
.act-hero {
  padding: 11vh var(--page-x) 1vh;
}

.act-hero__title {
  font-weight: 400;
  color: var(--ink);
}

.hero-headline {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  max-width: 18em;
}

.hero-lead,
.hero-focus {
  display: block;
  margin: 0;
  padding: 0;
  text-align: left;
  text-indent: 0;
}

.hero-lead {
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: 0;
  color: var(--text-secondary);
}

.hero-focus {
  font-family: var(--font-display);
  font-size: clamp(34px, 9vw, 42px);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: 0;
  color: var(--ink);
}

html:not([lang="en"]) .hero-focus {
  margin-left: -0.11em;
}

html[lang="en"] .hero-lead {
  font-size: 14px;
  letter-spacing: 0;
  line-height: 1.45;
}

html[lang="en"] .hero-focus {
  font-family: "Instrument Serif", Georgia, serif;
  font-size: clamp(32px, 8.5vw, 40px);
  letter-spacing: 0;
  margin-left: -0.06em;
}

/* ── Act 2: Showcase ── */
.act-showcase {
  position: relative;
  padding: 4vh 0 8vh;
  overflow: visible;
}

.act-showcase::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 46%;
  transform: translate(-50%, -50%);
  width: 88%;
  height: 72%;
  background: radial-gradient(ellipse at center, rgba(255, 149, 0, 0.1) 0%, rgba(255, 196, 120, 0.04) 42%, transparent 72%);
  pointer-events: none;
  z-index: 0;
}

.act-showcase .showcase,
.act-showcase .lightbox {
  position: relative;
  z-index: 1;
}

.showcase__viewport {
  overflow-x: auto;
  overflow-y: visible;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
}

.showcase__viewport::-webkit-scrollbar { display: none; }

.showcase__track {
  display: flex;
  align-items: flex-start;
  gap: 0;
  padding: 0 calc((100% - 72%) / 2);
}

.showcase__slide {
  flex: 0 0 72%;
  scroll-snap-align: center;
  background: none;
  border: none;
  padding: 20px 6px;
  cursor: pointer;
  opacity: 0.35;
  transform: scale(0.96);
  transform-origin: center top;
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  -webkit-user-select: none;
}

.showcase__slide.is-active {
  opacity: 1;
  transform: scale(1);
}

.showcase__slide img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
  border-radius: 0;
  pointer-events: none;
  -webkit-user-drag: none;
  user-drag: none;
  filter: drop-shadow(0 14px 32px rgba(40, 32, 20, 0.14));
}

.showcase__counter {
  margin-top: 28px;
  text-align: center;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.12em;
  font-variant-numeric: tabular-nums;
  color: var(--text-tertiary);
}

.showcase__counter-sep {
  margin: 0 2px;
}

/* ── Act 3: Features (3 pillars) ── */
.act-features {
  padding: 0 var(--page-x) 10vh;
}

.pillars {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.pillar {
  padding: 28px 0;
  border-top: 1px solid rgba(26, 26, 26, 0.07);
}

.pillar:last-child {
  border-bottom: 1px solid rgba(26, 26, 26, 0.07);
}

.pillar__title {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.022em;
  margin-bottom: 6px;
}

.pillar__desc {
  font-size: 13px;
  line-height: 1.5;
  letter-spacing: -0.01em;
  color: var(--text-secondary);
}

.features-note {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid rgba(26, 26, 26, 0.07);
  font-size: 13px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: var(--text-tertiary);
  text-align: center;
}

/* ── Act 4: Works gallery ── */
.act-works {
  position: relative;
  padding: 4vh 0 6vh;
  overflow: visible;
}

.works-note {
  margin-top: 20px;
  padding: 0 var(--page-x);
  font-size: 12px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: var(--text-tertiary);
  text-align: center;
}

.showcase--works .showcase__track {
  padding: 0 calc((100% - 76%) / 2);
}

.showcase--works .showcase__slide {
  flex: 0 0 76%;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 42vh;
  padding: 16px 8px;
}

.showcase--works .showcase__slide img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 42vh;
  object-fit: contain;
  filter: drop-shadow(0 18px 40px rgba(40, 32, 20, 0.16));
}

.lightbox--works .lightbox__img {
  max-width: 90vw;
  max-height: 78dvh;
  aspect-ratio: auto;
  object-fit: contain;
}

/* ── Act 5: CTA ── */
.act-cta {
  padding: 0 var(--page-x) calc(12vh + env(safe-area-inset-bottom, 0px));
}

.act-cta__inner {
  display: flex;
  justify-content: center;
}

.btn-store {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 280px;
  min-height: 50px;
  padding: 14px 32px;
  background: #454548;
  color: #FAF9F6;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.022em;
  border-radius: 980px;
  transition: background 0.2s var(--ease), transform 0.15s var(--ease);
}

@supports (corner-shape: superellipse(1.12)) {
  .btn-store {
    border-radius: 25px;
    corner-shape: superellipse(1.12);
  }
}

.btn-store:active {
  background: #3A3A3D;
  transform: scale(0.98);
}

/* ── Lightbox ── */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(0, 0, 0, 0.9);
  display: grid;
  place-items: center;
  padding: max(20px, env(safe-area-inset-top)) 16px max(20px, env(safe-area-inset-bottom));
}

.lightbox[hidden] { display: none; }
body.lightbox-open { overflow: hidden; }

.lightbox__img {
  max-width: 85vw;
  max-height: 80dvh;
  aspect-ratio: 732 / 1513;
  object-fit: contain;
  border-radius: 0;
  filter: drop-shadow(0 20px 48px rgba(0, 0, 0, 0.35));
}

.lightbox__close,
.lightbox__prev,
.lightbox__next {
  position: absolute;
  border: none;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 22px;
  cursor: pointer;
}

.lightbox__close { top: max(16px, env(safe-area-inset-top)); right: 16px; font-size: 28px; }
.lightbox__prev { left: 12px; top: 50%; transform: translateY(-50%); }
.lightbox__next { right: 12px; top: 50%; transform: translateY(-50%); }

/* ── Doc pages ── */
.doc-page {
  padding: 6vh var(--page-x) calc(8vh + env(safe-area-inset-bottom, 0px));
}

.doc-page h1 {
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 400;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.doc-page .updated {
  color: var(--text-tertiary);
  font-size: 13px;
  margin-bottom: 28px;
}

.doc-page h2 {
  font-size: 18px;
  font-weight: 600;
  margin-top: 32px;
  margin-bottom: 10px;
}

.doc-page p,
.doc-page li {
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-secondary);
}

.doc-page p { margin-bottom: 10px; }
.doc-page ul { padding-left: 18px; margin-bottom: 10px; }

.help-grid {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-bottom: 28px;
}

.help-card {
  padding: 24px 0;
  border-bottom: 1px solid rgba(26, 26, 26, 0.08);
}

.help-card__tag {
  font-size: 11px;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 8px;
  letter-spacing: 0.04em;
}

.help-card__title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 4px;
}

.help-card__desc {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.support-subtitle {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.support-list {
  padding-left: 18px;
  margin-bottom: 28px;
}

.support-list li {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.help-sections {
  margin-bottom: 28px;
}

.help-section {
  padding: 20px 0;
  border-bottom: 1px solid rgba(26, 26, 26, 0.08);
}

.help-section:last-child {
  border-bottom: none;
}

.help-section__title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 10px;
}

.help-section__list {
  padding-left: 18px;
}

.help-section__list li {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.faq-group {
  margin-bottom: 28px;
}

.faq-group .faq-details:last-child {
  border-bottom: 1px solid rgba(26, 26, 26, 0.08);
}

.contact-card {
  padding: 20px;
  background: rgba(26, 26, 26, 0.03);
  border-radius: 12px;
  margin-bottom: 28px;
}

.contact-card p { font-size: 14px; margin-bottom: 4px; }

.faq-details {
  border-top: 1px solid rgba(26, 26, 26, 0.08);
  border-bottom: 1px solid rgba(26, 26, 26, 0.08);
  margin-bottom: 28px;
}

.faq-details summary {
  padding: 20px 0;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}

.faq-details summary::-webkit-details-marker { display: none; }
.faq-details summary::after { content: "+"; float: right; color: var(--text-tertiary); font-weight: 400; }
.faq-details[open] summary::after { content: "−"; }

.faq-details__answer {
  padding-bottom: 20px;
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.55;
}

.doc-page a { color: var(--accent); }

/* ── Footer ── */
.site-footer {
  padding: 6vh var(--page-x) calc(4vh + env(safe-area-inset-bottom, 0px));
}

.site-footer__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  text-align: center;
}

.site-footer__links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 20px;
  list-style: none;
}

.site-footer__links a {
  font-size: 13px;
  color: var(--text-secondary);
}

.site-footer__copy {
  font-size: 11px;
  color: var(--text-tertiary);
}

@media (prefers-reduced-motion: reduce) {
  .showcase__slide { transition: none; }
}
