/* =============================================================
   朱珠鈎勾 Crochet a Dream — Brand Site
   Design tokens from brand CI (40-page proposal)
============================================================= */
:root {
  /* Brand color */
  --red:        #B63A2B;   /* 品牌紅 Crochet Red */
  --red-deep:   #9A3024;
  --ivory:      #F5EFE6;   /* 珍珠白 Pearl Ivory */
  --gold:       #C8A97E;   /* 暖金 Warm Gold */
  --gold-soft:  #DCC6A6;
  --brown:      #5D463C;   /* 深棕 Dark Brown */
  --brown-soft: #7c6358;
  --cream:      #FBF8F2;
  --white:      #ffffff;

  --text:       #4a3a33;
  --text-muted: #897a72;
  --line:       rgba(93, 70, 60, .14);
  --line-soft:  rgba(93, 70, 60, .08);

  /* Type */
  --serif:  'Noto Serif TC', 'Songti TC', serif;
  --sans:   'Noto Sans TC', -apple-system, 'PingFang TC', sans-serif;
  --script: 'Great Vibes', cursive;

  /* Spacing rhythm */
  --gut: clamp(20px, 5vw, 64px);
  --sec: clamp(64px, 9vw, 132px);
  --maxw: 1240px;

  --shadow-sm: 0 6px 22px rgba(93, 70, 60, .08);
  --shadow-md: 0 18px 50px rgba(93, 70, 60, .14);

  --ease: cubic-bezier(.22, .61, .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);
  font-weight: 300;
  color: var(--text);
  background: var(--cream);
  line-height: 1.85;
  letter-spacing: .02em;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { font-family: inherit; border: none; background: none; cursor: pointer; color: inherit; }
:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; border-radius: 2px; }

/* ---------- layout helpers ---------- */
.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gut); }
.section { padding-block: var(--sec); }
.section--cream { background: var(--cream); }
.section--ivory { background: var(--ivory); }
.section--white { background: var(--white); }
section[id] { scroll-margin-top: 128px; }

.eyebrow {
  font-family: var(--script);
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  color: var(--gold);
  line-height: 1;
  margin-bottom: .3em;
}
.kicker {
  font-size: .72rem;
  letter-spacing: .34em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 500;
  margin-bottom: 1rem;
}
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 500; color: var(--brown); line-height: 1.3; letter-spacing: .04em; }
.h-display { font-size: clamp(2rem, 5vw, 3.2rem); font-weight: 600; }
.h-section  { font-size: clamp(1.7rem, 3.6vw, 2.5rem); }
.lead { font-size: clamp(1rem, 1.4vw, 1.12rem); color: var(--text-muted); max-width: 58ch; }

