/* ====================================================
   Æther — Base styles & shared components (V3B)
   ----------------------------------------------------
   Imports tokens.css.
   Provides reset, typography, and the shared global
   nav / footer / button / card patterns used across
   every page.
   ==================================================== */

@import url("./tokens.css");

/* ---------- RESET ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: var(--t-md);
  line-height: var(--lh-normal);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
img, svg { max-width: 100%; display: block; }
button { font-family: inherit; }

/* ---------- TYPOGRAPHY HELPERS ---------- */
.eyebrow {
  font-size: var(--t-xs); font-weight: 700;
  letter-spacing: var(--ls-widest); text-transform: uppercase;
  color: var(--primary); margin-bottom: var(--s-4);
  display: inline-flex; align-items: center; gap: var(--s-2);
}
.eyebrow::before { content: ""; width: 18px; height: 1px; background: var(--primary); opacity: 0.5; }

.h-display {
  font-family: var(--font-serif); font-weight: 500;
  font-variation-settings: var(--fr-display);
  font-size: var(--t-6xl); line-height: var(--lh-tight);
  letter-spacing: var(--ls-tight);
}
.h-display em, .h-section em, .h-card em { font-style: italic; color: var(--primary); }

.h-section {
  font-family: var(--font-serif); font-weight: 500;
  font-variation-settings: var(--fr-display);
  font-size: var(--t-4xl); line-height: var(--lh-snug);
  letter-spacing: var(--ls-snug);
}

.h-card {
  font-family: var(--font-serif); font-weight: 500;
  font-variation-settings: var(--fr-display);
  font-size: var(--t-xl); line-height: var(--lh-snug);
  letter-spacing: var(--ls-snug);
}

.lead {
  font-family: var(--font-serif); font-style: italic;
  font-variation-settings: var(--fr-display);
  font-size: var(--t-xl); line-height: 1.45;
  color: var(--ink-soft); letter-spacing: -0.005em;
  padding-left: 18px; border-left: 2px solid var(--primary);
}

/* ---------- BUTTONS ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  background: var(--primary); color: white; border: 0;
  border-radius: var(--r-md); padding: 18px 22px;
  font-size: var(--t-sm); font-weight: 600;
  font-family: inherit; cursor: pointer;
  transition: transform var(--t-fast) var(--ease-out), background var(--t-fast) var(--ease-out);
}
.btn:hover { background: var(--primary-deep); }
.btn:active { transform: scale(0.98); }
.btn-arrow {
  font-family: var(--font-serif); font-style: italic; font-size: var(--t-lg);
  font-variation-settings: var(--fr-display);
}
.btn-dark { background: var(--ink); }
.btn-dark:hover { background: var(--primary); }
.btn-ghost {
  background: var(--surface); color: var(--ink);
  border: 1px solid var(--line);
}
.btn-ghost:hover { background: var(--primary-soft); border-color: var(--primary-soft); color: var(--primary); }
.btn-pill { border-radius: var(--r-pill); padding: 14px 22px; }

/* ---------- LANGUAGE TOGGLE (EN / KO) ---------- */
.lang {
  display: flex; background: var(--primary-soft); border-radius: var(--r-pill);
  padding: 3px; font-size: var(--t-xs); font-weight: 600; letter-spacing: 0.04em;
}
.lang button {
  background: transparent; border: 0; padding: 6px 12px;
  border-radius: var(--r-pill); color: var(--primary); cursor: pointer;
  font-weight: 600; font-family: inherit; transition: background var(--t-fast) var(--ease-out);
}
.lang button.active { background: var(--primary); color: white; }

/* ---------- GLOBAL NAV ---------- */
.nav-global {
  position: sticky; top: 0; z-index: var(--z-nav);
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  max-width: var(--shell-blog); margin: 0 auto;
  padding: 14px 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 18px;
}
.logo {
  font-family: var(--font-serif); font-size: 28px; font-weight: 500;
  font-variation-settings: var(--fr-display); letter-spacing: var(--ls-snug);
  display: flex; align-items: center; gap: 6px;
  color: var(--ink); text-decoration: none;
}
.logo-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--primary); display: inline-block; margin-bottom: 14px;
}
.nav-right { display: flex; gap: var(--s-6); align-items: center; }
.nav-links { display: flex; gap: var(--s-7); align-items: center; }
.nav-links a {
  color: var(--ink-soft); text-decoration: none;
  font-size: var(--t-sm); font-weight: 500;
}
.nav-links a:hover, .nav-links a.active { color: var(--primary); font-weight: 600; }
.nav-links a.cta {
  background: var(--ink); color: white;
  padding: 10px 18px; border-radius: var(--r-pill); font-weight: 600;
}
.nav-links a.cta:hover { background: var(--primary); color: white; }

@media (max-width: 680px){
  .nav-links { display: none; }
}

/* ---------- GLOBAL FOOTER ---------- */
.footer-global {
  border-top: 1px solid var(--line);
  padding: var(--s-8) var(--gutter-desktop) var(--s-9);
  text-align: center; margin-top: var(--s-9);
}
.foot-logo {
  font-family: var(--font-serif); font-size: 36px; font-weight: 500;
  font-variation-settings: var(--fr-display); letter-spacing: var(--ls-snug);
  margin-bottom: var(--s-2);
}
.foot-tag {
  font-size: var(--t-sm); color: var(--ink-mute);
  letter-spacing: 0.08em; text-transform: uppercase;
  margin-bottom: var(--s-6); font-weight: 600;
}
.foot-links {
  display: flex; justify-content: center; gap: 18px;
  font-size: var(--t-sm); color: var(--ink-soft); flex-wrap: wrap;
}
.foot-links a { color: var(--ink-soft); text-decoration: none; }
.foot-links a:hover { color: var(--primary); }
.foot-copyright {
  font-size: var(--t-xs); color: var(--ink-mute); margin-top: var(--s-6);
}

/* ---------- CARD PATTERNS ---------- */
.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-xl); padding: var(--s-6);
}
.card-soft { background: var(--primary-mist); border-color: var(--primary-soft); }
.card-pink { background: var(--pink-mute); border-color: var(--pink); }
.card-cosmic {
  background: var(--grad-cosmic); color: white;
  border: 0; box-shadow: var(--shadow-glow);
  position: relative; overflow: hidden;
}

/* ---------- CHIP ---------- */
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--primary-mist); color: var(--ink-soft);
  padding: 6px 12px; border-radius: var(--r-pill);
  font-size: var(--t-xs); font-weight: 500;
}
.chip-violet { background: var(--primary-soft); color: var(--primary); }
.chip-pink { background: var(--pink); color: #9D2461; }

/* ---------- SHELL VARIANTS ---------- */
.shell-mobile { max-width: var(--shell-mobile); margin: 0 auto; min-height: 100vh; position: relative; }
.shell-product { max-width: var(--shell-product); margin: 0 auto; min-height: 100vh; position: relative; }
.shell-info { max-width: var(--shell-info); margin: 0 auto; padding: 60px var(--gutter-desktop) 100px; }
.shell-doc { max-width: var(--shell-doc); margin: 0 auto; }

@media (min-width: 680px){
  .shell-mobile { max-width: var(--shell-product); }
}

/* ---------- A11Y HELPERS ---------- */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
:focus-visible {
  outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 4px;
}
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible {
  outline: 2px solid var(--primary); outline-offset: 2px;
}

/* ---------- MOTION PREFERENCE ---------- */
@media (prefers-reduced-motion: reduce){
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  html { scroll-behavior: auto; }
}
