/* ============================================
   REATOLL Global Styles
   ============================================ */

/* --- CSS Custom Properties ---
   Color System (PANTONE):
   - 290 C  → bg     (pale blue, main background tone)
   - 2915 C → blue   (light blue, secondary)
   - 4153 C → navy   (dark blue, primary text/CTA)
   - 2297 C → accent (lime, point color)
   Note: --color-brand-mint is intentionally aliased to --color-brand-blue
   for backwards compatibility with existing rules. Phase out gradually.
*/
:root {
  --color-brand-bg: #B9D9EB;       /* PANTONE 290 C  — pale blue */
  --color-brand-blue: #62B5E5;     /* PANTONE 2915 C — light blue */
  --color-brand-navy: #1A4E8A;     /* PANTONE 4153 C — dark blue */
  --color-brand-accent: #C0DF16;   /* PANTONE 2297 C — lime point */

  /* Legacy alias: mint slots now use light-blue tone */
  --color-brand-mint: var(--color-brand-blue);

  --color-white: #FFFFFF;
  --color-off-white: rgba(255, 255, 255, 0.673);
  --color-text: var(--color-brand-navy);
  --color-text-light: rgba(26, 78, 138, 0.7);
  --color-border: rgba(26, 78, 138, 0.08);

  --color-brand-bg-rgb: 185, 217, 235;       /* 290 C */
  --color-brand-blue-rgb: 98, 181, 229;      /* 2915 C */
  --color-brand-mint-rgb: 98, 181, 229;      /* alias to blue */
  --color-brand-navy-rgb: 26, 78, 138;       /* 4153 C */
  --color-brand-accent-rgb: 192, 223, 22;    /* 2297 C */

  --font-en: 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --font-ko: 'Pretendard Variable', 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;

  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);
  --duration-fast: 0.2s;
  --duration-normal: 0.4s;
  --duration-slow: 0.8s;
  --duration-reveal: 1.2s;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-ko);
  color: var(--color-brand-navy);
  background: linear-gradient(
    160deg,
    var(--color-brand-bg) 0%,        /* 290 C pale */
    #D5E6F2 25%,                      /* lifted pale */
    var(--color-brand-bg) 50%,
    var(--color-brand-blue) 100%      /* 2915 C light blue */
  );
  background-attachment: fixed;
  line-height: 1.6;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

ul, ol {
  list-style: none;
}

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-en);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.text-en {
  font-family: var(--font-en);
}

/* ============================================================
   Mobile tap protection
   Prevent Safari image preview/3D-touch on product images.
   Taps pass through to parent link/card.
   ============================================================ */
.best-card img,
.product-card img,
.product-card__image img,
.step-card img,
.product__visual img,
.pdp__gallery-main img,
.pdp__gallery-thumb img {
  pointer-events: none;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-user-drag: none;
}

/* ============================================================
   Launch-State Machine
   ============================================================ */
/* Default: hide both variants; JS adds launch-* class to <html>
   and CSS below toggles visibility. */
.is-prelaunch-only,
.is-live-only,
.is-soldout-only { display: none; }

html.launch-prelaunch .is-prelaunch-only { display: revert; }
html.launch-live      .is-live-only      { display: revert; }
html.launch-soldout   .is-soldout-only   { display: revert; }

/* When mobile nav items are flex by default, revert may not apply correctly.
   Force flex for mobile bottom nav items. */
html.launch-prelaunch .mobile-bottom-nav__item.is-prelaunch-only,
html.launch-live      .mobile-bottom-nav__item.is-live-only,
html.launch-soldout   .mobile-bottom-nav__item.is-soldout-only {
  display: flex;
}

html.launch-prelaunch .nav__icon-btn.is-prelaunch-only,
html.launch-live      .nav__icon-btn.is-live-only {
  display: flex;
}

/* CTA Button Shells for state transitions */
.cta-prelaunch,
.cta-live {
  display: none !important;
}
html.launch-prelaunch .cta-prelaunch { display: inline-flex !important; }
html.launch-live      .cta-live      { display: inline-flex !important; }

