/* =============================================================
   AI is Your Wings — Allen & Winnie AI Experience (V2)
   Design: Apple-editorial · Slow living · Premium brand
   ============================================================= */

/* ---------- Design tokens ---------- */
:root {
  /* Brand colours */
  --primary:   #1E3A34;   /* deep forest green */
  --secondary: #C8B89A;   /* warm sand */
  --bg:        #F8F6F2;   /* soft paper */
  --text:      #222222;   /* ink */
  --accent:    #8C6A43;   /* bronze */

  --ink-soft:  #4a4a46;
  --line:      rgba(30, 58, 52, 0.14);

  /* Type */
  --serif: "Playfair Display", "Noto Serif TC", Georgia, serif;
  --sans:  "Inter", "Noto Sans TC", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  /* Rhythm */
  --pad: clamp(22px, 6vw, 120px);
  --maxw: 1240px;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--sans);
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
  font-weight: 400;
  letter-spacing: 0.01em;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

::selection { background: var(--secondary); color: var(--primary); }

/* ---------- Scroll progress ---------- */
.scroll-progress {
  position: fixed; top: 0; left: 0; right: 0; height: 2px;
  background: transparent; z-index: 100; pointer-events: none;
}
.scroll-progress span {
  display: block; height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--secondary));
  transition: width 0.1s linear;
}

/* ---------- Nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 90;
  display: flex; align-items: baseline; justify-content: space-between;
  padding: 22px var(--pad);
  color: #fff;
  mix-blend-mode: difference;
  transition: color .4s var(--ease);
}
.nav__brand { font-family: var(--serif); font-size: 1.05rem; letter-spacing: 0.04em; }
.nav__tag   { font-size: 0.72rem; letter-spacing: 0.28em; text-transform: uppercase; opacity: 0.85; }

/* ---------- Shared layout ---------- */
.section { padding: clamp(90px, 15vh, 200px) 0; }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--pad); }
.wrap--wide { max-width: 1500px; }

.kicker {
  font-size: 0.74rem; letter-spacing: 0.34em; text-transform: uppercase;
  color: var(--accent); font-weight: 500; margin-bottom: 26px;
}
.kicker--center { text-align: center; }

.display {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2.6rem, 7vw, 5.6rem);
  line-height: 1.04;
  letter-spacing: -0.01em;
  color: var(--primary);
}
.display--sm { font-size: clamp(3rem, 8vw, 6rem); }
.display--center { text-align: center; }

/* =============================================================
   HERO
   ============================================================= */
.hero {
  position: relative;
  height: 100svh; min-height: 620px;
  display: flex; align-items: center;
  overflow: hidden;
}
.hero__media { position: absolute; inset: -8% 0; z-index: 0; will-change: transform; }
.hero__media img { width: 100%; height: 100%; object-fit: cover; }
.hero__scrim {
  position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(20,30,26,0.62) 0%, rgba(20,30,26,0.28) 42%, rgba(20,30,26,0) 72%),
    linear-gradient(0deg, rgba(20,30,26,0.42) 0%, rgba(20,30,26,0) 46%);
}
.hero__inner {
  position: relative; z-index: 2;
  padding: 0 var(--pad);
  max-width: var(--maxw); margin: 0 auto; width: 100%;
  color: #fff;
}
.hero__eyebrow {
  font-size: clamp(0.78rem, 1.4vw, 0.95rem);
  letter-spacing: 0.42em; text-transform: uppercase;
  margin-bottom: 30px; color: rgba(255,255,255,0.9);
}
.hero__title {
  font-family: var(--serif); font-weight: 500;
  font-size: clamp(2.9rem, 8.2vw, 6.6rem);
  line-height: 1.05; letter-spacing: 0.01em;
}
.hero__title span { display: block; }
.hero__sub {
  margin-top: 34px; font-size: clamp(1.05rem, 2.2vw, 1.5rem);
  font-weight: 300; letter-spacing: 0.06em; color: rgba(255,255,255,0.92);
}
.hero__sign {
  margin-top: 46px; font-size: 0.82rem; letter-spacing: 0.24em;
  text-transform: uppercase; color: rgba(255,255,255,0.72);
}

