/* === Obford — Heritage Meets Future (Variable-driven CSS) === */
:root {
  --bg: #fdfdfb;         /* light neutral background */
  --panel: #ffffff;      /* white panels */
  --stone: #f2f2ed;      /* soft stone grey */
  --text: #1c1c1c;       /* dark text for readability */
  --muted: #555555;      /* muted grey for secondary text */
  --gold: #c9a84e;       /* muted gold accent */
  --gold-2: #a68b3c;     /* deeper bronze for gradients */
  --accent: #1d4d4f;     /* optional teal accent */
  --ring: rgba(201,168,78,.35); /* gold highlight ring */
  --shadow: rgba(0,0,0,.08);
}

/* === Dark theme (auto-applies if system prefers dark mode) === */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d1117;         /* dark navy base */
    --panel: #161b22;      /* slightly lighter panel */
    --stone: #1c2128;      /* deep stone grey */
    --text: #e5e2da;       /* off-white text */
    --muted: #a0a0a0;      /* muted grey */
    --gold: #c9a84e;       /* muted gold accent */
    --gold-2: #a68b3c;     /* deeper bronze */
    --accent: #1d4d4f;     /* teal accent */
    --ring: rgba(201,168,78,.5); /* brighter highlight */
    --shadow: rgba(0,0,0,.35);
  }
}

.logo { content: url("assets/obford-logo/obford-black-freed.png"); }

/* dark theme → light logo */
@media (prefers-color-scheme: dark) {
  .logo { content: url("assets/obford-logo/obford-white-freed.png"); }
}

* { box-sizing: border-box }
html, body { height: 100% }
html { scroll-behavior: smooth }
body {
  margin: 0;
  font: 16px/1.6 Inter, system-ui, -apple-system, Segoe UI, Roboto, Helvetica Neue, Arial, sans-serif;
  color: var(--text);
  background-color: var(--bg);
  background-image:
    radial-gradient(1200px 600px at 20% -10%, color-mix(in srgb, var(--gold) 5%, transparent), transparent 60%),
    radial-gradient(900px 500px at 120% 10%, color-mix(in srgb, var(--gold) 4%, transparent), transparent 50%);
}

/* accessibility */
.skip-link {
  position: absolute; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden;
}
.skip-link:focus {
  left: 1rem; top: 1rem; width: auto; height: auto;
  background: var(--bg); color: var(--text);
  padding: .5rem .75rem; z-index: 1000;
}

/* layout */
.container { max-width: 1100px; margin-inline: auto; padding: 0 1.25rem }

