/* Keegan Digital Studio — shared styles */

:root {
  --bg: #0f1115;
  --card: #181b22;
  --text: #eef0f4;
  --muted: #9aa3b2;
  --accent: #f5b544;
  /* additions */
  --bg-2: #13161c;
  --border: rgba(255, 255, 255, .08);
  --accent-soft: rgba(245, 181, 68, .14);
  --radius: 14px;
  --maxw: 1100px;
  --header-h: 64px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}
main { flex: 1; }
a { color: inherit; }
img { max-width: 100%; display: block; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 16px; }
@media (min-width: 640px) { .container { padding: 0 24px; } }

.skip-link {
  position: absolute; left: 12px; top: -48px; z-index: 100;
  background: var(--accent); color: #111; padding: 8px 14px; border-radius: 8px;
  font-weight: 700; text-decoration: none; transition: top .2s;
}
.skip-link:focus { top: 12px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--accent); color: #111;
  padding: 14px 28px; border-radius: 10px; border: 0;
  font: inherit; font-weight: 700; text-decoration: none; cursor: pointer;
  box-shadow: 0 6px 24px -8px rgba(245, 181, 68, .55);
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), opacity .2s;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 10px 30px -8px rgba(245, 181, 68, .7); }
.btn:active { transform: translateY(0); }
.btn[disabled] { opacity: .6; cursor: progress; transform: none; }
.btn-ghost {
  background: transparent; color: var(--text); box-shadow: none;
  border: 1px solid var(--border);
}
.btn-ghost:hover { border-color: var(--accent); box-shadow: none; }

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(15, 17, 21, .78);
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.site-header .container {
  height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 700; letter-spacing: .5px; text-decoration: none;
}
.brand-mark {
  width: 28px; height: 28px; border-radius: 8px;
  background: linear-gradient(135deg, var(--accent), #f08a3c);
  display: grid; place-items: center; color: #111; font-size: .8rem; font-weight: 800;
}
.nav-toggle {
  display: inline-flex; flex-direction: column; justify-content: center; gap: 5px;
  width: 44px; height: 44px; padding: 10px;
  background: transparent; border: 1px solid var(--border); border-radius: 10px; cursor: pointer;
}
.nav-toggle span {
  display: block; height: 2px; width: 100%; background: var(--text); border-radius: 2px;
  transition: transform .25s var(--ease), opacity .2s;
}
.nav-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.site-nav {
  position: absolute; top: var(--header-h); left: 0; right: 0;
  background: var(--bg-2); border-bottom: 1px solid var(--border);
  padding: 8px 16px 16px;
  display: none;
}
.nav-open .site-nav { display: block; }
.site-nav ul { list-style: none; display: flex; flex-direction: column; gap: 4px; }
.site-nav a {
  display: block; padding: 12px 8px; text-decoration: none; color: var(--muted);
  border-radius: 8px; font-weight: 600; transition: color .2s, background .2s;
}
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--text); background: rgba(255, 255, 255, .04); }
.site-nav a[aria-current="page"] { color: var(--accent); }

@media (min-width: 760px) {
  .nav-toggle { display: none; }
  .site-nav { position: static; display: block; background: none; border: 0; padding: 0; }
  .site-nav ul { flex-direction: row; gap: 8px; }
  .site-nav a { padding: 8px 14px; }
}