.scroll-cue {
  position: absolute; bottom: 34px; left: 50%; transform: translateX(-50%);
  z-index: 3; display: flex; flex-direction: column; align-items: center; gap: 12px;
  color: #fff; font-size: 0.68rem; letter-spacing: 0.3em; text-transform: uppercase;
}
.scroll-cue__line {
  width: 1px; height: 46px; background: rgba(255,255,255,0.6); position: relative; overflow: hidden;
}
.scroll-cue__line::after {
  content: ""; position: absolute; top: -50%; left: 0; width: 100%; height: 50%;
  background: #fff; animation: cue 2.1s var(--ease) infinite;
}
@keyframes cue { 0% { top: -55%; } 60%,100% { top: 105%; } }

/* =============================================================
   01 · Before AI
   ============================================================= */
.chapter { background: var(--bg); }
.chapter .lede {
  margin-top: 40px; font-size: clamp(1.3rem, 3vw, 2rem);
  font-weight: 300; color: var(--ink-soft); line-height: 1.5;
}
.daily {
  display: flex; flex-wrap: wrap; gap: 14px 40px;
  margin: 60px 0 70px;
}
.daily li {
  font-family: var(--serif); font-style: italic;
  font-size: clamp(1.4rem, 3.6vw, 2.6rem);
  color: var(--primary); opacity: 0.9;
}
.daily__more { color: var(--secondary) !important; }
.ask {
  font-size: clamp(1.5rem, 4vw, 2.8rem); font-weight: 300;
  color: var(--text); line-height: 1.5;
}
.ask em {
  font-family: var(--serif); font-style: italic; font-weight: 500;
  color: var(--accent);
}

/* =============================================================
   02 · Luna
   ============================================================= */
.luna { padding: 0; }
.luna__grid {
  display: grid; grid-template-columns: 1.05fr 1fr; align-items: stretch;
  min-height: 92vh;
}
.luna__media { position: relative; overflow: hidden; }
.luna__media img { width: 100%; height: 100%; object-fit: cover; }
.luna__body {
  display: flex; flex-direction: column; justify-content: center;
  padding: clamp(60px, 9vw, 150px) var(--pad);
  background: var(--bg);
}
.luna__intro {
  margin-top: 26px; font-size: clamp(1.15rem, 2.2vw, 1.5rem);
  font-weight: 300; color: var(--ink-soft); line-height: 1.6;
}
.luna__caps {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 30px 24px; margin: 54px 0;
  max-width: 440px;
}
.luna__caps li { display: flex; align-items: center; gap: 16px; }
.luna__caps .ico {
  font-size: 1.5rem; width: 52px; height: 52px; flex: none;
  display: grid; place-items: center;
  background: #fff; border: 1px solid var(--line); border-radius: 50%;
}
.luna__caps span:last-child { font-size: 0.98rem; letter-spacing: 0.04em; color: var(--text); }
.luna__line {
  font-family: var(--serif); font-size: clamp(1.3rem, 2.6vw, 1.9rem);
  font-weight: 500; color: var(--primary); line-height: 1.5;
  padding-top: 34px; border-top: 1px solid var(--line);
}

/* =============================================================
   03 · Journey timeline
   ============================================================= */
.journey { background: var(--primary); color: var(--bg); overflow: hidden; }
.journey .kicker { color: var(--secondary); }
.journey .display { color: #fff; }
.journey__sub {
  text-align: center; margin-top: 22px; font-weight: 300;
  color: rgba(248,246,242,0.75); font-size: clamp(1rem, 2vw, 1.25rem);
}
.timeline {
  margin-top: clamp(60px, 9vw, 120px);
  padding: 0 var(--pad);
  overflow-x: auto; overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.timeline::-webkit-scrollbar { display: none; }
.timeline__track {
  position: relative; height: 1px; min-width: 900px;
  background: rgba(248,246,242,0.18); margin: 0 auto;
  max-width: 1300px;
}
.timeline__fill {
  position: absolute; left: 0; top: 0; height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--secondary), var(--accent));
  transition: width 0.4s var(--ease);
}
.timeline__list {
  display: flex; justify-content: space-between;
  min-width: 900px; max-width: 1300px; margin: 0 auto;
  transform: translateY(-50%);
}
.tl {
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  position: relative; opacity: 0.35; transition: opacity 0.5s var(--ease);
}
.tl.is-on { opacity: 1; }
.tl__dot {
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--primary); border: 1.5px solid rgba(248,246,242,0.5);
  transition: background 0.4s var(--ease), border-color 0.4s var(--ease), transform 0.4s var(--ease);
}
.tl.is-on .tl__dot { background: var(--secondary); border-color: var(--secondary); transform: scale(1.35); }
.tl__time { font-size: 0.72rem; letter-spacing: 0.15em; color: var(--secondary); }
.tl__label {
  font-family: var(--serif); font-size: clamp(0.95rem, 1.5vw, 1.2rem);
  color: #fff; white-space: nowrap;
}