/* header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: linear-gradient(to bottom, color-mix(in srgb, var(--bg) 95%, transparent), color-mix(in srgb, var(--bg) 60%, transparent));
  backdrop-filter: blur(6px);
  border-bottom: 1px solid color-mix(in srgb, var(--gold) 15%, transparent);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 64px }
.brand { display: flex; align-items: center; gap: .75rem; font-weight: 700; letter-spacing: .18em }
.brand-name, .brand span { font-family: Georgia, Cambria, 'Times New Roman', serif; color: var(--text); }

.nav-list { display: flex; gap: 1.25rem; list-style: none; margin: 0; padding: 0 }
.nav-list a { color: var(--muted); text-decoration: none; padding: .5rem .25rem; border-radius: .25rem }
.nav-list a:hover, .nav-list a:focus { color: var(--text) }
.nav-list .cta { color: var(--panel); background: var(--gold); padding: .5rem .75rem; border-radius: .5rem }
.nav-toggle { display: none; background: none; border: 0; cursor: pointer }
.nav-toggle .bar { display: block; width: 22px; height: 2px; background: var(--text); margin: 4px 0 }

@media (max-width: 820px) {
  .nav-toggle { display: block }
  .nav-list {
    position: fixed; inset: 64px 0 auto 0; flex-direction: column;
    background: color-mix(in srgb, var(--bg) 98%, transparent);
    padding: 1rem 1.25rem;
    transform: translateY(-120%); transition: transform .3s ease;
    border-bottom: 1px solid color-mix(in srgb, var(--gold) 15%, transparent);
  }
  .nav-list.open { transform: translateY(0) }
}

/* hero */
.hero {
  position: relative; overflow: hidden;
  padding: clamp(4rem, 8vw, 8rem) 0;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--bg) 50%, transparent), transparent 40%),
    radial-gradient(900px 600px at 70% 0%, color-mix(in srgb, var(--gold) 10%, transparent), transparent 70%);
}
.hero-overlay {
  position: absolute; inset: 0;
  background-image:
    repeating-linear-gradient(90deg, color-mix(in srgb, var(--gold) 5%, transparent) 0 1px, transparent 1px 40px),
    repeating-linear-gradient(0deg, color-mix(in srgb, var(--gold) 3%, transparent) 0 1px, transparent 1px 40px);
  mask-image: radial-gradient(70% 60% at 50% 40%, color-mix(in srgb, var(--bg) 90%, transparent), transparent);
  pointer-events: none;
}
.hero-inner { text-align: center }
.hero-title {
  font-family: Georgia, Cambria, 'Times New Roman', serif;
  font-size: clamp(2.2rem, 5vw, 4rem);
  line-height: 1.1;
  margin: .5rem 0 0;
  text-shadow: 0 2px 30px color-mix(in srgb, var(--gold) 15%, transparent);
}
.hero-subtitle { color: var(--muted); margin: .75rem 0 1.25rem }
.hero-ctas { display: flex; gap: .75rem; justify-content: center; flex-wrap: wrap }
.button {
  display: inline-block;
  border: 1px solid color-mix(in srgb, var(--gold) 50%, transparent);
  padding: .7rem 1rem; border-radius: .6rem;
  color: var(--text); text-decoration: none;
  background: linear-gradient(var(--panel), var(--stone));
  box-shadow: 0 6px 18px var(--shadow), inset 0 0 0 1px rgba(255,255,255,.04);
}
.button:hover {
  border-color: var(--gold);
  box-shadow: 0 10px 24px var(--shadow), 0 0 0 3px var(--ring);
}
.button.primary {
  background: linear-gradient(180deg, var(--gold), var(--gold-2));
  color: var(--panel);
}
.button.primary:hover { filter: brightness(1.05) }

.glyphs { position: absolute; inset: 0; pointer-events: none; opacity: .6 }
.glyphs svg { width: 100%; height: 100% }
.grid-path { stroke: var(--gold); stroke-opacity: .15; fill: none; stroke-width: .5 }


/* sections */
.section { padding: clamp(3rem, 7vw, 5rem) 0 }
.section-head { margin-bottom: 1.25rem }
.section h2 {
  font-family: Georgia, Cambria, 'Times New Roman', serif;
  font-weight: 700; letter-spacing: .02em; font-size: clamp(1.6rem, 3.5vw, 2.2rem);
}
.section p { color: var(--muted) }

.split { display: grid; grid-template-columns: 1.1fr .9fr; gap: 1.25rem }
@media (max-width: 940px) { .split { grid-template-columns: 1fr; gap: 1rem } }

.panel {
  border: 1px solid color-mix(in srgb, var(--gold) 15%, transparent);
  border-radius: 18px; padding: 1.25rem;
  background: var(--panel);
  box-shadow: 0 12px 40px var(--shadow);
}
.panel.stone {
  background: var(--stone);
}
.panel.circuit {
  display: flex; align-items: center; justify-content: center;
  background: var(--stone);
}
.circuit-svg { width: 100%; height: auto }
.circuit-lines path, .circuit-lines circle {
  stroke: var(--gold); stroke-opacity: .45; fill: none; stroke-width: 2
}
.circuit-lines circle { fill: var(--gold); opacity: .5 }

.ticks { list-style: none; padding: 0; margin: .75rem 0 0; display: grid; gap: .35rem }
.ticks li { position: relative; padding-left: 1.25rem; color: var(--text) }
.ticks li:before { content:"◆"; position: absolute; left: 0; color: var(--gold); opacity: .8 }

