/**
 * JaxBeachTech — Base Styles
 */

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.7;
  overflow-x: hidden;
  min-height: 100vh;
}

/* ── Grain overlay ── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.035'/%3E%3C/svg%3E");
  background-size: 200px;
  pointer-events: none;
  z-index: 9999;
  opacity: .55;
}

/* ── Decorative side rules ── */
body::after {
  content: '';
  position: fixed;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: linear-gradient(to bottom, transparent 5%, var(--gold) 20%, var(--gold) 80%, transparent 95%);
  opacity: .25;
  pointer-events: none;
  z-index: 9998;
}

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

h1 { font-size: clamp(2rem, 5vw, 3.5rem); margin-bottom: 1.2rem; }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.5rem); margin-bottom: 1rem; }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.75rem); margin-bottom: .8rem; }
h4 { font-size: 1.25rem; margin-bottom: .6rem; }
h5 { font-size: 1.05rem; margin-bottom: .5rem; }
h6 { font-size: .9rem; margin-bottom: .4rem; }

p {
  font-family: var(--serif);
  font-size: 1.05rem;
  font-weight: 300;
  color: var(--muted);
  line-height: 1.85;
  margin-bottom: 1.4rem;
}

p:last-child { margin-bottom: 0; }

a {
  color: var(--gold);
  text-decoration: none;
  border-bottom: 1px solid rgba(184,146,42,.3);
  transition: border-color var(--duration) var(--ease),
              color var(--duration) var(--ease);
}

a:hover {
  color: var(--gold2);
  border-color: var(--gold2);
}

em, i { font-style: italic; color: var(--gold); }

strong, b { font-weight: 600; color: var(--ink); }

blockquote {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.2rem;
  font-weight: 300;
  color: var(--muted);
  border-left: 3px solid var(--gold);
  padding: 1rem 1.5rem;
  margin: 2rem 0;
  background: rgba(184,146,42,.04);
}

blockquote cite {
  display: block;
  font-size: .8rem;
  font-style: normal;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--rule);
  margin-top: .5rem;
}

ul, ol {
  margin: 0 0 1.4rem 1.5rem;
  font-family: var(--serif);
  font-weight: 300;
  color: var(--muted);
}

li { margin-bottom: .4rem; line-height: 1.7; }

hr {
  border: none;
  border-top: 1px solid var(--rule);
  margin: 2.5rem 0;
}

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

code, pre {
  font-family: 'Courier New', Courier, monospace;
  font-size: .88rem;
  background: var(--warm);
  border: var(--border);
}

code {
  padding: .15em .4em;
  border-radius: var(--radius-sm);
  color: var(--ink);
}

pre {
  padding: 1.25rem;
  overflow-x: auto;
  border-radius: var(--radius-md);
  margin-bottom: 1.4rem;
}

pre code {
  background: none;
  border: none;
  padding: 0;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.4rem;
  font-family: var(--sans);
  font-size: .9rem;
}

th {
  font-family: var(--sans);
  font-size: .62rem;
  font-weight: 500;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 2px solid var(--rule);
  padding: .75rem 1rem;
  text-align: left;
}

td {
  padding: .75rem 1rem;
  border-bottom: 1px solid var(--warm);
  color: var(--ink);
}

tr:hover td { background: rgba(184,146,42,.03); }

/* ── Utility: Gold kicker label ── */
.kicker {
  font-family: var(--sans);
  font-size: .62rem;
  font-weight: 500;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--gold);
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-bottom: 1rem;
  border-bottom: none;
}

.kicker::before, .kicker::after {
  content: '';
  display: block;
  width: 28px;
  height: 1px;
  background: var(--gold);
  opacity: .5;
}

/* ── Ornament divider ── */
.ornament {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  margin: 2rem 0;
}

.ornament-line {
  width: 60px;
  height: 1px;
  background: var(--rule);
}

.ornament-diamond {
  width: 6px;
  height: 6px;
  background: var(--gold);
  transform: rotate(45deg);
  opacity: .6;
}

/* ── Animations ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeDown {
  from { opacity: 0; transform: translateY(-12px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.animate-fade-up   { animation: fadeUp .8s var(--ease) forwards; }
.animate-fade-down { animation: fadeDown .8s var(--ease) forwards; }
.animate-fade-in   { animation: fadeIn .8s var(--ease) forwards; }