/* PDP CTA grids need grid display */
html.launch-prelaunch .pdp__cta.cta-prelaunch,
html.launch-live      .pdp__cta.cta-live {
  display: grid !important;
}

/* Paragraph variants (shipping notice) */
html.launch-prelaunch p.cta-prelaunch,
html.launch-live      p.cta-live {
  display: block !important;
}

/* --- Alert Bar (site-wide) --- */
.alert-bar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1001;
  background: var(--color-brand-navy);
  color: var(--color-white);
  text-align: center;
  font-family: var(--font-en);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.alert-bar a {
  color: var(--color-brand-mint);
  text-decoration: underline;
  text-underline-offset: 3px;
  font-weight: 600;
}

.alert-bar__arrow {
  display: inline-block;
  transition: transform var(--duration-fast);
}

.alert-bar a:hover .alert-bar__arrow {
  transform: translateX(3px);
}

body.has-alert-bar {
  padding-top: 36px;
}

/* --- Navigation --- */
.nav {
  position: fixed;
  top: 36px;
  left: 0;
  width: 100%;
  z-index: 1000;
  padding: 0 clamp(20px, 4vw, 60px);
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: background var(--duration-normal) var(--ease-out-quart),
              backdrop-filter var(--duration-normal) var(--ease-out-quart);
}

.nav--scrolled {
  background: rgba(216, 228, 240, 0.75);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.3);
}

.nav__logo {
  font-family: var(--font-en);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: var(--color-white);
  transition: color var(--duration-normal) var(--ease-out-quart);
  display: inline-flex;
  align-items: center;
  height: 100%;
}

.nav__logo-img {
  height: 22px;
  width: auto;
  display: block;
  transition: filter var(--duration-normal) var(--ease-out-quart);
}

/* Scrolled: dark nav bg → invert white logo to navy */
.nav--scrolled .nav__logo-img {
  filter: brightness(0) saturate(100%) invert(15%) sepia(60%) saturate(2400%) hue-rotate(205deg) brightness(85%) contrast(95%);
}

.nav--scrolled .nav__logo {
  color: var(--color-brand-navy);
}

/* Mobile: smaller logo */
@media (max-width: 768px) {
  .nav__logo-img { height: 18px; }
}

.nav__center {
  display: flex;
  gap: 32px;
  align-items: center;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.nav__links {
  display: flex;
  gap: 36px;
  align-items: center;
}

.nav__utilities {
  display: flex;
  gap: 16px;
  align-items: center;
}

.nav__icon-btn {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-white);
  transition: opacity var(--duration-fast);
  opacity: 0.9;
}

.nav__icon-btn:hover { opacity: 1; }

.nav--scrolled .nav__icon-btn {
  color: var(--color-brand-navy);
}

.nav__crew-cta {
  font-family: var(--font-en);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-brand-navy);
  background: var(--color-brand-mint);
  padding: 8px 16px;
  border-radius: 100px;
  transition: all var(--duration-fast);
  white-space: nowrap;
}

.nav__crew-cta:hover {
  background: var(--color-white);
  transform: translateY(-1px);
}

.nav--scrolled .nav__crew-cta {
  background: var(--color-brand-navy);
  color: var(--color-white);
}

.nav--scrolled .nav__crew-cta:hover {
  background: var(--color-brand-accent);
  color: var(--color-white);
}

.nav__lang {
  font-family: var(--font-en);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: rgba(255, 255, 255, 0.75);
  border-left: 1px solid rgba(255, 255, 255, 0.3);
  padding-left: 16px;
  transition: color var(--duration-fast);
  cursor: pointer;
  user-select: none;
}

.nav__lang:hover {
  color: var(--color-white);
}

.nav--scrolled .nav__lang:hover {
  color: var(--color-brand-accent);
}

.nav--scrolled .nav__lang {
  color: var(--color-brand-navy);
  border-left-color: rgba(0, 30, 98, 0.2);
}

.nav__link {
  font-family: var(--font-en);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.8);
  transition: color var(--duration-fast);
  position: relative;
}

.nav__link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background: currentColor;
  transition: width var(--duration-normal) var(--ease-out-expo);
}

