/* =====================================================================
   XUÂN THU: home page ("Factory" direction, Nov 2026)
   Self-contained: index.html loads this file instead of styles.css.
   White and graphite, thread colours from the sewing floor as small marks only.
   Archivo (display) + Be Vietnam Pro (text), both with Vietnamese subsets.
   ===================================================================== */

/* ---------- Fonts (brand guidelines) ---------- */
@font-face { font-family: "Oateria"; src: url("../fonts/BTOateria-Medium.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "TT Commons Pro"; src: url("../fonts/TT_Commons_Pro_Medium.woff2") format("woff2"); font-weight: 400 500; font-style: normal; font-display: swap; }
@font-face { font-family: "TT Commons Pro"; src: url("../fonts/TT_Commons_Pro_DemiBold.woff2") format("woff2"); font-weight: 600 700; font-style: normal; font-display: swap; }

/* ---------- Tokens ---------- */
:root {
  --cream: #FFF7E9;
  --cream-deep: #F4E9D4;
  --white: #fff;
  --ink: #2A2018;
  --g2: #5C5347;
  --line: #E7DECB;
  --orange: #E76228;
  --orange-btn: #BF4B1B;    /* button fill, AA with cream text */
  --accent: #B5461A;        /* small text and active states, AA on cream */

  --display: "Oateria", "TT Commons Pro", Georgia, serif;
  --text: "TT Commons Pro", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  /* type scale, ratio 1.25 */
  --s-1: 0.85rem; --s0: 1.06rem; --s1: 1.25rem; --s2: 1.563rem; --s3: 1.953rem; --s4: 2.441rem; --s5: 3.052rem; --s6: 4.768rem;

  --g: clamp(16px, 4vw, 56px);
  --maxw: 1320px;
  --r: 6px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 72px; }
body { background: var(--cream); color: var(--ink); font: 400 var(--s0)/1.6 var(--text); -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
a:hover { color: var(--accent); }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }
ul, ol { list-style: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--g); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 8px; top: -60px; z-index: 300; background: var(--ink); color: #fff; padding: 10px 14px; }
.skip:focus { top: 8px; }

h1, h2, h3 { font-family: var(--display); font-weight: 500; letter-spacing: 0; line-height: 1.04; }
h3 { font-family: var(--text); font-weight: 600; letter-spacing: 0; }
h2 { font-size: clamp(var(--s3), 3.4vw, var(--s5)); }
h3 { font-size: var(--s1); line-height: 1.2; }
.lead { font-size: clamp(var(--s0), 1.3vw, 1.125rem); color: var(--g2); max-width: 52ch; }

.btn { display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 20px; background: var(--orange-btn); color: var(--cream); border-radius: var(--r); font-weight: 600; text-decoration: none; transition: background 0.2s var(--ease); }
.btn:hover { background: #A33F15; color: var(--cream); }
.btn svg, .tlink svg { width: 16px; height: 16px; flex: none; }
.tlink { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font-weight: 500; }

/* ---------- Header ---------- */
.site-header { position: fixed; inset: 0 0 auto 0; z-index: 100; color: #fff; transition: background 0.3s, color 0.3s, transform 0.35s var(--ease), border-color 0.3s; border-bottom: 1px solid transparent; }
.site-header.scrolled, body.nav-open .site-header { background: var(--cream); color: var(--ink); border-color: var(--line); }
.site-header.hide { transform: translateY(-100%); }
body.nav-open .site-header { transform: none; }
.scroll-progress { display: none; }
.nav { display: flex; align-items: center; gap: 28px; height: 72px; }
.brand { display: block; color: inherit; }
.wordmark { display: block; height: 22px; width: auto; }
.nav-links { display: flex; gap: 24px; margin-left: auto; font-size: 0.95rem; }
.nav-links a { text-decoration: none; padding: 10px 0; }
.nav-links a:hover { color: inherit; text-decoration: underline; }
.nav-cta { display: flex; align-items: center; gap: 12px; }
.site-header .btn { min-height: 42px; padding: 0 16px; font-size: 0.95rem; }

.lang { position: relative; }
.lang-toggle { min-height: 44px; min-width: 44px; font-size: 0.9rem; font-weight: 500; color: inherit; }
.lang-toggle .caret { font-size: 0.7em; opacity: 0.7; }
.lang-menu { position: absolute; right: 0; top: calc(100% + 6px); min-width: 160px; background: var(--cream); color: var(--ink); border: 1px solid var(--line); padding: 6px; opacity: 0; visibility: hidden; transition: opacity 0.2s, visibility 0.2s; }
body.lang-open .lang-menu { opacity: 1; visibility: visible; }
.lang-menu button { display: block; width: 100%; text-align: left; padding: 10px 12px; font-size: 0.95rem; }
.lang-menu button:hover { background: var(--cream-deep); }
.lang-menu button.on { color: var(--accent); font-weight: 600; }

.nav-toggle { display: none; width: 44px; height: 44px; align-items: center; justify-content: center; color: inherit; }
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after { display: block; width: 22px; height: 2px; background: currentColor; position: relative; transition: transform 0.3s; }
.nav-toggle span::before, .nav-toggle span::after { content: ""; position: absolute; left: 0; }
.nav-toggle span::before { top: -7px; } .nav-toggle span::after { top: 7px; }
body.nav-open .nav-toggle span { background: transparent; }
body.nav-open .nav-toggle span::before { transform: translateY(7px) rotate(45deg); }
body.nav-open .nav-toggle span::after { transform: translateY(-7px) rotate(-45deg); }
.nav-mobile { display: none; }
body.scroll-locked { position: fixed; left: 0; right: 0; overflow: hidden; }

@media (max-width: 960px) {
  .nav-links, .site-header .nav-cta > .btn { display: none; }
  .nav-cta { margin-left: auto; gap: 4px; }
  .nav-toggle { display: flex; }
  .nav-mobile { display: flex; flex-direction: column; position: fixed; inset: 72px 0 0 0; z-index: 99; background: var(--cream); padding: 16px var(--g) 32px; overflow-y: auto; transform: translateX(100%); transition: transform 0.35s var(--ease); }
  body.nav-open .nav-mobile { transform: none; }
  .nav-mobile a { display: flex; align-items: center; min-height: 56px; border-bottom: 1px solid var(--line); font: 600 var(--s1)/1.2 var(--display); text-decoration: none; }
  .nav-mobile .btn { justify-content: center; margin-top: 24px; border: 0; font: 500 var(--s0)/1 var(--text); }
}

/* ---------- Hero ---------- */
.hero { position: relative; display: flex; flex-direction: column; justify-content: flex-end; min-height: min(100svh, 900px); color: var(--cream); background: var(--ink); }
.hero-media { position: absolute; inset: 0; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; }
.hero-media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(24,25,28,.55) 0, rgba(24,25,28,0) 18%, rgba(24,25,28,.1) 40%, rgba(24,25,28,.8) 74%, rgba(24,25,28,.88) 100%); }
.hero-copy { position: relative; width: 100%; padding-top: 120px; padding-bottom: 36px; }
.hero h1 { font-weight: 500; font-size: clamp(2.6rem, 6vw, 5.4rem); line-height: 0.98; letter-spacing: 0; max-width: 12ch; }
.hero .proof { margin-top: 20px; max-width: 50ch; font-size: clamp(var(--s0), 1.4vw, var(--s1)); line-height: 1.5; color: rgba(255,255,255,.92); }
.hero-doors { position: relative; width: 100%; }
.doors { display: grid; grid-template-columns: repeat(3, 1fr); background: var(--cream); border-radius: var(--r) var(--r) 0 0; overflow: hidden; color: var(--ink); }
.door { display: block; padding: 22px 24px 26px; border-right: 1px solid var(--line); text-decoration: none; transition: background 0.2s; }
.door:last-child { border-right: 0; }
.door:hover { background: var(--cream-deep); color: var(--ink); }
.door small { display: block; font-size: var(--s-1); color: var(--accent); font-weight: 500; }
.door small i { display: none; }
.door b { display: flex; align-items: center; gap: 10px; margin: 6px 0 6px; font: 500 var(--s3)/1.05 var(--display); }
.door b svg { color: var(--orange); }
.door b svg { width: 20px; height: 20px; flex: none; transition: transform 0.2s var(--ease); }
.door:hover b svg { transform: translateX(4px); }
.door > span { display: block; font-size: 0.94rem; color: var(--g2); }
@media (max-width: 760px) {
  .hero { min-height: 0; background: var(--ink); }
  .hero-media { position: relative; aspect-ratio: 4 / 3; }
  .hero-media::after { background: linear-gradient(180deg, rgba(24,25,28,.55) 0, rgba(24,25,28,0) 30%); }
  .hero-media img { object-position: 30% center; }
  .hero-copy { padding-top: 28px; padding-bottom: 28px; }
  .hero-doors { padding: 0; }
  .doors { grid-template-columns: 1fr; }
  .door { border-right: 0; border-bottom: 1px solid var(--line); padding: 20px var(--g); }
}
@media (prefers-reduced-motion: no-preference) {
  .hero-copy > * { animation: rise 0.8s var(--ease) both; }
  .hero-copy > :nth-child(2) { animation-delay: 0.08s; }
  .doors { animation: rise 0.8s 0.16s var(--ease) both; }
}
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }

/* ---------- Story: horizontal timeline ---------- */
.story { padding: clamp(72px, 9vw, 128px) 0 clamp(64px, 8vw, 112px); }
.story-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 16px 40px; }
.story-head .lead { margin-top: 14px; }
.tl { display: grid; grid-template-columns: 1.25fr 1fr 1.4fr; gap: 28px; margin-top: 48px; border-top: 1px solid var(--ink); }
.tl-item { padding-top: 18px; position: relative; }
.tl-item::before { content: ""; position: absolute; top: -5px; left: 0; width: 9px; height: 9px; border-radius: 50%; background: var(--orange); }
.tl-when { display: block; font: 500 var(--s2)/1 var(--display); color: var(--orange); }
.tl-item h3 { margin: 6px 0 14px; font-size: var(--s0); }
.tl-item p { font-size: 0.94rem; color: var(--g2); max-width: 38ch; margin-top: 12px; }
.tl-photo img { width: 100%; object-fit: cover; border-radius: var(--r); }
.tl-1 .tl-photo img { aspect-ratio: 4 / 5; }
.tl-2 .tl-photo { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.tl-2 .tl-photo img { aspect-ratio: 1; }
.tl-3 .tl-photo img { aspect-ratio: 3 / 2; }
.tl figcaption { margin-top: 8px; font-size: var(--s-1); color: var(--g2); }
.tl-2 figcaption { grid-column: 1 / -1; margin-top: 0; }
@media (max-width: 860px) {
  .tl { grid-template-columns: repeat(3, 78%); overflow-x: auto; scroll-snap-type: x mandatory; margin-right: calc(var(--g) * -1); padding-right: var(--g); padding-bottom: 8px; }
  .tl-item { scroll-snap-align: start; }
}

/* ---------- Manufacturing: spec sheet ---------- */
.mfg { background: var(--cream-deep); padding: clamp(72px, 9vw, 128px) 0; }
.mfg-grid { display: grid; grid-template-columns: 7fr 5fr; gap: clamp(40px, 6vw, 88px); align-items: start; }
.mfg .lead { margin-top: 18px; }
.spec { width: 100%; border-collapse: collapse; margin-top: 36px; font-size: 0.95rem; }
.spec th, .spec td { text-align: left; vertical-align: top; padding: 13px 0; border-top: 1px solid #DCCDB0; }
.spec th { width: 36%; padding-right: 16px; font-weight: 500; color: var(--g2); }
.spec tr:last-child th, .spec tr:last-child td { border-bottom: 1px solid var(--ink); }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; margin-top: 32px; }
.mfg figure img { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; border-radius: var(--r); }
.mfg figcaption, .ws figcaption { margin-top: 10px; font-size: var(--s-1); color: var(--g2); }
@media (max-width: 860px) { .mfg-grid { grid-template-columns: 1fr; } .mfg figure { max-width: 520px; } }

/* process: six steps on thread-coloured rules */
.proc-wrap { margin-top: clamp(64px, 8vw, 104px); }
.proc { display: grid; grid-template-columns: repeat(6, 1fr); margin-top: 32px; counter-reset: s; }
.proc li { padding: 14px 20px 0 0; border-top: 1px solid var(--ink); counter-increment: s; }
.proc li::before { content: counter(s); display: block; margin-bottom: 8px; font: 500 var(--s3)/1 var(--display); color: var(--orange); }
.proc b { display: block; font: 600 1.06rem/1.25 var(--text); }
.proc span { display: block; margin-top: 6px; font-size: 0.9rem; color: var(--g2); }
@media (max-width: 1000px) { .proc { grid-template-columns: repeat(3, 1fr); row-gap: 32px; } }
@media (max-width: 560px) { .proc { grid-template-columns: 1fr 1fr; } }

/* styles we've made: gallery strip */
.made { margin-top: clamp(64px, 8vw, 104px); }
.made-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 8px 24px; }
.made-head h3, .proc-wrap > h3 { font-family: var(--display); font-weight: 500; font-size: var(--s3) !important; }
.gallery { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; margin-top: 24px; }
.gallery img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; background: var(--cream-deep); border-radius: var(--r); }
.gallery figcaption { margin-top: 8px; font-size: var(--s-1); color: var(--g2); line-height: 1.4; }
@media (max-width: 860px) {
  .gallery { grid-template-columns: repeat(6, 42%); overflow-x: auto; scroll-snap-type: x mandatory; margin-right: calc(var(--g) * -1); padding-right: var(--g); }
  .gallery figure { scroll-snap-align: start; }
}

