/* ─────────────────────────────────────────────────────────────
   Grand Ocean — Editorial Maritime
   ──────────────────────────────────────────────────────────── */

@font-face { font-family: 'Fraunces'; src: url('../fonts/fraunces-latin-variable.woff2') format('woff2'); font-style: normal; font-weight: 300 900; font-display: swap; }
@font-face { font-family: 'IBM Plex Sans'; src: url('../fonts/ibm-plex-sans-latin-variable.woff2') format('woff2'); font-style: normal; font-weight: 300 600; font-display: swap; }
@font-face { font-family: 'JetBrains Mono'; src: url('../fonts/jetbrains-mono-latin-variable.woff2') format('woff2'); font-style: normal; font-weight: 400 500; font-display: swap; }

:root {
  --ink:        #0A1929;   /* deep hull navy   */
  --ink-2:      #14233A;
  --paper:      #F4EFE6;   /* warm marine chart paper */
  --paper-2:    #EBE4D6;
  --rust:       #C24914;   /* single accent — anti-corrosion paint */
  --rust-dim:   #8E3409;
  --steel:      #5D6B7C;
  --line:       rgba(10, 25, 41, 0.12);
  --line-paper: rgba(244, 239, 230, 0.18);

  --f-display: 'Fraunces', 'Times New Roman', serif;
  --f-body:    'IBM Plex Sans', -apple-system, sans-serif;
  --f-mono:    'JetBrains Mono', 'Consolas', monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--f-body);
  background: var(--paper);
  color: var(--ink);
  font-weight: 300;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

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

/* paper grain */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.4;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/%3E%3CfeColorMatrix values='0 0 0 0 0.04 0 0 0 0 0.1 0 0 0 0 0.16 0 0 0 0.08 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ─── shared layout ─── */

.shell {
  max-width: 1480px;
  margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 64px);
  position: relative;
  z-index: 2;
}

/* ─── top bar ─── */

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(8px);
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  gap: 32px;
}

.brand {
  display: flex;
  align-items: baseline;
  gap: 12px;
  font-family: var(--f-display);
  font-weight: 500;
  letter-spacing: 0.02em;
}

.brand-mark {
  font-size: 22px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.brand-zh {
  font-family: var(--f-body);
  font-size: 13px;
  color: var(--steel);
  letter-spacing: 0.12em;
}

.nav {
  display: flex;
  gap: 36px;
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nav a {
  position: relative;
  padding: 6px 0;
  color: var(--ink);
  transition: color 0.2s;
}

.nav a::after {
  content: '';
  position: absolute;
  left: 0; right: 100%;
  bottom: 0;
  height: 1px;
  background: var(--rust);
  transition: right 0.3s ease;
}

.nav a:hover::after,
.nav a.is-active::after { right: 0; }

.topbar-cta {
  font-family: var(--f-mono);
  font-size: 12px;
  color: var(--ink);
  border: 1px solid var(--ink);
  padding: 9px 16px;
  transition: all 0.2s;
}

.topbar-cta:hover {
  background: var(--ink);
  color: var(--paper);
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 18px;
}

.lang {
  display: flex;
  align-items: center;
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--steel);
  gap: 8px;
}

.lang a {
  padding: 4px 2px;
  border-bottom: 1px solid transparent;
  transition: all 0.2s;
}

.lang a:hover { color: var(--ink); }

.lang a.is-active {
  color: var(--rust);
  border-bottom-color: var(--rust);
}

.lang-sep {
  color: var(--line);
}

/* ─── footer ─── */

.foot {
  background: var(--ink);
  color: var(--paper);
  padding: 80px 0 32px;
  margin-top: 120px;
  position: relative;
  z-index: 2;
}

.foot-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 60px;
  border-bottom: 1px solid var(--line-paper);
}

.foot-brand {
  font-family: var(--f-display);
  font-size: 28px;
  letter-spacing: 0.04em;
  margin-bottom: 14px;
}

.foot-zh {
  font-size: 13px;
  color: rgba(244, 239, 230, 0.6);
  margin-bottom: 24px;
  letter-spacing: 0.1em;
}

.foot-blurb {
  font-size: 14px;
  color: rgba(244, 239, 230, 0.7);
  max-width: 32ch;
  line-height: 1.7;
}

.foot h4 {
  font-family: var(--f-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--rust);
  margin-bottom: 18px;
  font-weight: 500;
}

.foot ul { list-style: none; }
.foot li {
  font-size: 13px;
  margin-bottom: 8px;
  color: rgba(244, 239, 230, 0.85);
}
.foot li a:hover { color: var(--rust); }

.foot-bot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 28px;
  font-family: var(--f-mono);
  font-size: 11px;
  color: rgba(244, 239, 230, 0.4);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* ─── shared typography ─── */

.eyebrow {
  font-family: var(--f-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.24em;
  color: var(--rust);
  font-weight: 500;
}

.h-display {
  font-family: var(--f-display);
  font-weight: 300;
  font-variation-settings: "opsz" 144, "SOFT" 20;
  letter-spacing: -0.02em;
  line-height: 0.98;
}

.h-section {
  font-family: var(--f-display);
  font-weight: 400;
  font-variation-settings: "opsz" 72;
  font-size: clamp(36px, 5vw, 64px);
  line-height: 1.04;
  letter-spacing: -0.015em;
}

.mono { font-family: var(--f-mono); }

/* selection */
::selection { background: var(--rust); color: var(--paper); }

/* ─── responsive ─── */

@media (max-width: 880px) {
  .topbar-inner { height: 64px; gap: 16px; }
  .brand-zh { display: none; }
  .nav { display: none; }
  .topbar-cta { display: none; }
  .foot-grid { grid-template-columns: 1fr 1fr; gap: 36px; }
  .foot-bot { flex-direction: column; gap: 12px; text-align: center; }
}