.nav__link:hover::after {
  width: 100%;
}

.nav--scrolled .nav__link {
  color: var(--color-text-light);
}

.nav--scrolled .nav__link:hover {
  color: var(--color-brand-navy);
}

/* Mobile menu */
.nav__menu-btn {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 24px;
  padding: 4px 0;
}

.nav__menu-btn span {
  display: block;
  height: 1.5px;
  background: var(--color-white);
  transition: all var(--duration-normal) var(--ease-out-expo);
  border-radius: 1px;
}

.nav--scrolled .nav__menu-btn span {
  background: var(--color-brand-navy);
}

.nav__mobile-menu {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: var(--color-white);
  z-index: 999;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 40px;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--duration-normal) var(--ease-out-quart);
}

.nav__mobile-menu.active {
  opacity: 1;
  pointer-events: all;
}

.nav__mobile-menu a {
  font-family: var(--font-en);
  font-size: 1.5rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-brand-navy);
}

.nav__mobile-close {
  position: absolute;
  top: 24px;
  right: 24px;
  font-size: 1.5rem;
  color: var(--color-brand-navy);
}

/* --- Mobile Bottom Nav --- */
.mobile-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid rgba(0, 30, 98, 0.08);
  z-index: 998;
  padding: 8px 0 max(8px, env(safe-area-inset-bottom));
}

.mobile-bottom-nav__inner {
  display: flex;
  justify-content: space-around;
  align-items: center;
}

.mobile-bottom-nav__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 6px 10px;
  min-width: 60px;
  color: var(--color-brand-navy);
  opacity: 0.7;
  transition: opacity var(--duration-fast);
}

.mobile-bottom-nav__item.active,
.mobile-bottom-nav__item:hover {
  opacity: 1;
}

.mobile-bottom-nav__icon {
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mobile-bottom-nav__label {
  font-family: var(--font-en);
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* --- Scroll Reveal --- */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity var(--duration-reveal) var(--ease-out-expo),
              transform var(--duration-reveal) var(--ease-out-expo);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* --- Section Spacing --- */
.section {
  padding: clamp(80px, 12vw, 160px) clamp(24px, 6vw, 120px);
}

.section--full {
  padding: 0;
}

/* --- Footer --- */
.footer {
  background: linear-gradient(180deg, rgba(0, 30, 98, 0.9) 0%, var(--color-brand-navy) 100%);
  color: var(--color-white);
  padding: 60px clamp(24px, 6vw, 120px) 40px;
}

.footer__inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 40px;
  flex-wrap: wrap;
}

.footer__brand {
  font-family: var(--font-en);
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  margin-bottom: 12px;
}

.footer__brand-img {
  height: 28px;
  width: auto;
  display: block;
  margin-bottom: 12px;
  /* Logo is white — keep as-is on dark navy footer */
}

.footer__tagline {
  font-family: var(--font-en);
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.5);
  letter-spacing: 0.04em;
}

.footer__links {
  display: flex;
  gap: 32px;
}

.footer__link {
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.6);
  transition: color var(--duration-fast);
  letter-spacing: 0.02em;
}

.footer__link:hover {
  color: var(--color-white);
}

.footer__bottom {
  max-width: 1200px;
  margin: 40px auto 0;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.35);
  font-family: var(--font-en);
}

/* --- Responsive --- */
@media (max-width: 768px) {
  .nav__center,
  .nav__links {
    display: none;
  }

  .nav__utilities {
    display: none;
  }

  .nav__menu-btn {
    display: flex;
  }

  .nav__mobile-menu {
    display: flex;
  }

  .mobile-bottom-nav {
    display: block;
  }

  body {
    padding-bottom: 68px;
  }

  .footer__inner {
    flex-direction: column;
    gap: 24px;
  }

  .footer__links {
    flex-direction: column;
    gap: 16px;
  }

  .alert-bar {
    font-size: 0.6875rem;
    padding: 8px 12px;
  }

  body.has-alert-bar {
    padding-top: 32px;
  }

  .nav {
    top: 32px;
    height: 56px;
  }
}
