/* =========================================================
   Kallaras — AI Speakers (preview build)
   Clean, editorial, premium. Dark ink hero, warm off-white body.
   ========================================================= */

/* ---------- Design tokens ---------- */
:root {
  --ink:        #0d0f14;   /* dark hero */
  --ink-soft:   #161a22;
  --ink-line:   #272d39;
  --paper:      #f6f3ec;   /* warm off-white body */
  --paper-alt:  #efe9dd;   /* alternating section */
  --text:       #1b1d22;   /* body text on paper */
  --text-muted: #5c5f68;
  --on-ink:     #f3f1ea;   /* text on dark */
  --on-ink-mut: #a3a8b4;
  --accent:     #c8912e;   /* warm gold */
  --accent-ink: #e4b14e;   /* gold on dark */
  --accent-deep:#a9771d;

  /* placeholder styling */
  --ph-bg:      #fdf3dc;
  --ph-border:  #d8ae4e;
  --ph-text:    #8a6a12;

  --maxw: 1180px;
  --pad: clamp(1.1rem, 4vw, 2.75rem);
  --radius: 14px;
  --radius-sm: 9px;

  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-serif: "Fraunces", Georgia, "Times New Roman", serif;
  --font-mono: ui-monospace, "SFMono-Regular", "Menlo", "Consolas", monospace;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 86px; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--text);
  background: var(--paper);
  line-height: 1.6;
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.08rem);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a { color: var(--accent-deep); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--accent); }

h1, h2, h3 { font-family: var(--font-serif); font-weight: 600; line-height: 1.08; margin: 0; letter-spacing: -0.01em; }

.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--pad); }

/* ---------- Accessibility helpers ---------- */
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: 0.75rem; top: -3rem; z-index: 100;
  background: var(--ink); color: var(--on-ink);
  padding: 0.6rem 1rem; border-radius: var(--radius-sm);
  transition: top 0.18s ease; text-decoration: none; font-weight: 600;
}
.skip-link:focus { top: 0.75rem; }

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

/* ---------- Placeholder styling (never mistaken for real content) ---------- */
.ph {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.82em;
  line-height: 1.45;
  color: var(--ph-text);
  background: var(--ph-bg);
  border: 1px dashed var(--ph-border);
  border-radius: 6px;
  padding: 0.14em 0.5em;
  letter-spacing: 0.01em;
}
/* placeholder blocks that are paragraphs should read as full-width-ish blocks */
p.ph, h3.ph, li.ph, blockquote.ph { display: block; }

