/* Judgement: Daybreak — site styles.
   Ported from the design mockup: dark-only, amber accent, Space Grotesk. */

/* ---------- fonts (self-hosted; no external requests) ---------- */
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('/fonts/space-grotesk-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('/fonts/space-grotesk-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('/fonts/space-grotesk-vietnamese.woff2') format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1,
    U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329,
    U+1EA0-1EF9, U+20AB;
}

/* ---------- tokens ---------- */
:root {
  color-scheme: dark;

  --bg: #0b0c0e;
  --accent: #e8a33d;
  --accent-hi: #f4c073;

  --fg:   oklch(0.93 0.008 90);
  --fg-2: oklch(0.80 0.01 90);
  --fg-3: oklch(0.72 0.01 90);
  --fg-4: oklch(0.68 0.01 90);
  --fg-5: oklch(0.60 0.01 90);
  --fg-6: oklch(0.55 0.01 90);
  --fg-7: oklch(0.50 0.01 90);

  --line:      rgba(255, 255, 255, 0.10);
  --line-soft: rgba(255, 255, 255, 0.08);
  --line-hard: rgba(255, 255, 255, 0.15);
  --panel:     rgba(255, 255, 255, 0.02);

  --font: 'Space Grotesk', ui-sans-serif, system-ui, -apple-system, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --wrap: 1100px;
  --wrap-narrow: 720px;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

main { flex: 1; }

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hi); }

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

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--bg);
  color: var(--accent);
  padding: 12px 18px;
  border: 1px solid var(--accent);
}
.skip-link:focus { left: 12px; top: 12px; }

@keyframes glowPulse { 0%, 100% { opacity: 0.55; } 50% { opacity: 1; } }
@keyframes dashMove  { to { background-position: 80px 0; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

/* ---------- nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 24px;
  background: rgba(11, 12, 14, 0.9);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line-soft);
}

.nav__brand {
  font-weight: 700;
  letter-spacing: 0.04em;
  font-size: 16px;
  color: var(--fg);
  white-space: nowrap;
}
.nav__brand:hover { color: var(--fg); }
.nav__brand em { color: var(--accent); font-style: normal; }

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

.nav__link {
  color: var(--fg-2);
  font-size: 14px;
  letter-spacing: 0.03em;
  padding: 4px 0;
  text-transform: uppercase;
}
.nav__link:hover { color: var(--accent-hi); }
.nav__link[aria-current='page'] { color: var(--accent); }

/* CSS-only mobile menu — <details>, so it works with JS disabled. */
.nav__menu { display: none; position: relative; }
.nav__menu > summary {
  list-style: none;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  color: #fff;
  width: 40px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}
.nav__menu > summary::-webkit-details-marker { display: none; }
.nav__menu > summary::after { content: '\2630'; }
.nav__menu[open] > summary::after { content: '\2715'; }

.nav__drawer {
  position: absolute;
  right: -24px;
  top: calc(100% + 18px);
  width: 100vw;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
  padding: 8px 24px 20px;
}
.nav__drawer .nav__link {
  font-size: 16px;
  padding: 12px 0;
  text-transform: none;
}
.nav__drawer .nav__link + .nav__link { border-top: 1px solid var(--line-soft); }

@media (max-width: 720px) {
  .nav__links { display: none; }
  .nav__menu  { display: block; }
}

/* ---------- shared layout ---------- */
.wrap         { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.wrap--narrow { max-width: var(--wrap-narrow); }
.page         { padding: 100px 0; }

.eyebrow {
  font-size: 13px;
  letter-spacing: 0.15em;
  color: var(--accent);
  margin-bottom: 18px;
}

.page__title {
  font-size: clamp(28px, 5vw, 44px);
  font-weight: 700;
  margin: 0 0 36px;
  line-height: 1.15;
}

.rule { height: 1px; background: var(--line); border: 0; margin: 48px 0; }

/* Hatched placeholder — swap for real art by dropping an <img> inside. */
.shot {
  border: 1px dashed var(--line-hard);
  border-radius: 6px;
  background: repeating-linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.03) 0 14px,
    rgba(255, 255, 255, 0.06) 14px 28px
  );
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.shot--wide { aspect-ratio: 16 / 7; }
.shot--tile { aspect-ratio: 4 / 3; }
.shot span { font-family: var(--mono); font-size: 13px; color: var(--fg-5); }

/* Real art replacing a placeholder: keep the source's own aspect ratio rather
   than cropping it into the placeholder frame, and trade the dashed outline
   for a solid one. */
.shot--filled {
  aspect-ratio: auto;
  display: block;
  border-style: solid;
  border-color: var(--line);
  background: none;
}
.shot--filled img { width: 100%; height: auto; }

/* ---------- home ---------- */
.hero {
  position: relative;
  padding: 100px 24px 80px;
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}

.hero__dash {
  height: 2px;
  width: 220px;
  margin: 0 auto 32px;
  background: repeating-linear-gradient(90deg, var(--accent) 0 12px, transparent 12px 20px);
  box-shadow: 0 0 16px 2px rgba(232, 163, 61, 0.6);
  animation: dashMove 2.4s linear infinite;
}

.hero__kicker {
  font-size: 13px;
  letter-spacing: 0.15em;
  color: var(--accent);
  margin-bottom: 18px;
  animation: glowPulse 3s ease-in-out infinite;
}

.hero__title {
  font-size: clamp(36px, 7vw, 68px);
  line-height: 1.05;
  font-weight: 700;
  margin: 0 0 24px;
  letter-spacing: -0.01em;
}
.hero__title em { color: var(--accent); font-style: normal; }

.hero__quote {
  font-size: clamp(16px, 2.2vw, 20px);
  font-style: italic;
  color: var(--fg-2);
  max-width: 620px;
  margin: 0 auto 20px;
  line-height: 1.5;
}

.hero__blurb {
  font-size: 17px;
  color: var(--fg-3);
  max-width: 560px;
  margin: 0 auto 36px;
  line-height: 1.6;
}

.badge {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  padding: 10px 18px;
  border: 1px solid var(--line-hard);
  border-radius: 999px;
  font-size: 13px;
  color: var(--fg-5);
}
.badge::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  flex: none;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  padding: 40px 0 100px;
}

.card {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 26px 22px;
  background: var(--panel);
}
.card h3 { font-size: 16px; margin: 0 0 10px; font-weight: 600; }
.card p  { font-size: 14px; line-height: 1.55; color: var(--fg-4); margin: 0; }

.glyph { width: 10px; height: 10px; background: var(--accent); margin-bottom: 18px; }
.glyph--diamond { transform: rotate(45deg); }
.glyph--dot     { border-radius: 50%; }
.glyph--ring    { background: none; border: 2px solid var(--accent); }

/* ---------- story ---------- */
.prose p {
  font-size: 17px;
  line-height: 1.75;
  color: var(--fg-2);
  margin: 0 0 24px;
}

.notes-label {
  font-size: 13px;
  letter-spacing: 0.1em;
  color: var(--fg-6);
  margin-bottom: 24px;
}

.notes { display: flex; flex-direction: column; gap: 18px; margin: 0; }
.notes p {
  font-size: 15px;
  font-style: italic;
  line-height: 1.6;
  color: var(--fg-4);
  border-left: 2px solid rgba(232, 163, 61, 0.4);
  padding-left: 18px;
  margin: 0;
}

/* ---------- features ---------- */
.features { display: flex; flex-direction: column; gap: 64px; }

.feature {
  display: flex;
  gap: 40px;
  flex-wrap: wrap;
  align-items: center;
}
.feature--flip { flex-wrap: wrap-reverse; }
.feature .shot { flex: 1 1 260px; }
.feature__body { flex: 1 1 280px; }
.feature__body h3 { font-size: 22px; margin: 0 0 14px; font-weight: 600; }
.feature__body p  { font-size: 15px; line-height: 1.7; color: var(--fg-3); margin: 0; }

/* ---------- news ---------- */
.posts { display: flex; flex-direction: column; }

.post-item {
  border-top: 1px solid var(--line);
  padding: 28px 0;
}
.post-item:last-child { border-bottom: 1px solid var(--line); }

.post-date {
  font-size: 13px;
  color: var(--fg-6);
  margin-bottom: 10px;
  display: block;
}

.post-item h2 { font-size: 19px; margin: 0 0 12px; font-weight: 600; }
.post-item h2 a { color: var(--fg); }
.post-item h2 a:hover { color: var(--accent); }

.post-item p { font-size: 15px; line-height: 1.75; color: var(--fg-3); margin: 0 0 14px; }

.post-more { font-size: 14px; }
.post-more::after { content: ' \2192'; }

.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.tag {
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--fg-5);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px 10px;
}