/* ---------- Wholesale: full-bleed image, offset panel ---------- */
.ws { position: relative; }
.ws-media img { width: 100%; height: clamp(320px, 52vw, 720px); object-fit: cover; }
.ws-panel { position: relative; margin-top: clamp(-200px, -14vw, -96px); }
.ws-card { background: var(--cream); border-radius: var(--r) var(--r) 0 0; padding: clamp(28px, 4vw, 56px); margin-left: calc(clamp(28px, 4vw, 56px) * -1); max-width: 860px; }
.ws-card .lead { margin-top: 16px; }
.terms { display: grid; grid-template-columns: 1fr 1fr; gap: 0 40px; margin-top: 32px; }
.terms div { padding: 14px 0; border-top: 1px solid var(--line); }
.terms dt { font-weight: 500; font-size: 0.9rem; color: var(--g2); }
.terms dd { margin-top: 4px; font-size: 0.98rem; }
.ws { padding-bottom: clamp(48px, 6vw, 88px); }
.ws-media img { object-position: center 35%; }
@media (max-width: 760px) {
  .ws-panel { margin-top: 0; }
  .ws-card { padding: 32px 0 0; margin-left: 0; }
  .terms { grid-template-columns: 1fr; }
}

/* ---------- Brands: each tile in its own look ---------- */
.brands { padding: clamp(72px, 9vw, 128px) 0; }
.brand-tiles { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; margin-top: 36px; }
.bt { position: relative; display: flex; flex-direction: column; text-decoration: none; min-height: 100%; border-radius: var(--r); overflow: hidden; }
.bt img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.bt-body { flex: 1; padding: 20px 22px 24px; }
.bt-body p { font-size: 0.94rem; margin-top: 6px; }
.bt-url { display: inline-flex; align-items: center; gap: 8px; margin-top: 14px; font-size: 0.9rem; font-weight: 500; text-decoration: underline; }
.bt-url svg { width: 14px; height: 14px; }
/* Xuân Thu Swim: warm, the family line */
.bt-xts { background: var(--white); color: var(--ink); }
.bt-xts .bt-name { height: 30px; width: auto; aspect-ratio: auto; }
.bt-xts:hover { color: var(--ink); }
/* Aquamarine: deep sea, quiet */
.bt-aqm { background: #0F3B47; color: #E6F1F2; }
.bt-aqm .bt-name { font: 500 var(--s2)/1 var(--text); letter-spacing: 0.12em; }
.bt-aqm:hover { color: #fff; }
/* Marine: bold, image-led */
.bt-mrn { background: #E9F0F2; color: #10303A; }
.bt-mrn .bt-name { font: 600 var(--s4)/0.9 var(--text); letter-spacing: -0.03em; }
.bt-mrn:hover { color: #10303A; }
@media (max-width: 860px) {
  .brand-tiles { grid-template-columns: 1fr; }
  .bt { display: grid; grid-template-columns: 40% 1fr; }
  .bt > picture img { height: 100%; aspect-ratio: auto; min-height: 200px; }
}

/* ---------- Proof: press ---------- */
.press { background: var(--ink); color: var(--cream); padding: clamp(72px, 9vw, 120px) 0; }
.press-grid { display: grid; grid-template-columns: 7fr 5fr; gap: clamp(40px, 6vw, 96px); }
.press .big blockquote { font: 500 clamp(var(--s3), 3.2vw, var(--s5))/1.08 var(--display); }
.press blockquote::before { content: "\201C"; color: var(--orange); }
.press blockquote::after { content: "\201D"; color: var(--orange); }
.press cite { display: block; margin-top: 16px; font-style: normal; font-size: 0.9rem; color: rgba(255,247,233,.7); }
.press cite b { color: var(--cream); font-weight: 600; }
.press-list li { padding: 20px 0; border-top: 1px solid rgba(255,247,233,.18); }
.press-list li:last-child { border-bottom: 1px solid rgba(255,247,233,.18); }
.press-list blockquote { font-size: 1.1rem; }
.press-list cite { margin-top: 8px; }
.press .tlink { margin-top: 20px; }
.press a:hover { color: var(--orange); }
@media (max-width: 860px) { .press-grid { grid-template-columns: 1fr; } }

/* ---------- Quote form ---------- */
.quote { padding: clamp(72px, 9vw, 128px) 0; }
.quote-grid { display: grid; grid-template-columns: 4fr 7fr; gap: clamp(40px, 6vw, 96px); align-items: start; }
.quote .lead { margin-top: 16px; }
.reach { margin-top: 32px; }
.reach div { padding: 16px 0; border-top: 1px solid var(--line); }
.reach dt { font-size: 0.9rem; color: var(--g2); }
.reach dd { margin-top: 2px; }
.reach dd a { font-weight: 500; }
.reach small { display: block; font-size: 0.85rem; color: var(--g2); }
form { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 20px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field.full, fieldset, form .btn, .form-note, .form-error { grid-column: 1 / -1; }
label, legend { font-size: 0.9rem; font-weight: 500; }
input[type="text"], input[type="email"], textarea { width: 100%; min-height: 48px; padding: 12px 14px; border: 1px solid #D9C9AA; border-radius: var(--r); background: var(--white); font-size: 1rem; }
textarea { min-height: 140px; resize: vertical; }
input:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: var(--accent); }
input[type="file"] { font-size: 0.9rem; padding: 10px 0; }
fieldset { border: 0; }
.roles { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.role { position: relative; }
.role input { position: absolute; opacity: 0; inset: 0; }
.role span { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; background: var(--white); border: 1px solid #D9C9AA; border-radius: var(--r); font-size: 0.95rem; cursor: pointer; }
.role input:checked + span { border-color: var(--orange-btn); background: var(--orange-btn); color: var(--cream); }
.role input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.form-note { font-size: 0.85rem; color: var(--g2); }
.form-error { display: none; padding: 12px 14px; background: #FFE3E5; color: #7A1020; font-size: 0.95rem; }
.form-error.show { display: block; }
.hp { position: absolute; left: -9999px; }
form .btn { justify-content: center; }
form .btn:disabled { opacity: 0.6; }
.turnstile-host { grid-column: 1 / -1; }
@media (max-width: 860px) { .quote-grid { grid-template-columns: 1fr; } }
@media (max-width: 560px) { form { grid-template-columns: 1fr; } }

/* ---------- Footer: light ---------- */
.site-footer { background: var(--cream-deep); padding: 56px 0 24px; font-size: 0.95rem; }
.f-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.3fr; gap: 32px; }
.f-logo { height: 24px; width: auto; color: var(--orange); }
.site-footer p { color: var(--g2); margin-top: 12px; max-width: 32ch; }
.f-h { font-weight: 600; color: var(--ink); margin-bottom: 8px; }
.f-col a { display: block; padding: 5px 0; text-decoration: none; color: var(--g2); }
.f-col a:hover { color: var(--accent); }
.f-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; margin-top: 48px; padding-top: 20px; border-top: 1px solid #DCCDB0; color: var(--g2); font-size: 0.85rem; }
.f-bottom p { margin: 0; max-width: none; }
.f-bottom a { color: var(--g2); }
.f-langs { display: flex; gap: 14px; }
.f-langs a { text-decoration: none; padding: 6px 0; }
@media (max-width: 860px) { .f-grid { grid-template-columns: 1fr 1fr; } .f-brand { grid-column: 1 / -1; } }
@media (max-width: 420px) { .f-grid { grid-template-columns: 1fr; } }

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