/* cards */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem }
@media (max-width: 940px) { .cards { grid-template-columns: 1fr } }
.card {
  background: var(--panel);
  border: 1px solid color-mix(in srgb, var(--gold) 15%, transparent);
  border-radius: 18px; padding: 1rem;
  box-shadow: 0 12px 40px var(--shadow);
}
.card h3 { margin: .25rem 0 .5rem }
.card .glyph { font-size: 1.6rem; color: var(--gold); opacity: .9 }

/* timeline */
.timeline { position: relative; margin-top: .5rem }
.timeline:before {
  content:""; position: absolute; left: calc(10px + .4rem); top: 0; bottom: 0; width: 2px;
  background: linear-gradient(var(--gold), color-mix(in srgb, var(--gold) 15%, transparent));
}
.tl-item { position: relative; display: flex; gap: 1rem; padding-left: 2rem; margin: 1.1rem 0 }
.tl-dot {
  position: absolute; left: 0; top: .4rem; width: .9rem; height: .9rem;
  background: var(--gold); border-radius: 50%;
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--gold) 15%, transparent);
}
.tl-content {
  background: var(--panel);
  border: 1px solid color-mix(in srgb, var(--gold) 15%, transparent);
  border-radius: 14px; padding: .9rem;
}

/* posts */
.posts { display: grid; grid-template-columns: repeat(3,1fr); gap: 1rem }
@media (max-width: 940px) { .posts { grid-template-columns: 1fr } }
.post {
  background: var(--panel);
  border: 1px solid color-mix(in srgb, var(--gold) 15%, transparent);
  border-radius: 14px; padding: 1rem;
}
.post .more { color: var(--gold); text-decoration: none }
.post .more:hover { text-decoration: underline }

/* forms */
.contact-form .grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem }
@media (max-width: 700px) { .contact-form .grid { grid-template-columns: 1fr } }
label { display: grid; gap: .4rem; color: var(--muted) }
input, textarea {
  background: var(--panel);
  border: 1px solid color-mix(in srgb, var(--gold) 25%, transparent);
  border-radius: 10px; padding: .75rem;
  color: var(--text); outline: none;
}
input:focus, textarea:focus { border-color: var(--gold); box-shadow: 0 0 0 3px var(--ring) }
.form-actions { margin-top: .75rem }
.form-note { color: var(--muted); font-size: .875rem; margin-top: .5rem }

/* footer */
.site-footer {
  border-top: 1px solid color-mix(in srgb, var(--gold) 15%, transparent);
  padding: 1.25rem 0;
  background: var(--stone);
}
.footer-inner { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; justify-content: space-between }
.site-footer nav { display: flex; gap: 1rem; flex-wrap: wrap }
.site-footer nav a { color: var(--muted); text-decoration: none }
.site-footer nav a:hover { color: var(--text) }

/* trusted section */
.trusted {
  padding: 2rem 0;
  background: var(--stone);
  border-top: 1px solid color-mix(in srgb, var(--gold) 15%, transparent);
  border-bottom: 1px solid color-mix(in srgb, var(--gold) 15%, transparent);
  text-align: center;
}
.trusted-text {
  font-size: 0.95rem;
  color: var(--muted);
  margin-bottom: 1rem;
}
.trusted-logos {
  display: flex; justify-content: center; flex-wrap: wrap;
  gap: 2rem; list-style: none; padding: 0; margin: 0;
}
.trusted-logos img {
  max-width: 120px; width: auto; height: auto; object-fit: contain;
  filter: grayscale(100%) brightness(150%);
  opacity: 0.85;
  transition: opacity 0.2s ease, filter 0.2s ease;
}
.trusted-logos img:hover { opacity: 1; filter: none }

/* reveal on scroll */
.reveal { opacity: 0; transform: translateY(8px); transition: opacity .7s ease, transform .7s ease }
.reveal.visible { opacity: 1; transform: none }

/* motion preferences */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto }
  .reveal { transition: none }
}