/* single post body */
.post-body { font-size: 15px; line-height: 1.75; color: var(--fg-3); }
.post-body p { margin: 0 0 18px; }
.post-body h2 { font-size: 20px; color: var(--fg); margin: 40px 0 14px; font-weight: 600; }
.post-body h3 { font-size: 17px; color: var(--fg); margin: 32px 0 12px; font-weight: 600; }
.post-body ul, .post-body ol { margin: 0 0 18px; padding-left: 22px; }
.post-body li { margin-bottom: 8px; }
.post-body img { border-radius: 6px; margin: 24px 0; }
.post-body blockquote {
  border-left: 2px solid rgba(232, 163, 61, 0.4);
  padding-left: 18px;
  margin: 0 0 18px;
  font-style: italic;
  color: var(--fg-4);
}
.post-body code {
  font-family: var(--mono);
  font-size: 13px;
  background: rgba(255, 255, 255, 0.06);
  padding: 2px 6px;
  border-radius: 3px;
}
.post-body pre {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 16px;
  overflow-x: auto;
}
.post-body pre code { background: none; padding: 0; }
.post-body hr { height: 1px; background: var(--line); border: 0; margin: 32px 0; }

.back-link { font-size: 14px; display: inline-block; margin-bottom: 28px; }
.back-link::before { content: '\2190  '; }

.empty {
  border: 1px dashed var(--line-hard);
  border-radius: 6px;
  padding: 40px 24px;
  text-align: center;
  color: var(--fg-5);
  font-size: 15px;
}

/* ---------- footer ---------- */
.footer {
  border-top: 1px solid var(--line-soft);
  padding: 32px 24px;
  text-align: center;
  font-size: 13px;
  color: var(--fg-7);
}
.footer__links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 16px;
}
.footer__links a { color: var(--fg-5); }
.footer__links a:hover { color: var(--accent-hi); }