/* ---------- Placeholder image blocks ---------- */
.ph-img {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 160px;
  border-radius: var(--radius);
  border: 1px dashed var(--ph-border);
  background:
    repeating-linear-gradient(45deg, rgba(0,0,0,0.025) 0 10px, rgba(0,0,0,0) 10px 20px),
    linear-gradient(145deg, #e9e2d4, #ddd4c2 55%, #cdbf9f);
  color: var(--ph-text);
  overflow: hidden;
}
.hero .ph-img {
  background:
    repeating-linear-gradient(45deg, rgba(255,255,255,0.04) 0 10px, rgba(255,255,255,0) 10px 20px),
    linear-gradient(150deg, #20242e, #2b303c 55%, #353b49);
  border-color: #4a4433;
}
.hero .ph-img-label { color: var(--accent-ink); background: rgba(0,0,0,0.35); border-color: #6a5c38; }
.ratio-4-3 { aspect-ratio: 4 / 3; min-height: 0; }
.ph-img-label {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  padding: 0.2em 0.6em;
}

/* =========================================================
   HEADER
   ========================================================= */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(246, 243, 236, 0.82);
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid rgba(0,0,0,0.08);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; min-height: 68px;
}
.brand {
  font-family: var(--font-serif); font-weight: 600; font-size: 1.15rem;
  color: var(--ink); text-decoration: none; letter-spacing: -0.01em; white-space: nowrap;
}
.main-nav {
  display: flex; align-items: center; gap: clamp(0.8rem, 1.6vw, 1.6rem);
}
.main-nav a {
  color: var(--text); text-decoration: none; font-weight: 500; font-size: 0.95rem;
  white-space: nowrap;
}
.main-nav a:hover { color: var(--accent-deep); }
.main-nav .nav-cta {
  background: var(--ink); color: var(--on-ink);
  padding: 0.5rem 0.95rem; border-radius: 999px; font-weight: 600;
}
.main-nav .nav-cta:hover { background: var(--accent-deep); color: #fff; }

.header-controls { display: flex; align-items: center; gap: 0.75rem; }

/* mobile menu button (hidden on desktop) */
.menu-btn {
  display: none;
  flex-direction: column; justify-content: center; gap: 4px;
  width: 42px; height: 38px; padding: 0 9px;
  background: transparent; border: 1px solid rgba(0,0,0,0.18); border-radius: 9px;
  cursor: pointer;
}
.menu-bar { display: block; height: 2px; width: 100%; background: var(--ink); border-radius: 2px; }

/* =========================================================
   HERO
   ========================================================= */
.hero {
  background: radial-gradient(1200px 600px at 78% -10%, #1b2130 0%, var(--ink) 60%);
  color: var(--on-ink);
  padding-block: clamp(3rem, 8vw, 6.5rem);
}
.hero-grid {
  display: grid; grid-template-columns: 1.15fr 0.85fr; gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}
.eyebrow {
  text-transform: uppercase; letter-spacing: 0.18em; font-size: 0.78rem;
  font-weight: 600; color: var(--accent-ink); margin: 0 0 0.9rem;
}
.hero-title {
  font-size: clamp(2.4rem, 6vw, 4.4rem);
  color: #fff; margin-bottom: 0.7rem;
}
.hero-reach {
  font-size: clamp(1rem, 2.2vw, 1.25rem);
  color: var(--on-ink-mut); letter-spacing: 0.04em; margin: 0 0 1.4rem;
  font-weight: 500;
}
.hero-intro { max-width: 46ch; margin-bottom: 2rem; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 0.85rem; }

.hero-portraits { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.portrait { margin: 0; }
.portrait .ph-img { aspect-ratio: 3 / 4; min-height: 0; }
.portrait figcaption {
  margin-top: 0.6rem; font-family: var(--font-serif); font-size: 1.02rem;
  color: var(--on-ink); text-align: center;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-sans); font-weight: 600; font-size: 0.98rem;
  padding: 0.8rem 1.5rem; border-radius: 999px; text-decoration: none;
  border: 1.5px solid transparent; cursor: pointer; transition: transform 0.12s ease, background 0.18s ease, color 0.18s ease;
}
.btn-primary { background: var(--accent); color: #1a1407; }
.btn-primary:hover { background: var(--accent-ink); color: #140f05; transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--on-ink); border-color: rgba(255,255,255,0.35); }
.btn-ghost:hover { border-color: var(--accent-ink); color: var(--accent-ink); }
.btn-disabled {
  background: #d9d2c4; color: #6c6559; border-color: #cabfad; cursor: not-allowed;
  opacity: 0.85;
}
.btn-disabled:hover { transform: none; }

/* =========================================================
   SECTIONS
   ========================================================= */
.section { padding-block: clamp(3rem, 7vw, 5.5rem); }
.section-alt { background: var(--paper-alt); }
.section-head { max-width: 62ch; margin-bottom: clamp(1.6rem, 3vw, 2.6rem); }
.section-title { font-size: clamp(1.8rem, 4vw, 2.9rem); margin-bottom: 0.6rem; }
.section-lead { margin-top: 0.9rem; }
.section-note {
  margin-top: 0.8rem; font-weight: 600; color: var(--accent-deep);
  font-size: 0.95rem;
}

.prose { max-width: 68ch; margin-block: 0 1.1rem; color: var(--text); }

/* ---------- Gallery ---------- */
.gallery {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(0.7rem, 1.6vw, 1.1rem);
  margin-bottom: clamp(2rem, 4vw, 3rem);
}

/* ---------- Talks table ---------- */
.talks-table-wrap { overflow-x: auto; }
.talks-table {
  width: 100%; border-collapse: collapse; font-size: 0.97rem;
}
.talks-table th, .talks-table td {
  text-align: left; padding: 0.95rem 1rem; border-bottom: 1px solid rgba(0,0,0,0.1);
  vertical-align: top;
}
.talks-table thead th {
  font-family: var(--font-sans); font-weight: 600; font-size: 0.78rem;
  text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-muted);
  border-bottom: 2px solid rgba(0,0,0,0.18);
}
.talks-table tbody tr:hover { background: rgba(0,0,0,0.02); }

/* ---------- Pillars ---------- */
.pillars {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: clamp(1rem, 2.4vw, 1.6rem); margin-top: 1.5rem;
}
.pillar {
  background: #fff; border: 1px solid rgba(0,0,0,0.08); border-radius: var(--radius);
  padding: 1.5rem; box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}
.pillar h3 { font-size: 1.2rem; margin-bottom: 0.7rem; }

/* ---------- Cards ---------- */
.cards {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: clamp(1rem, 2.2vw, 1.5rem);
}
.card {
  background: #fff; border: 1px solid rgba(0,0,0,0.08); border-radius: var(--radius);
  padding: clamp(1.4rem, 2.4vw, 2rem); box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}
.card-title { font-size: 1.5rem; margin-bottom: 0.4rem; }
.card-meta { margin: 0 0 0.6rem; font-size: 0.95rem; }
.card-role { margin: 0 0 0.9rem; font-weight: 600; color: var(--text); }
.card-feature {
  grid-column: span 2;
  border-color: var(--accent);
  background: linear-gradient(180deg, #fffdf7, #fff);
  box-shadow: 0 6px 24px rgba(168, 119, 29, 0.08);
}

/* ---------- Two columns ---------- */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1.4rem, 4vw, 3rem); }
.col-title { font-size: 1.25rem; margin-bottom: 1rem; }
.plain-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.7rem; }

/* ---------- Editorial (next step) ---------- */
.editorial {
  font-family: var(--font-serif);
  font-size: clamp(1.4rem, 3.2vw, 2.3rem);
  line-height: 1.3; font-weight: 400; font-style: italic;
  margin: 0 0 1.8rem; padding: 1.4rem 0 1.4rem 1.6rem;
  border-left: 4px solid var(--accent);
  max-width: 24ch;
}
.editorial.ph { max-width: none; }

/* ---------- Social ---------- */
.social-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: clamp(0.9rem, 2vw, 1.4rem);
}
.social-card {
  background: #fff; border: 1px solid rgba(0,0,0,0.08); border-radius: var(--radius);
  padding: 1.3rem; display: flex; flex-direction: column; gap: 0.8rem;
  min-height: 150px;
}
.social-tag {
  align-self: flex-start;
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--accent-deep); background: #fbf3df;
  border: 1px solid #ecdcb1; border-radius: 999px; padding: 0.22rem 0.7rem;
}

/* ---------- Contact ---------- */
.contact-block {
  background: #fff; border: 1px solid rgba(0,0,0,0.08); border-radius: var(--radius);
  padding: clamp(1.6rem, 3.5vw, 2.6rem); max-width: 740px;
}
.contact-block .plain-list { margin: 0.4rem 0 1.6rem; }
.contact-block .btn { margin-bottom: 0.9rem; }
.fineprint { margin: 0; font-size: 0.88rem; color: var(--text-muted); }

/* ---------- Source links (small, visible provenance) ---------- */
.source {
  display: inline-block;
  font-family: var(--font-mono); font-size: 0.74rem;
  color: var(--accent-deep); text-decoration: none;
  background: #fbf3df; border: 1px solid #ecdcb1; border-radius: 999px;
  padding: 0.12rem 0.6rem; letter-spacing: 0.01em;
}
.source:hover { background: #f6e9c6; color: var(--accent-deep); }
.source-line { margin: 0.9rem 0 0; display: flex; flex-wrap: wrap; gap: 0.5rem; }

/* ---------- Attributed quotes (vision) ---------- */
.quote {
  font-family: var(--font-serif); font-style: italic;
  font-size: 1.05rem; line-height: 1.4; margin: 0 0 0.9rem;
}
.attribution { margin: 0; font-size: 0.86rem; color: var(--text-muted); }
.attribution .source { margin-left: 0.3rem; }

/* ---------- Role note + marked list ---------- */
.role-note { font-weight: 500; color: var(--text-muted); }
.list-marked { list-style: disc; padding-left: 1.2rem; }
.list-marked li { color: var(--text); }

/* =========================================================
   FOOTER
   ========================================================= */
.site-footer {
  background: var(--ink); color: var(--on-ink);
  padding-block: clamp(2.2rem, 5vw, 3.2rem);
}
.footer-inner {
  display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between;
  gap: 1.4rem 1.6rem;
}
.footer-names { font-family: var(--font-serif); font-size: 1.15rem; margin: 0 0 0.5rem; color: #fff; }
.footer-meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem;
  margin: 0; color: var(--on-ink-mut); font-size: 0.9rem;
}
.footer-domain { color: var(--on-ink); font-weight: 600; letter-spacing: 0.02em; }
.footer-meta .dot { color: #4a505e; }
.footer-sources-title {
  margin: 0 0 0.5rem; font-size: 0.74rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.1em; color: var(--on-ink-mut);
}
.footer-sources-list {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: 0.3rem; font-size: 0.9rem;
}
.footer-sources-list a { color: var(--accent-ink); }

/* =========================================================
   REVEAL ON SCROLL (optional, progressive)
   ========================================================= */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.is-visible { opacity: 1; transform: none; }

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-portraits { max-width: 440px; }
  .cards { grid-template-columns: 1fr; }
  .card-feature { grid-column: auto; }
  .pillars { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .social-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 820px) {
  html { scroll-padding-top: 72px; }

  /* collapse nav into toggled panel */
  .menu-btn { display: inline-flex; }
  .main-nav {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--paper);
    border-bottom: 1px solid rgba(0,0,0,0.1);
    box-shadow: 0 16px 30px rgba(0,0,0,0.12);
    padding: 0.5rem var(--pad) 1.1rem;
    display: none;
  }
  .main-nav.is-open { display: flex; }
  .main-nav a { padding: 0.8rem 0.2rem; border-bottom: 1px solid rgba(0,0,0,0.07); }
  .main-nav .nav-cta {
    margin-top: 0.7rem; text-align: center; border-bottom: 0;
  }
  .two-col { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  .gallery { grid-template-columns: 1fr 1fr; }
  .social-grid { grid-template-columns: 1fr; }
  .hero-portraits { grid-template-columns: 1fr 1fr; }

  /* stacked cards for talks table */
  .talks-table thead { display: none; }
  .talks-table, .talks-table tbody, .talks-table tr, .talks-table td { display: block; width: 100%; }
  .talks-table tr {
    border: 1px solid rgba(0,0,0,0.12); border-radius: var(--radius);
    margin-bottom: 1rem; padding: 0.4rem 0.9rem; background: #fff;
  }
  .talks-table td { border: 0; padding: 0.55rem 0; display: flex; gap: 0.75rem; }
  .talks-table td::before {
    content: attr(data-label);
    flex: 0 0 7rem;
    font-weight: 600; font-size: 0.78rem; text-transform: uppercase;
    letter-spacing: 0.06em; color: var(--text-muted);
    padding-top: 0.25rem;
  }
}

/* =========================================================
   REDUCED MOTION
   ========================================================= */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1; transform: none; }
}
