/* ════════════════════════════════════════════════
   THUẬN HẢI PAPER — thuanhaipaper.com
   Palette: forest green × glee pink × paper cream
   ════════════════════════════════════════════════ */

:root {
  --green-950: #0a2018;
  --green-900: #103326;
  --green-800: #174534;
  --green-600: #27604a;
  --green-400: #4f8a6e;
  --green-100: #e2ede7;
  --pink-600: #a83a5c;
  --pink-500: #bd4a6e;
  --pink-300: #dfa3b5;
  --pink-100: #f7edf0;
  --cream: #f8f7f3;
  --cream-2: #eeece5;
  --ink: #232b27;
  --ink-soft: #5b6560;
  --serif: "Playfair Display", "Times New Roman", serif;
  --sans: "Be Vietnam Pro", "Segoe UI", sans-serif;
  --radius: 14px;
  --shadow: 0 18px 44px -20px rgba(10, 32, 24, .32);
  --ease: cubic-bezier(.22, .8, .3, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.65;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

/* paper grain over everything */
body::after {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none; z-index: 4;
  opacity: .5; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.035 0'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ── shared ── */
.container { width: min(1160px, 92vw); margin-inline: auto; }
.section { padding: clamp(72px, 10vw, 128px) 0; position: relative; }

.kicker {
  font-size: 13px; font-weight: 700;
  letter-spacing: .22em; text-transform: uppercase;
  color: var(--green-600);
  display: flex; align-items: center; gap: 14px;
  margin-bottom: 18px;
}
.kicker::before {
  content: ""; width: 42px; height: 2px;
  background: var(--pink-500); flex: none;
}
.kicker--pink { color: var(--pink-300); }

.h2 {
  font-family: var(--serif);
  font-size: clamp(28px, 4vw, 48px);
  font-weight: 600; line-height: 1.2;
  color: var(--green-900);
  margin-bottom: 22px;
  text-wrap: balance;
}
.h2 em { font-style: italic; color: var(--pink-600); }
.h2--light { color: var(--cream); }
.h2--light em { color: var(--pink-300); }

.lead { font-size: clamp(15px, 1.6vw, 18px); color: var(--ink-soft); max-width: 62ch; }
.lead--light { color: rgba(250, 246, 238, .78); }

.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 15px 32px; border: 2px solid transparent;
  border-radius: 999px;
  font-weight: 600; font-size: 15px; letter-spacing: .02em;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), background .3s, color .3s;
}
.btn:hover { transform: translateY(-3px); }
.btn--pink {
  background: var(--pink-500); color: #fff;
  box-shadow: 0 12px 26px -14px rgba(168, 58, 92, .6);
}
.btn--pink:hover { background: var(--pink-600); }
.btn--green {
  background: var(--green-800); color: var(--cream);
  box-shadow: 0 12px 26px -14px rgba(23, 69, 52, .55);
}
.btn--green:hover { background: var(--green-600); }
.btn--ghost { border-color: rgba(255,255,255,.55); color: #fff; backdrop-filter: blur(4px); }
.btn--ghost:hover { background: rgba(255,255,255,.14); }
.btn--lg { padding: 18px 40px; font-size: 17px; }

/* reveal on scroll */
.reveal { opacity: 0; transform: translateY(34px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.d1 { transition-delay: .12s; } .d2 { transition-delay: .24s; }
.d3 { transition-delay: .36s; } .d4 { transition-delay: .48s; }
.d5 { transition-delay: .60s; } .d6 { transition-delay: .72s; }

/* ════════ NAV ════════ */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  padding: 18px 0;
  transition: background .4s, box-shadow .4s, padding .4s;
}
.nav.scrolled {
  background: rgba(250, 246, 238, .92);
  backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 rgba(27, 67, 50, .12);
  padding: 10px 0;
}
.nav__inner {
  width: min(1240px, 94vw); margin-inline: auto;
  display: flex; align-items: center; justify-content: space-between;
}
.nav__brand { display: flex; align-items: center; gap: 12px; }
.nav__logo {
  width: 44px; height: 44px; flex: none;
  display: grid; place-items: center;
  background: var(--green-800); color: var(--pink-300);
  font-family: var(--serif); font-style: italic; font-size: 19px;
  border-radius: 12px;
  box-shadow: inset 0 0 0 2px rgba(246, 165, 193, .35);
}
.nav__name {
  font-family: var(--serif); font-size: 17px; font-weight: 700;
  letter-spacing: .06em; color: #fff;
  transition: color .4s;
}
.nav__name em { font-style: normal; color: var(--pink-300); }
.nav.scrolled .nav__name { color: var(--green-900); }
.nav.scrolled .nav__name em { color: var(--pink-600); }
.nav__name--light { color: var(--cream) !important; }

.nav__links { display: flex; align-items: center; gap: 30px; }
.nav__links a {
  font-size: 15px; font-weight: 500; color: #fff;
  position: relative; transition: color .4s;
}
.nav.scrolled .nav__links a { color: var(--ink); }
.nav__links a:not(.nav__cta)::after {
  content: ""; position: absolute; left: 0; bottom: -6px;
  width: 0; height: 2px; background: var(--pink-500);
  transition: width .3s var(--ease);
}
.nav__links a:not(.nav__cta):hover::after { width: 100%; }
.nav__cta {
  background: var(--pink-500); color: #fff !important;
  padding: 10px 22px; border-radius: 999px; font-weight: 700;
}
.nav__cta:hover { background: var(--pink-600); }

.nav__burger { display: none; background: none; border: 0; width: 40px; height: 34px; position: relative; z-index: 60; }
.nav__burger span {
  display: block; height: 2.5px; margin: 6px 8px;
  background: #fff; border-radius: 2px; transition: .35s var(--ease);
}
.nav.scrolled .nav__burger span, .nav.menu-open .nav__burger span { background: var(--green-900); }

/* ════════ HERO ════════ */
.hero {
  position: relative; min-height: 100svh;
  display: flex; align-items: center;
  color: #fff;
}
.hero__bg { position: absolute; inset: 0; overflow: hidden; }
.hero__bg img {
  width: 100%; height: 100%; object-fit: cover;
  animation: heroZoom 18s var(--ease) forwards;
}
@keyframes heroZoom { from { transform: scale(1.12); } to { transform: scale(1); } }
.hero__scrim {
  position: absolute; inset: 0;
  background:
    linear-gradient(78deg, rgba(10, 32, 24, .94) 0%, rgba(16, 51, 38, .8) 42%, rgba(16, 51, 38, .3) 78%, rgba(10, 32, 24, .25) 100%);
}
.hero__content { position: relative; z-index: 2; width: min(1160px, 92vw); margin-inline: auto; padding-top: 70px; }
.hero__eyebrow {
  font-size: 13px; letter-spacing: .24em; text-transform: uppercase;
  color: var(--pink-300); font-weight: 600; margin-bottom: 26px;
}
.hero__title {
  font-family: var(--serif); font-weight: 600;
  font-size: clamp(40px, 7vw, 88px);
  line-height: 1.08; margin-bottom: 30px;
}
.hero__title span { display: block; }
.hero__title em { font-style: italic; color: var(--pink-300); }
.hero__sub { max-width: 52ch; font-size: clamp(16px, 1.8vw, 19px); color: rgba(255,255,255,.85); margin-bottom: 38px; }
.hero__sub strong { color: var(--pink-300); }
.hero__actions { display: flex; gap: 16px; flex-wrap: wrap; }

.hero__scroll {
  position: absolute; left: 50%; bottom: 26px; translate: -50% 0; z-index: 2;
  width: 26px; height: 44px; border: 2px solid rgba(255,255,255,.6); border-radius: 14px;
}
.hero__scroll span {
  position: absolute; left: 50%; top: 8px; translate: -50% 0;
  width: 4px; height: 8px; border-radius: 3px; background: var(--pink-300);
  animation: wheel 1.8s ease-in-out infinite;
}
@keyframes wheel { 0% { top: 8px; opacity: 1; } 70% { top: 24px; opacity: 0; } 100% { top: 8px; opacity: 0; } }

/* ════════ MARQUEE ════════ */
.marquee {
  background: var(--green-900); color: rgba(248, 247, 243, .85);
  overflow: hidden; padding: 15px 0;
  border-bottom: 1px solid rgba(248, 247, 243, .12);
}
.marquee__track {
  display: flex; align-items: center; gap: 38px;
  width: max-content;
  animation: scroll 32s linear infinite;
  font-size: 14px; font-weight: 500; letter-spacing: .08em;
  text-transform: uppercase; white-space: nowrap;
}
.marquee__track i { color: var(--pink-300); font-style: normal; }
@keyframes scroll { to { transform: translateX(-50%); } }

/* ════════ INTRO / THƯ NGỎ ════════ */
.intro { background: var(--cream); }
.intro__grid {
  display: grid; grid-template-columns: 1fr 1.1fr;
  gap: clamp(40px, 6vw, 90px); align-items: center;
  margin-bottom: clamp(56px, 7vw, 88px);
}
.intro__media { position: relative; }
.intro__photo {
  border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow);
}
.intro__photo img { aspect-ratio: 4 / 4.6; object-fit: cover; width: 100%; }
.intro__photo--overlap {
  position: absolute; right: -6%; bottom: -10%;
  width: 56%; border: 6px solid var(--cream);
}
.intro__photo--overlap img { aspect-ratio: 1; }

.intro__letter p { margin-bottom: 16px; color: var(--ink-soft); }
.intro__letter strong { color: var(--green-800); }
.intro__letter { position: relative; padding-left: 26px; }
.intro__letter::before {
  content: ""; position: absolute; left: 0; top: 6px; bottom: 6px;
  width: 3px; border-radius: 3px;
  background: linear-gradient(var(--green-600), var(--pink-500));
}
.intro__sign { margin-top: 28px; display: flex; flex-direction: column; }
.intro__sign-name { font-family: var(--serif); font-size: 26px; color: var(--green-900); font-style: italic; }
.intro__sign-role { font-size: 13.5px; color: var(--ink-soft); letter-spacing: .04em; margin-top: 4px; }

/* facts strip */
.facts {
  display: grid; grid-template-columns: repeat(4, 1fr);
  background: var(--green-800);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.facts__item {
  padding: 30px 28px;
  border-right: 1px solid rgba(250, 246, 238, .12);
}
.facts__item:last-child { border-right: 0; }
.facts__label {
  display: block; font-size: 11.5px; font-weight: 700;
  letter-spacing: .18em; text-transform: uppercase;
  color: var(--pink-300); margin-bottom: 8px;
}
.facts__value { color: var(--cream); font-size: 16.5px; font-weight: 500; line-height: 1.4; }

/* ════════ LĨNH VỰC ════════ */
.section--green {
  background:
    radial-gradient(700px 500px at -10% 110%, rgba(79, 138, 110, .18), transparent 60%),
    var(--green-900);
}
.fields__grid {
  margin-top: clamp(40px, 5vw, 64px);
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px;
}
.field-card {
  background: rgba(250, 246, 238, .05);
  border: 1px solid rgba(250, 246, 238, .14);
  border-radius: var(--radius);
  padding: 34px 30px;
  transition: transform .4s var(--ease), background .4s, border-color .4s;
}
.field-card:hover {
  transform: translateY(-6px);
  background: rgba(250, 246, 238, .09);
  border-color: rgba(246, 165, 193, .5);
}
.field-card__icon {
  width: 58px; height: 58px; margin-bottom: 22px;
  display: grid; place-items: center;
  border-radius: 16px;
  color: var(--pink-300);
  background: rgba(230, 73, 128, .16);
  border: 1px solid rgba(246, 165, 193, .35);
}
.field-card__icon svg { width: 30px; height: 30px; }
.field-card h3 {
  font-family: var(--serif); font-weight: 400;
  font-size: 20px; color: var(--cream); margin-bottom: 12px; line-height: 1.35;
}
.field-card p { font-size: 14.5px; color: rgba(250, 246, 238, .68); }
.field-card p strong { color: var(--pink-300); }

/* ════════ SẢN PHẨM ════════ */
.products { background: var(--cream); }
.products__head {
  display: flex; justify-content: space-between; align-items: flex-end;
  gap: 40px; margin-bottom: clamp(36px, 5vw, 56px);
}
.products__head .lead { max-width: 40ch; padding-bottom: 6px; }

.gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.gallery__item {
  position: relative; overflow: hidden;
  border-radius: 14px;
  aspect-ratio: 4 / 3;
  background: var(--cream-2);
  cursor: zoom-in;
  opacity: 0; transform: translateY(26px) scale(.97);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
  border: 0; padding: 0;
}
.gallery__item.in { opacity: 1; transform: none; }
.gallery__item img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .8s var(--ease);
}
.gallery__item:hover img { transform: scale(1.07); }
.gallery__item::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(rgba(10, 32, 24, 0), rgba(10, 32, 24, .35));
  opacity: 0; transition: opacity .4s;
}
.gallery__item:hover::after { opacity: 1; }
/* feature tiles */
.gallery__item:nth-child(9n + 1) { grid-column: span 2; grid-row: span 2; aspect-ratio: auto; }
.gallery__item.hidden { display: none; }

.products__more { text-align: center; margin-top: 40px; }

/* ════════ NĂNG LỰC ════════ */
.section--pink { background: var(--cream-2); }
.capacity__grid {
  margin-top: clamp(40px, 5vw, 60px);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 220px;
  gap: 18px;
}
.cap-card {
  position: relative; overflow: hidden; border-radius: var(--radius);
  box-shadow: 0 14px 34px -18px rgba(15, 44, 30, .4);
}
.cap-card--tall { grid-column: span 2; grid-row: span 2; }
.cap-card img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.cap-card:hover img { transform: scale(1.06); }
.cap-card figcaption {
  position: absolute; left: 14px; bottom: 14px;
  background: rgba(250, 246, 238, .93);
  color: var(--green-900);
  font-size: 13px; font-weight: 600; letter-spacing: .03em;
  padding: 8px 16px; border-radius: 999px;
  border-left: 3px solid var(--pink-500);
}

/* ════════ LOCATIONS ════════ */
.locations { background: var(--cream); }
.locations__grid {
  margin-top: clamp(36px, 4vw, 52px);
  display: grid; grid-template-columns: 1fr 1fr; gap: 24px;
}
.loc-card {
  position: relative;
  border-radius: var(--radius);
  padding: 44px 40px;
  background: var(--green-800);
  color: var(--cream);
  overflow: hidden;
  transition: transform .4s var(--ease);
}
.loc-card:hover { transform: translateY(-6px); }
.loc-card--branch { background: var(--green-600); }
.loc-card__tag {
  display: inline-block; font-size: 11.5px; font-weight: 700;
  letter-spacing: .2em; text-transform: uppercase;
  padding: 7px 16px; border-radius: 999px;
  background: rgba(246, 165, 193, .2); color: var(--pink-300);
  margin-bottom: 20px;
}
.loc-card__tag--pink { background: rgba(223, 163, 181, .22); color: var(--pink-300); }
.loc-card h3 { font-family: var(--serif); font-weight: 400; font-size: 32px; margin-bottom: 12px; }
.loc-card p { opacity: .85; margin-bottom: 22px; }
.loc-card__map {
  font-weight: 600; font-size: 14.5px;
  border-bottom: 2px solid rgba(255,255,255,.4);
  padding-bottom: 3px;
  transition: border-color .3s;
}
.loc-card__map:hover { border-color: #fff; }

/* ════════ CTA ════════ */
.cta { background: var(--cream); padding-bottom: 0; }
.cta__inner {
  display: grid; grid-template-columns: 1.2fr .8fr;
  align-items: center; gap: 0;
  background: var(--green-900);
  border-radius: var(--radius) var(--radius) 0 0;
  overflow: hidden;
}
.cta__body { padding: clamp(44px, 6vw, 80px); }
.cta__body p { color: rgba(250, 246, 238, .75); margin: 20px 0 34px; max-width: 46ch; }
.cta__actions { display: flex; gap: 16px; flex-wrap: wrap; }
.cta__art { height: 100%; min-height: 320px; }
.cta__art img { width: 100%; height: 100%; object-fit: cover; }

/* ════════ FOOTER ════════ */
.footer { background: var(--green-950); color: rgba(250, 246, 238, .75); }
.footer__grid {
  display: grid; grid-template-columns: 1.3fr 1fr 1.2fr .8fr;
  gap: 40px; padding: clamp(48px, 6vw, 72px) 0;
}
.footer__brand p { margin-top: 18px; font-size: 14px; }
.footer__col h4 {
  font-size: 12.5px; font-weight: 700; letter-spacing: .2em;
  text-transform: uppercase; color: var(--pink-300);
  margin-bottom: 18px;
}
.footer__col ul { list-style: none; display: flex; flex-direction: column; gap: 10px; font-size: 14.5px; }
.footer__col a:hover { color: var(--pink-300); }
.footer__bar {
  border-top: 1px solid rgba(250, 246, 238, .12);
  padding: 20px 0; font-size: 13px;
}
.footer__bar .container { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

/* ════════ LIGHTBOX ════════ */
.lightbox {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(15, 44, 30, .93);
  backdrop-filter: blur(8px);
  display: grid; place-items: center;
  opacity: 0; pointer-events: none;
  transition: opacity .35s;
}
.lightbox.open { opacity: 1; pointer-events: auto; }
.lightbox__img {
  max-width: min(88vw, 1100px); max-height: 84vh;
  border-radius: 12px;
  box-shadow: 0 40px 90px -30px rgba(0,0,0,.8);
}
.lightbox__close, .lightbox__nav {
  position: absolute; z-index: 2;
  background: rgba(250, 246, 238, .12);
  border: 1px solid rgba(250, 246, 238, .25);
  color: #fff; border-radius: 50%;
  width: 52px; height: 52px;
  font-size: 26px; line-height: 1;
  display: grid; place-items: center;
  transition: background .3s;
}
.lightbox__close:hover, .lightbox__nav:hover { background: var(--pink-500); }
.lightbox__close { top: 24px; right: 24px; }
.lightbox__nav--prev { left: 24px; top: 50%; translate: 0 -50%; }
.lightbox__nav--next { right: 24px; top: 50%; translate: 0 -50%; }
.lightbox__count {
  position: absolute; bottom: 22px; left: 50%; translate: -50% 0;
  color: rgba(255,255,255,.8); font-size: 14px; letter-spacing: .1em;
}

/* ════════ RESPONSIVE ════════ */
@media (max-width: 1024px) {
  .gallery { grid-template-columns: repeat(3, 1fr); }
  .fields__grid { grid-template-columns: repeat(2, 1fr); }
  .facts { grid-template-columns: repeat(2, 1fr); }
  .facts__item { border-bottom: 1px solid rgba(250, 246, 238, .12); }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .capacity__grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 820px) {
  .nav__links {
    position: fixed; inset: 0;
    background: var(--cream);
    flex-direction: column; justify-content: center;
    gap: 34px; font-size: 20px;
    transform: translateY(-100%);
    transition: transform .5s var(--ease);
  }
  .nav.menu-open .nav__links { transform: none; }
  .nav__links a { color: var(--green-900) !important; font-size: 20px; }
  .nav__burger { display: block; }
  .nav.menu-open .nav__burger span:nth-child(1) { transform: translateY(8.5px) rotate(45deg); }
  .nav.menu-open .nav__burger span:nth-child(2) { opacity: 0; }
  .nav.menu-open .nav__burger span:nth-child(3) { transform: translateY(-8.5px) rotate(-45deg); }

  .intro__grid { grid-template-columns: 1fr; }
  .intro__media { max-width: 480px; margin-inline: auto 0; }
  .products__head { flex-direction: column; align-items: flex-start; gap: 12px; }
  .locations__grid, .cta__inner { grid-template-columns: 1fr; }
  .cta__art { order: -1; min-height: 240px; }
  .hero__badge { width: 104px; height: 104px; right: 18px; bottom: 76px; }
  .hero__badge-num { font-size: 24px; }
}

@media (max-width: 560px) {
  .gallery { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .gallery__item:nth-child(9n + 1) { grid-column: span 2; }
  .facts { grid-template-columns: 1fr; }
  .facts__item { border-right: 0; }
  .footer__grid { grid-template-columns: 1fr; gap: 30px; }
  .capacity__grid { grid-auto-rows: 170px; }
  .lightbox__nav { width: 42px; height: 42px; }
  .lightbox__nav--prev { left: 10px; }
  .lightbox__nav--next { right: 10px; }
}

/* static mode (?static): everything visible, no motion — used for screenshots/print */
.static-mode *, .static-mode *::before, .static-mode *::after { animation: none !important; transition: none !important; }
.static-mode .reveal, .static-mode .gallery__item { opacity: 1 !important; transform: none !important; }
.static-mode .hero { min-height: 860px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal, .gallery__item { opacity: 1; transform: none; }
}