.section__head { max-width: 720px; margin-bottom: clamp(36px, 5vw, 60px); }
.section__head--center { margin-inline: auto; text-align: center; }
.section__head .h-section { margin-bottom: .6rem; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .6em;
  padding: .95em 2.1em;
  font-size: .9rem; font-weight: 500; letter-spacing: .12em;
  border-radius: 999px;
  transition: all .4s var(--ease);
  will-change: transform;
}
.btn svg { width: 1em; height: 1em; transition: transform .4s var(--ease); }
.btn:hover svg { transform: translateX(4px); }
.btn--primary { background: var(--red); color: var(--ivory); box-shadow: 0 10px 24px rgba(182,58,43,.24); }
.btn--primary:hover { background: var(--red-deep); transform: translateY(-2px); box-shadow: 0 16px 30px rgba(182,58,43,.30); }
.btn--ghost { border: 1px solid var(--brown); color: var(--brown); }
.btn--ghost:hover { background: var(--brown); color: var(--ivory); transform: translateY(-2px); }
.btn--light { border: 1px solid rgba(255,255,255,.7); color: #fff; }
.btn--light:hover { background: #fff; color: var(--brown); }

/* ---------- header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px var(--gut);
  transition: background .45s var(--ease), box-shadow .45s var(--ease), padding .45s var(--ease);
}
.site-header.is-solid {
  background: rgba(251, 248, 242, .92);
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 var(--line-soft);
  padding-block: 10px;
}
.brand { display: flex; align-items: center; gap: 12px; z-index: 2; }
.brand__mark { width: 46px; height: 46px; border-radius: 50%; transition: width .4s, height .4s; }
.site-header.is-solid .brand__mark { width: 40px; height: 40px; }
.brand__name { line-height: 1.1; }
.brand__zh { font-family: var(--serif); font-size: 1.15rem; font-weight: 600; color: var(--brown); letter-spacing: .14em; }
.brand__en { font-family: var(--script); font-size: 1rem; color: var(--gold); }
/* over-hero (transparent) light text */
.site-header:not(.is-solid) .brand__zh { color: #fff; text-shadow: 0 1px 8px rgba(0,0,0,.3); }
.site-header:not(.is-solid) .nav__link { color: rgba(255,255,255,.92); text-shadow: 0 1px 8px rgba(0,0,0,.3); }
.site-header:not(.is-solid) .nav-toggle span { background: #fff; }

.nav { display: flex; align-items: center; gap: clamp(18px, 2.4vw, 40px); }
.nav__list { display: flex; gap: clamp(18px, 2.4vw, 38px); }
.nav__link {
  position: relative; font-size: .92rem; font-weight: 400; letter-spacing: .12em;
  color: var(--brown); padding-block: 6px;
}
.nav__link::after {
  content: ''; position: absolute; left: 0; bottom: 0; width: 0; height: 1.5px;
  background: var(--red); transition: width .4s var(--ease);
}
.nav__link:hover::after, .nav__link.is-active::after { width: 100%; }
.site-header:not(.is-solid) .nav__link::after { background: #fff; }

.nav-toggle { display: none; flex-direction: column; gap: 5px; width: 30px; height: 24px; justify-content: center; z-index: 2; }
.nav-toggle span { display: block; height: 2px; width: 100%; background: var(--brown); border-radius: 2px; transition: transform .4s var(--ease), opacity .3s; }

/* mobile menu */
.mobile-menu {
  position: fixed; inset: 0; z-index: 99;
  background: var(--ivory);
  display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 8px;
  opacity: 0; visibility: hidden; transform: translateY(-12px);
  transition: opacity .45s var(--ease), transform .45s var(--ease), visibility .45s;
}
.mobile-menu.is-open { opacity: 1; visibility: visible; transform: none; }
.mobile-menu a { font-family: var(--serif); font-size: 1.7rem; color: var(--brown); padding: .35em; letter-spacing: .1em; }
.mobile-menu a span { font-family: var(--script); font-size: 1rem; color: var(--gold); display: block; }
body.menu-open { overflow: hidden; }

/* ---------- hero ---------- */
.hero { position: relative; min-height: 100svh; display: flex; align-items: center; overflow: hidden; }
.hero__media { position: absolute; inset: 0; z-index: 0; }
.hero__media video, .hero__media img { width: 100%; height: 100%; object-fit: cover; }
.hero__media::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(105deg, rgba(60,40,33,.62) 0%, rgba(60,40,33,.28) 45%, rgba(60,40,33,.10) 100%);
}
.hero__inner { position: relative; z-index: 1; color: #fff; padding-block: 120px; max-width: 760px; }
.hero .eyebrow { color: var(--gold-soft); }
.hero h1 { color: #fff; font-size: clamp(2.3rem, 6vw, 4.1rem); font-weight: 600; letter-spacing: .05em; text-shadow: 0 2px 20px rgba(0,0,0,.28); }
.hero h1 em { font-style: normal; color: var(--gold-soft); }
.hero__sub { margin: 1.4rem 0 2.2rem; font-size: clamp(1rem, 1.6vw, 1.2rem); color: rgba(255,255,255,.92); font-weight: 300; max-width: 30ch; text-shadow: 0 1px 12px rgba(0,0,0,.3); }
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; }
.hero__scroll {
  position: absolute; bottom: 28px; left: 50%; transform: translateX(-50%); z-index: 1;
  color: rgba(255,255,255,.8); font-size: .68rem; letter-spacing: .3em; text-transform: uppercase;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
}
.hero__scroll::after { content: ''; width: 1px; height: 38px; background: rgba(255,255,255,.6); animation: scrollline 2s var(--ease) infinite; transform-origin: top; }
@keyframes scrollline { 0%{transform:scaleY(.2)} 50%{transform:scaleY(1)} 100%{transform:scaleY(.2)} }

/* ---------- page hero (sub pages) ---------- */
.page-hero { position: relative; padding: clamp(140px, 18vh, 220px) 0 clamp(48px, 8vw, 90px); text-align: center; overflow: hidden; }
.page-hero--img { color: #fff; }
.page-hero--img .page-hero__bg { position: absolute; inset: 0; z-index: 0; }
.page-hero--img .page-hero__bg img { width: 100%; height: 100%; object-fit: cover; }
.page-hero--img .page-hero__bg::after { content: ''; position: absolute; inset: 0; background: rgba(60,40,33,.5); }
.page-hero__inner { position: relative; z-index: 1; }
.page-hero--img h1 { color: #fff; }
.page-hero--img .lead { color: rgba(255,255,255,.9); margin-inline: auto; }
.page-hero h1 { font-size: clamp(2.1rem, 5vw, 3.3rem); font-weight: 600; margin-bottom: .5rem; }

/* ---------- scallop divider (echoes logo border) ---------- */
.scallop { display: block; width: 100%; height: 26px; color: var(--cream); }
.scallop--ivory { color: var(--ivory); }
.scallop svg { display: block; width: 100%; height: 100%; }

/* ---------- collections grid ---------- */
.coll-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: clamp(16px, 2vw, 26px); }
.coll-card {
  position: relative; aspect-ratio: 3/4; border-radius: 4px; overflow: hidden;
  display: flex; align-items: flex-end; isolation: isolate;
  box-shadow: var(--shadow-sm); transition: box-shadow .5s var(--ease);
}
.coll-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; transition: transform 1.1s var(--ease); }
.coll-card::after { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(to top, rgba(60,40,33,.78) 0%, rgba(60,40,33,.12) 55%, transparent 100%); }
.coll-card:hover { box-shadow: var(--shadow-md); }
.coll-card:hover img { transform: scale(1.06); }
.coll-card__body { padding: 26px; color: #fff; }
.coll-card__en { font-family: var(--script); font-size: 1.5rem; color: var(--gold-soft); line-height: 1; }
.coll-card__zh { font-family: var(--serif); font-size: 1.35rem; font-weight: 600; color: #fff; margin: 2px 0 6px; letter-spacing: .08em; }
.coll-card__desc { font-size: .85rem; color: rgba(255,255,255,.85); font-weight: 300; }

/* ---------- values ---------- */
.values-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: clamp(28px, 4vw, 54px); }
.value { text-align: center; }
.value__icon { width: 56px; height: 56px; margin: 0 auto 18px; color: var(--red); }
.value__icon svg { width: 100%; height: 100%; }
.value__en { font-family: var(--script); font-size: 1.5rem; color: var(--gold); line-height: 1; }
.value h3 { font-size: 1.2rem; margin: 4px 0 10px; letter-spacing: .1em; }
.value p { font-size: .92rem; color: var(--text-muted); }

/* ---------- product grid + lightbox ---------- */
.prod-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: clamp(14px, 2vw, 24px); }
.prod-card { background: var(--white); border-radius: 4px; overflow: hidden; box-shadow: var(--shadow-sm); transition: transform .5s var(--ease), box-shadow .5s var(--ease); cursor: pointer; }
.prod-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); }
.prod-card__img { aspect-ratio: 1; overflow: hidden; background: var(--ivory); }
.prod-card__img img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--ease); }
.prod-card:hover .prod-card__img img { transform: scale(1.07); }
.prod-card__body { padding: 16px 18px 20px; }
.prod-card__series { font-size: .68rem; letter-spacing: .2em; text-transform: uppercase; color: var(--gold); }
.prod-card__name { font-family: var(--serif); font-size: 1.05rem; color: var(--brown); margin: 4px 0 2px; }
.prod-card__price { font-size: .85rem; color: var(--text-muted); }

.lightbox { position: fixed; inset: 0; z-index: 200; background: rgba(40,28,24,.88); display: flex; align-items: center; justify-content: center; padding: 5vw; opacity: 0; visibility: hidden; transition: opacity .4s var(--ease), visibility .4s; }
.lightbox.is-open { opacity: 1; visibility: visible; }
.lightbox img { max-width: min(680px, 90vw); max-height: 84vh; border-radius: 4px; box-shadow: var(--shadow-md); transform: scale(.94); transition: transform .45s var(--ease); }
.lightbox.is-open img { transform: scale(1); }
.lightbox__close { position: absolute; top: 22px; right: 26px; width: 44px; height: 44px; color: #fff; font-size: 1.8rem; line-height: 1; }

/* ---------- editorial split ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 5vw, 80px); align-items: center; }
.split--reverse .split__media { order: 2; }
.split__media { position: relative; }
.split__media img { width: 100%; aspect-ratio: 4/5; object-fit: cover; border-radius: 4px; box-shadow: var(--shadow-md); }
.split__media--tall img { aspect-ratio: 3/4; }
.split__deco { position: absolute; inset: -14px -14px auto auto; width: 64%; height: 70%; border: 1px solid var(--gold); border-radius: 4px; z-index: -1; }
.split__body p + p { margin-top: 1.1rem; }
.split__body .signature { font-family: var(--script); font-size: 2rem; color: var(--gold); margin-top: 1.4rem; }

/* ---------- steps ---------- */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: clamp(24px, 3vw, 40px); counter-reset: step; }
.step { position: relative; padding-top: 14px; }
.step__num { font-family: var(--serif); font-size: 2.6rem; color: var(--gold-soft); line-height: 1; }
.step h3 { font-size: 1.2rem; margin: 8px 0 10px; letter-spacing: .08em; }
.step p { font-size: .92rem; color: var(--text-muted); }

/* ---------- cta band ---------- */
.cta-band { position: relative; text-align: center; color: #fff; overflow: hidden; }
.cta-band__bg { position: absolute; inset: 0; z-index: 0; }
.cta-band__bg img { width: 100%; height: 100%; object-fit: cover; }
.cta-band__bg::after { content: ''; position: absolute; inset: 0; background: rgba(154,48,36,.78); }
.cta-band .container { position: relative; z-index: 1; padding-block: clamp(64px, 9vw, 110px); }
.cta-band h2 { color: #fff; font-size: clamp(1.8rem, 4vw, 2.7rem); margin-bottom: 1rem; }
.cta-band p { color: rgba(255,255,255,.9); max-width: 46ch; margin: 0 auto 2rem; }

/* ---------- gallery strip ---------- */
.gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 8px; }
.gallery img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 3px; transition: filter .5s, transform .8s var(--ease); }
.gallery img:hover { filter: saturate(1.1); transform: scale(1.03); }

/* ---------- form ---------- */
.form { display: grid; gap: 20px; max-width: 620px; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.field { display: flex; flex-direction: column; gap: 7px; }
.field label { font-size: .8rem; letter-spacing: .1em; color: var(--brown); font-weight: 500; }
.field label .req { color: var(--red); }
.field input, .field textarea, .field select {
  font-family: inherit; font-size: .95rem; color: var(--text);
  padding: 13px 16px; border: 1px solid var(--line); border-radius: 4px;
  background: var(--white); transition: border-color .3s, box-shadow .3s;
}
.field textarea { resize: vertical; min-height: 130px; }
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(200,169,126,.18); }
.form__note { font-size: .8rem; color: var(--text-muted); }

/* ---------- footer ---------- */
.site-footer { background: var(--brown); color: rgba(245,239,230,.78); }
.site-footer .container { padding-block: clamp(56px, 7vw, 80px); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: clamp(32px, 5vw, 64px); }
.footer-brand__name { font-family: var(--serif); font-size: 1.3rem; color: #fff; font-weight: 600; letter-spacing: .1em; }
.footer-brand__en { font-family: var(--script); font-size: 1.4rem; color: var(--gold); }
.footer-brand p { font-size: .88rem; max-width: 34ch; margin-top: 14px; }
.footer-col h4 { color: #fff; font-size: .78rem; letter-spacing: .22em; text-transform: uppercase; margin-bottom: 16px; font-family: var(--sans); font-weight: 600; }
.footer-col a { display: block; font-size: .9rem; padding: 5px 0; color: rgba(245,239,230,.72); transition: color .3s; }
.footer-col a:hover { color: var(--gold); }
.social { display: flex; gap: 14px; margin-top: 18px; }
.social a { width: 40px; height: 40px; border: 1px solid rgba(245,239,230,.28); border-radius: 50%; display: grid; place-items: center; transition: all .35s var(--ease); }
.social a:hover { background: var(--gold); border-color: var(--gold); color: var(--brown); transform: translateY(-3px); }
.social svg { width: 18px; height: 18px; }
.footer-base { border-top: 1px solid rgba(245,239,230,.14); padding-top: 24px; margin-top: clamp(40px,5vw,56px); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; font-size: .78rem; color: rgba(245,239,230,.55); }

/* ---------- scroll reveal ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }
.reveal[data-d="1"] { transition-delay: .1s; }
.reveal[data-d="2"] { transition-delay: .2s; }
.reveal[data-d="3"] { transition-delay: .3s; }
.reveal[data-d="4"] { transition-delay: .4s; }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ---------- responsive ---------- */
@media (max-width: 860px) {
  .nav__list { display: none; }
  .nav-toggle { display: flex; }
  .nav-toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle.is-open span:nth-child(2) { opacity: 0; }
  .nav-toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .split { grid-template-columns: 1fr; gap: 32px; }
  .split--reverse .split__media { order: 0; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 520px) {
  .form__row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .brand__en { display: none; }
}