/* ---------- Sections ---------- */
.section { padding: 72px 0; }
.section-head { margin-bottom: 28px; }
.section-head h2 { font-size: clamp(1.6rem, 3.5vw, 2.2rem); line-height: 1.2; }
.section-head p { color: var(--muted); margin-top: 6px; max-width: 620px; }
.eyebrow {
  display: inline-block; color: var(--accent); font-weight: 700;
  text-transform: uppercase; font-size: .8rem; letter-spacing: 1.2px;
}

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; padding: 64px 0 80px; isolation: isolate; }
.hero-glow {
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  -webkit-mask-image: linear-gradient(to bottom, #000 60%, transparent);
  mask-image: linear-gradient(to bottom, #000 60%, transparent);
}
.hero-glow::before, .hero-glow::after {
  content: ""; position: absolute; border-radius: 50%; filter: blur(80px); opacity: .55;
}
.hero-glow::before {
  width: 520px; height: 520px; top: -160px; left: -120px;
  background: radial-gradient(circle, rgba(245, 181, 68, .55), transparent 65%);
  animation: drift-a 18s ease-in-out infinite alternate;
}
.hero-glow::after {
  width: 460px; height: 460px; bottom: -200px; right: -100px;
  background: radial-gradient(circle, rgba(124, 92, 255, .45), transparent 65%);
  animation: drift-b 22s ease-in-out infinite alternate;
}
@keyframes drift-a { to { transform: translate(140px, 90px) scale(1.15); } }
@keyframes drift-b { to { transform: translate(-120px, -80px) scale(1.1); } }

.hero-grid { display: grid; gap: 40px; align-items: center; }
.hero-copy { text-align: center; }
.hero h1 { font-size: clamp(2.4rem, 7vw, 4rem); line-height: 1.05; margin: 12px 0 14px; letter-spacing: -.5px; }
.hero h1 .accent {
  background: linear-gradient(90deg, var(--accent), #ffd78a);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-sub { color: var(--muted); font-size: 1.15rem; max-width: 520px; margin: 0 auto 28px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }

.hero-media {
  position: relative; border-radius: 20px; overflow: hidden;
  aspect-ratio: 4 / 3; background: linear-gradient(160deg, #1d212a, #13161c);
  border: 1px solid var(--border);
  box-shadow: 0 30px 80px -30px rgba(0, 0, 0, .8), 0 0 0 1px rgba(245, 181, 68, .06);
}
.hero-media img { position: relative; z-index: 1; width: 100%; height: 100%; object-fit: cover; }
.media-placeholder {
  position: absolute; inset: 0; display: grid; place-items: center; text-align: center;
  color: var(--muted); font-size: .9rem; padding: 16px;
}
.media-placeholder strong { display: block; color: var(--text); font-size: 1rem; }

@media (min-width: 900px) {
  .hero { padding: 96px 0 112px; }
  .hero-grid { grid-template-columns: 1.05fr 1fr; gap: 56px; }
  .hero-copy { text-align: left; }
  .hero-sub { margin-left: 0; }
  .hero-actions { justify-content: flex-start; }
}

/* ---------- Cards / grids ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; }
.card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; text-decoration: none; display: flex; flex-direction: column;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s;
}
.card:hover, .card:focus-visible {
  transform: translateY(-6px);
  border-color: rgba(245, 181, 68, .35);
  box-shadow: 0 18px 40px -18px rgba(0, 0, 0, .8), 0 0 0 1px rgba(245, 181, 68, .12);
}
.card-media { aspect-ratio: 16 / 10; background: linear-gradient(135deg, #222631, #181b22); overflow: hidden; }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s var(--ease); }
.card:hover .card-media img { transform: scale(1.04); }
.card-media.img-missing { background: linear-gradient(135deg, var(--accent-soft), #181b22 70%); }
.card-media.img-missing img { display: none; }
.card .body { padding: 18px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card h3 { font-size: 1.1rem; line-height: 1.3; }
.card p { color: var(--muted); font-size: .95rem; }
.card .meta { color: var(--accent); font-size: .8rem; font-weight: 600; letter-spacing: .3px; }
.card .more { margin-top: auto; padding-top: 8px; color: var(--accent); font-weight: 600; font-size: .9rem; }

.empty-state {
  grid-column: 1 / -1; text-align: center; padding: 48px 20px;
  border: 1px dashed var(--border); border-radius: var(--radius); color: var(--muted);
}
.empty-state strong { display: block; color: var(--text); font-size: 1.1rem; margin-bottom: 4px; }

/* ---------- Signup ---------- */
.signup-box {
  position: relative; overflow: hidden;
  background: linear-gradient(140deg, #1b1f27, var(--card));
  border: 1px solid var(--border); border-radius: 20px;
  padding: 32px 20px; text-align: center;
}
.signup-box::before {
  content: ""; position: absolute; width: 360px; height: 360px; top: -180px; right: -120px;
  background: radial-gradient(circle, rgba(245, 181, 68, .25), transparent 65%);
  pointer-events: none;
}
.signup-box h2 { font-size: clamp(1.5rem, 3.5vw, 2rem); }
.signup-box > p { color: var(--muted); margin: 6px auto 22px; max-width: 520px; }
.signup-form { display: flex; flex-direction: column; gap: 10px; max-width: 480px; margin: 0 auto; position: relative; }
.signup-form input[type="email"] {
  flex: 1; min-width: 0; font: inherit; color: var(--text);
  background: var(--bg); border: 1px solid var(--border); border-radius: 10px;
  padding: 14px 16px; transition: border-color .2s, box-shadow .2s;
}
.signup-form input[type="email"]:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.hp-field { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form-msg { min-height: 1.6em; margin-top: 12px; font-weight: 600; font-size: .95rem; }
.form-msg.ok { color: #6ee7a8; }
.form-msg.err { color: #ff8a80; }
.fine-print { color: var(--muted); font-size: .8rem; margin-top: 8px; }
.fine-print a { color: var(--text); }
@media (min-width: 560px) {
  .signup-box { padding: 48px 40px; }
  .signup-form { flex-direction: row; }
}

/* ---------- Page header (inner pages) ---------- */
.page-hero { position: relative; overflow: hidden; padding: 56px 0 24px; isolation: isolate; }
.page-hero h1 { font-size: clamp(2rem, 5vw, 2.8rem); line-height: 1.15; margin-top: 8px; }
.page-hero p { color: var(--muted); margin-top: 8px; max-width: 620px; }

/* ---------- Prose (articles, legal) ---------- */
.prose { max-width: 70ch; margin: 0 auto; padding: 0 16px 80px; font-size: 1.075rem; line-height: 1.75; }
.prose h1 { font-size: clamp(1.9rem, 5vw, 2.6rem); line-height: 1.2; margin: 8px 0 12px; }
.prose h2 { font-size: 1.45rem; line-height: 1.3; margin: 2.2em 0 .6em; }
.prose h3 { font-size: 1.15rem; margin: 1.6em 0 .4em; }
.prose p, .prose ul, .prose ol { margin-bottom: 1.1em; }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose li { margin-bottom: .35em; }
.prose a { color: var(--accent); text-underline-offset: 3px; }
.prose blockquote { border-left: 3px solid var(--accent); padding: 4px 0 4px 18px; color: var(--muted); margin: 1.4em 0; }
.prose img { border-radius: var(--radius); margin: 1.6em 0; }
.prose hr { border: 0; border-top: 1px solid var(--border); margin: 2.4em 0; }
.prose .lede { color: var(--muted); font-size: 1.2rem; }
.post-meta { color: var(--muted); font-size: .9rem; }
.post-cover { aspect-ratio: 16 / 9; width: 100%; object-fit: cover; background: var(--card); }
.back-link {
  display: inline-flex; align-items: center; gap: 6px; margin: 32px 0 8px;
  color: var(--muted); text-decoration: none; font-weight: 600; font-size: .95rem;
}
.back-link:hover { color: var(--accent); }
.notice {
  background: var(--accent-soft); border: 1px solid rgba(245, 181, 68, .35); color: var(--text);
  border-radius: 12px; padding: 14px 18px; font-size: .95rem; margin: 20px 0 28px;
}
.notice strong { color: var(--accent); }
.effective { color: var(--muted); font-size: .95rem; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--border); padding: 32px 0; color: var(--muted); font-size: .9rem; }
.site-footer .container { display: flex; flex-direction: column; gap: 14px; align-items: center; text-align: center; }
.footer-links { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 20px; justify-content: center; }
.site-footer a { text-decoration: none; transition: color .2s; }
.site-footer a:hover { color: var(--accent); }
@media (min-width: 760px) {
  .site-footer .container { flex-direction: row; justify-content: space-between; text-align: left; }
}

/* ---------- Scroll reveal ---------- */
.js .reveal {
  opacity: 0; transform: translateY(24px);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
  transition-delay: var(--delay, 0s);
}
.js .reveal.is-visible { opacity: 1; transform: none; }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important; animation-iteration-count: 1 !important;
    transition-duration: .001ms !important; transition-delay: 0s !important;
  }
  .js .reveal { opacity: 1; transform: none; }
  .card:hover, .card:focus-visible, .btn:hover { transform: none; }
  .card:hover .card-media img { transform: none; }
}