/* =============================================================
   04 · Demos
   ============================================================= */
.demos { background: var(--bg); }
.demos__intro { padding-bottom: 0; }
.demo {
  display: grid; grid-template-columns: 1fr 1fr; align-items: center;
  min-height: 100svh;
}
.demo--reverse .demo__media { order: 2; }
.demo--reverse .demo__text  { order: 1; }
.demo__media { position: relative; height: 100svh; overflow: hidden; }
.demo__media img { width: 100%; height: 100%; object-fit: cover; }
.demo__scrim {
  position: absolute; inset: 0;
  background: linear-gradient(0deg, rgba(20,30,26,0.18), rgba(20,30,26,0));
}
.demo__text {
  display: flex; flex-direction: column; justify-content: center;
  padding: clamp(50px, 8vw, 130px) var(--pad);
}
.demo__index {
  font-size: 0.8rem; letter-spacing: 0.3em; color: var(--accent); margin-bottom: 20px;
}
.demo__name {
  font-family: var(--serif); font-weight: 500;
  font-size: clamp(2.6rem, 6vw, 4.6rem); color: var(--primary); line-height: 1;
}
.demo__say {
  margin-top: 30px; font-size: clamp(1.2rem, 2.6vw, 1.75rem);
  font-weight: 300; color: var(--ink-soft); line-height: 1.55;
}

/* =============================================================
   05 · Capability
   ============================================================= */
.capability { background: var(--bg); }
.cap__grid {
  margin-top: clamp(56px, 8vw, 96px);
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px;
  padding: 0 var(--pad); max-width: 1600px; margin-left: auto; margin-right: auto;
}
.cap { position: relative; }
.cap__media {
  position: relative; overflow: hidden; border-radius: 4px;
  aspect-ratio: 3 / 4;
}
.cap__media img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 1.1s var(--ease);
}
.cap:hover .cap__media img { transform: scale(1.05); }
.cap__cap {
  display: flex; flex-direction: column; gap: 4px; padding: 22px 4px 0;
}
.cap__en {
  font-family: var(--serif); font-size: clamp(1.4rem, 2.4vw, 2rem);
  color: var(--primary); font-weight: 500;
}
.cap__zh { font-size: 0.9rem; letter-spacing: 0.08em; color: var(--ink-soft); }

/* =============================================================
   06 · When AI meets interior design
   ============================================================= */
.meet {
  position: relative; height: 100svh; min-height: 560px;
  display: flex; align-items: center; overflow: hidden;
}
.meet__media { position: absolute; inset: -8% 0; z-index: 0; will-change: transform; }
.meet__media img { width: 100%; height: 100%; object-fit: cover; }
.meet__scrim { position: absolute; inset: 0; background: rgba(18,26,22,0.5); }
.meet__inner {
  position: relative; z-index: 2; width: 100%;
  max-width: var(--maxw); margin: 0 auto; padding: 0 var(--pad);
  color: #fff;
}
.meet__title {
  font-family: var(--serif); font-weight: 500;
  font-size: clamp(2.4rem, 8vw, 6rem); line-height: 1.02; letter-spacing: 0.01em;
}
.meet__title span { display: block; }
.meet__line {
  margin-top: 38px; font-size: clamp(1.15rem, 2.6vw, 1.7rem);
  font-weight: 300; letter-spacing: 0.05em; line-height: 1.6; color: rgba(255,255,255,0.92);
}

/* =============================================================
   07 · Case study
   ============================================================= */
.cases { background: var(--bg); }
.case__list {
  margin-top: clamp(56px, 8vw, 110px);
  display: flex; flex-direction: column; gap: clamp(60px, 9vw, 140px);
}
.case {
  display: grid; grid-template-columns: 1.4fr 1fr; align-items: center; gap: clamp(30px, 5vw, 80px);
  max-width: 1500px; margin: 0 auto; width: 100%; padding: 0 var(--pad);
}
.case--reverse .case__media { order: 2; }
.case--reverse .case__meta  { order: 1; text-align: right; }
.case__media { overflow: hidden; border-radius: 4px; aspect-ratio: 16 / 10; }
.case__media img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 1.2s var(--ease);
}
.case:hover .case__media img { transform: scale(1.04); }
.case__no { font-size: 0.8rem; letter-spacing: 0.3em; color: var(--accent); }
.case__title {
  font-family: var(--serif); font-weight: 500;
  font-size: clamp(2rem, 4.4vw, 3.4rem); color: var(--primary); line-height: 1.1; margin: 16px 0 10px;
}
.case__desc { font-size: 1rem; letter-spacing: 0.14em; color: var(--ink-soft); }

/* =============================================================
   ENDING
   ============================================================= */
.ending {
  position: relative; height: 100svh; min-height: 600px;
  display: flex; align-items: center; justify-content: center; text-align: center;
  overflow: hidden;
}
.ending__media { position: absolute; inset: -8% 0; z-index: 0; will-change: transform; }
.ending__media img { width: 100%; height: 100%; object-fit: cover; }
.ending__scrim {
  position: absolute; inset: 0;
  background: linear-gradient(0deg, rgba(20,30,26,0.55), rgba(20,30,26,0.2) 55%, rgba(20,30,26,0.4));
}
.ending__inner { position: relative; z-index: 2; color: #fff; padding: 0 var(--pad); }
.ending__title {
  font-family: var(--serif); font-weight: 500;
  font-size: clamp(2.6rem, 8vw, 6rem); line-height: 1.05;
}
.ending__sub {
  font-family: var(--serif); font-style: italic; font-weight: 400;
  font-size: clamp(1.8rem, 5vw, 3.4rem); margin-top: 6px; color: var(--secondary);
}
.ending__sign {
  margin-top: 60px; font-size: 0.82rem; letter-spacing: 0.24em; text-transform: uppercase;
  color: rgba(255,255,255,0.82); line-height: 2.1;
}
.ending__year { color: var(--secondary); }

/* ---------- Footer ---------- */
.foot {
  background: var(--primary); color: rgba(248,246,242,0.6);
  text-align: center; padding: 40px var(--pad);
  font-size: 0.76rem; letter-spacing: 0.16em;
}

/* =============================================================
   Motion — reveal system
   ============================================================= */
.reveal, .reveal-img {
  opacity: 0; transition:
    opacity 1s var(--ease) var(--d, 0s),
    transform 1s var(--ease) var(--d, 0s),
    clip-path 1.1s var(--ease) var(--d, 0s);
}
.reveal { transform: translateY(26px); }
.reveal.is-in { opacity: 1; transform: none; }

/* image reveal: soft rise + clip wipe */
.reveal-img { transform: translateY(40px); }
.reveal-img img { transform: scale(1.06); transition: transform 1.4s var(--ease) var(--d, 0s); }
.reveal-img.is-in { opacity: 1; transform: none; }
.reveal-img.is-in img { transform: scale(1); }

/* =============================================================
   Responsive — re-layout (not just shrink)
   ============================================================= */

/* Tablet */
@media (max-width: 900px) {
  .luna__grid { grid-template-columns: 1fr; min-height: 0; }
  .luna__media { height: 62vh; }
  .luna__body { padding: 64px var(--pad) 80px; }
  .luna__caps { max-width: none; }

  .demo, .demo--reverse { grid-template-columns: 1fr; min-height: 0; }
  .demo__media, .demo--reverse .demo__media { order: 1; height: 64vh; }
  .demo__text, .demo--reverse .demo__text { order: 2; padding: 56px var(--pad) 72px; }

  .cap__grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }

  .case, .case--reverse { grid-template-columns: 1fr; gap: 26px; }
  .case--reverse .case__media { order: 1; }
  .case--reverse .case__meta  { order: 2; text-align: left; }
}

/* Mobile */
@media (max-width: 560px) {
  :root { --pad: 22px; }
  .nav__tag { display: none; }
  .hero { height: 100svh; }
  .hero__title { font-size: clamp(2.6rem, 13vw, 3.6rem); }
  .daily { gap: 10px 26px; margin: 44px 0 54px; }
  .luna__caps { grid-template-columns: 1fr; gap: 20px; }
  .cap__grid { grid-template-columns: 1fr; gap: 26px; }
  .cap__media { aspect-ratio: 4 / 3; }
  .cap__cap { padding-top: 16px; }
  .timeline__track, .timeline__list { min-width: 720px; }
  .luna__media { height: 54vh; }
  .demo__media { height: 56vh; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal, .reveal-img, .reveal-img img { opacity: 1 !important; transform: none !important; transition: none !important; }
  .scroll-cue__line::after { animation: none; }
  [data-parallax] { transform: none !important; }
}
