/* Eastern Karate Canada — site styles
   Aesthetic: dark cinematic, sepia accents, serif display + sans body */

:root {
  --bg: #0e0c0a;
  --bg-elev: #15120e;
  --paper: #f7f1e7;
  --ink: #ece4d4;
  --ink-soft: #b8ad99;
  --ink-muted: #7a705f;
  --accent: #c39a4b;        /* aged gold */
  --accent-soft: #8c6d34;
  --rule: rgba(243, 230, 200, 0.12);
  --serif: 'Cormorant Garamond', 'Georgia', 'Times New Roman', serif;
  --sans: 'Inter', system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  font-weight: 400;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; transition: color .3s ease; }
a:hover { color: var(--accent); }
img { max-width: 100%; height: auto; }

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.01em;
  color: var(--paper);
  margin: 0 0 0.4em 0;
}
h1 { font-size: clamp(2.4rem, 5.5vw, 4.8rem); }
h2 { font-size: clamp(1.8rem, 3.2vw, 2.7rem); }
h3 { font-size: 1.4rem; }
h1 em, h2 em { color: var(--accent); font-style: italic; }

p { margin: 0 0 1em 0; }
.small { font-size: 0.86rem; color: var(--ink-muted); }
.eyebrow {
  font-family: var(--sans);
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--accent);
  margin: 0 0 1.3em 0;
}

.wrap { max-width: 1240px; margin: 0 auto; padding: 0 28px; }
.wrap.narrow { max-width: 760px; }
.longform p { margin-bottom: 1.5em; font-size: 1.08rem; }

/* ---------- Top nav ---------- */
.topnav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; justify-content: space-between; align-items: center;
  padding: 22px 36px;
  background: linear-gradient(to bottom, rgba(14,12,10,0.85), rgba(14,12,10,0));
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.brand {
  font-family: var(--serif); font-size: 1.55rem; font-weight: 600;
  letter-spacing: 0.02em; color: var(--paper);
}
.brand span { color: var(--accent); font-style: italic; }
.navlinks { display: flex; gap: 32px; }
.navlinks a {
  font-size: 0.84rem; text-transform: uppercase; letter-spacing: 0.18em;
  font-weight: 500; color: var(--ink-soft);
}
.navlinks a:hover { color: var(--paper); }
@media (max-width: 640px) {
  .topnav { padding: 16px 18px; }
  .navlinks { gap: 18px; }
  .navlinks a { font-size: 0.7rem; letter-spacing: 0.12em; }
}

/* ---------- Hero with Ken Burns ---------- */
.hero {
  position: relative;
  height: 100vh;
  min-height: 620px;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
}
.hero-bg {
  position: absolute; inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  transform-origin: 50% 50%;
  filter: saturate(0.85) brightness(0.78);
  animation: kenburns 24s ease-in-out infinite alternate;
  will-change: transform;
}
@keyframes kenburns {
  0%   { transform: scale(1.05) translate(0, 0); }
  100% { transform: scale(1.22) translate(-2.5%, -2%); }
}
.hero-grad {
  position: absolute; inset: 0;
  background:
    linear-gradient(to bottom, rgba(14,12,10,0.35) 0%, rgba(14,12,10,0) 30%, rgba(14,12,10,0.85) 90%),
    linear-gradient(to right, rgba(14,12,10,0.65) 0%, rgba(14,12,10,0) 50%);
}
.hero-inner {
  position: relative; z-index: 2;
  padding: 0 56px 96px 56px; max-width: 880px;
}
.hero-inner h1 { color: var(--paper); margin-bottom: 0.5em; }
.hero-inner .lede {
  font-size: clamp(1.05rem, 1.4vw, 1.25rem);
  color: var(--ink);
  max-width: 640px;
  margin-bottom: 2em;
}
.cta {
  display: inline-block;
  font-family: var(--sans);
  font-size: 0.82rem; font-weight: 600;
  letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--paper);
  padding: 16px 32px;
  border: 1px solid var(--accent);
  background: rgba(195, 154, 75, 0.05);
  transition: background .3s ease, color .3s ease;
}
.cta:hover { background: var(--accent); color: var(--bg); }
@media (max-width: 720px) {
  .hero { min-height: 520px; }
  .hero-inner { padding: 0 24px 64px 24px; }
}

/* ---------- Sections ---------- */
.section { padding: 120px 0; position: relative; }
.section.intro { background: var(--bg-elev); }
.section .eyebrow { text-align: center; }
.section h2 { text-align: center; margin-bottom: 1.4em; }
.section.intro .eyebrow,
.section.intro h2 { text-align: left; }
.section.intro .small { margin-top: 2em; color: var(--ink-muted); }

/* ---------- Recent cards ---------- */
.grid-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 32px;
  margin-top: 40px;
}
.card {
  background: var(--bg-elev);
  overflow: hidden;
  position: relative;
}
.card a { display: block; color: var(--ink); }
.card-img {
  height: 280px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  filter: saturate(0.9) brightness(0.85);
  transition: transform .8s cubic-bezier(.2,.7,.2,1), filter .5s ease;
}
.card:hover .card-img { transform: scale(1.06); filter: saturate(1) brightness(1); }
.card-body { padding: 24px 26px 30px 26px; }
.card-date {
  font-family: var(--sans);
  font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.18em;
  color: var(--accent); margin-bottom: 0.8em;
}
.card-text {
  font-family: var(--serif);
  font-size: 1.18rem; line-height: 1.4; color: var(--ink);
  margin: 0;
}

/* ---------- Page heads ---------- */
.page-head { padding: 180px 0 60px 0; border-bottom: 1px solid var(--rule); }
.page-head .eyebrow { color: var(--accent); }

/* ---------- Archive list ---------- */
.year-head {
  color: var(--accent-soft);
  font-size: clamp(2rem, 5vw, 3.4rem);
  margin: 80px 0 32px 0;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--rule);
  letter-spacing: 0.05em;
}
.year-head:first-child { margin-top: 40px; }
.post-list { list-style: none; padding: 0; margin: 0; }
.post-row { margin: 0 0 18px 0; }
.post-row a {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 28px;
  align-items: center;
  padding: 18px;
  background: var(--bg-elev);
  transition: background .3s ease, transform .3s ease;
}
.post-row a:hover { background: #1c1812; transform: translateX(6px); }
.row-thumb {
  width: 180px; height: 130px;
  background-size: cover; background-position: center;
  background-repeat: no-repeat;
}
.row-thumb-empty {
  background: linear-gradient(135deg, #2a2218, #15120e);
}
.row-date {
  font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.18em;
  color: var(--accent); margin-bottom: 0.4em;
}
.row-text {
  font-family: var(--serif); font-size: 1.08rem; line-height: 1.45;
  color: var(--ink); margin: 0;
}
@media (max-width: 640px) {
  .post-row a { grid-template-columns: 100px 1fr; gap: 14px; padding: 12px; }
  .row-thumb { width: 100px; height: 80px; }
  .row-text { font-size: 0.96rem; }
}

/* ---------- Gallery masonry ---------- */
.masonry {
  column-count: 4;
  column-gap: 18px;
}
@media (max-width: 1100px) { .masonry { column-count: 3; } }
@media (max-width: 740px)  { .masonry { column-count: 2; } }
@media (max-width: 440px)  { .masonry { column-count: 1; } }

.tile {
  display: block;
  break-inside: avoid;
  margin: 0 0 18px 0;
  background: var(--bg-elev);
  position: relative;
  overflow: hidden;
}
.tile-img {
  width: 100%;
  padding-bottom: 75%;
  background-size: cover; background-position: center;
  background-repeat: no-repeat;
  filter: saturate(0.85) brightness(0.88);
  transition: transform .9s cubic-bezier(.2,.7,.2,1), filter .4s ease;
}
.tile:hover .tile-img { transform: scale(1.05); filter: saturate(1) brightness(1); }
.tile-caption {
  position: absolute; inset: auto 0 0 0;
  padding: 18px 18px 14px 18px;
  background: linear-gradient(to top, rgba(14,12,10,0.92), rgba(14,12,10,0));
  color: var(--ink);
  font-family: var(--serif);
  font-size: 0.95rem; line-height: 1.35;
  transform: translateY(35%);
  opacity: 0;
  transition: transform .5s ease, opacity .4s ease;
}
.tile:hover .tile-caption { transform: translateY(0); opacity: 1; }

/* ---------- Single post page ---------- */
.post-head { padding: 180px 0 40px 0; }
.post-head h1 {
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  font-weight: 500;
}
.post-media { padding: 30px 0; }
.post-figure {
  max-width: 1200px;
  margin: 0 auto 48px auto;
  padding: 0 28px;
}
.figure-frame {
  position: relative;
  overflow: hidden;
  background: var(--bg-elev);
}
.figure-img {
  width: 100%;
  padding-bottom: 66%;
  background-size: cover; background-position: center;
  background-repeat: no-repeat;
}
.post-figure figcaption {
  font-family: var(--serif);
  font-style: italic;
  color: var(--ink-soft);
  font-size: 0.96rem;
  margin-top: 14px;
}
.post-body { padding: 40px 0 60px 0; }
.post-body p {
  font-family: var(--serif);
  font-size: 1.32rem;
  line-height: 1.55;
  color: var(--ink);
  margin-bottom: 1.1em;
}
.post-source { padding: 0 0 100px 0; }
.src-link {
  display: inline-block;
  font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.18em;
  color: var(--ink-muted);
  border-bottom: 1px solid var(--rule);
  padding-bottom: 4px;
}
.src-link:hover { color: var(--accent); border-color: var(--accent); }

/* ---------- Footer ---------- */
.sitefoot {
  border-top: 1px solid var(--rule);
  padding: 60px 0;
  background: var(--bg);
}
.sitefoot p { color: var(--ink-muted); font-size: 0.92rem; margin: 0 0 6px 0; text-align: center; }

/* ---------- Home pillars ---------- */
.pillar-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}
.pillar {
  display: block;
  padding: 44px 32px 36px 32px;
  background: var(--bg-elev);
  border-top: 1px solid var(--rule);
  color: var(--ink);
  transition: background .35s ease, transform .35s ease;
}
.pillar:hover { background: #1c1812; transform: translateY(-3px); color: var(--ink); }
.pillar .eyebrow {
  text-align: left;
  font-family: var(--serif);
  font-size: 2.6rem; font-weight: 500;
  letter-spacing: 0; text-transform: none;
  color: var(--accent);
  margin: 0 0 0.2em 0;
}
.pillar h3 {
  font-size: 1.35rem; margin: 0 0 0.6em 0; color: var(--paper);
}
.pillar p {
  color: var(--ink-soft); font-size: 0.98rem; line-height: 1.55;
  margin: 0 0 1.3em 0;
}
.pillar-cta {
  font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.2em;
  font-weight: 600; color: var(--accent);
}

.section .center { text-align: center; }
.see-all {
  text-align: center; margin-top: 48px;
}
.see-all a {
  font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.2em;
  color: var(--accent);
}
.see-all a:hover { color: var(--paper); }

/* ---------- People index ---------- */
.people-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
  margin-top: 40px;
}
.person-card {
  display: block;
  padding: 26px 24px;
  background: var(--bg-elev);
  border-top: 2px solid transparent;
  color: var(--ink);
  transition: background .3s ease, border-color .3s ease, transform .3s ease;
}
.person-card:hover {
  background: #1c1812; border-top-color: var(--accent);
  transform: translateY(-3px); color: var(--ink);
}
.person-name {
  font-family: var(--serif); font-size: 1.45rem; font-weight: 500;
  color: var(--paper); margin-bottom: 6px;
}
.person-role {
  font-style: italic; color: var(--accent); font-size: 0.94rem;
  margin-bottom: 12px;
}
.person-stats {
  font-size: 0.76rem; text-transform: uppercase; letter-spacing: 0.16em;
  color: var(--ink-muted);
}

/* ---------- Person detail ---------- */
.primary-bio { padding: 80px 0; }
.bio-photo { margin: 0 0 50px 0; }
.bio-body p {
  font-family: var(--serif); font-size: 1.3rem; line-height: 1.55;
  margin-bottom: 1.1em; color: var(--ink);
}
.bio-source { margin-top: 32px; }
.bio-source a {
  font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.18em;
  color: var(--ink-muted); border-bottom: 1px solid var(--rule);
}
.bio-source a:hover { color: var(--accent); border-color: var(--accent); }
.other-mentions h2 { text-align: center; }

/* ---------- Dojos ---------- */
.dojo-block { margin: 0 0 90px 0; }
.dojo-head {
  border-bottom: 1px solid var(--rule);
  padding-bottom: 18px; margin-bottom: 30px;
}
.dojo-head h2 { margin: 0 0 6px 0; }
.dojo-loc {
  color: var(--accent); font-size: 0.84rem; text-transform: uppercase;
  letter-spacing: 0.18em; margin: 0 0 8px 0;
}
.dojo-head .small { color: var(--ink-muted); margin: 0; }
.dojo-posts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
}
.dojo-post {
  display: block;
  background: var(--bg-elev);
  color: var(--ink);
  transition: background .3s ease;
}
.dojo-post:hover { background: #1c1812; color: var(--ink); }
.dojo-thumb {
  width: 100%; padding-bottom: 60%;
  background-size: cover; background-position: center;
  filter: saturate(0.85) brightness(0.85);
}
.dojo-text { padding: 16px 18px 20px 18px; }
.dojo-text p { font-family: var(--serif); font-size: 1rem; margin: 0; line-height: 1.4; }
.dojo-text .row-date { font-family: var(--sans); font-size: 0.72rem;
  text-transform: uppercase; letter-spacing: 0.18em; color: var(--accent);
  margin-bottom: 0.5em; }

/* ---------- Timeline ---------- */
.timeline .era { margin: 0 0 100px 0; }
.era-head {
  text-align: center;
  margin-bottom: 50px;
}
.era-years {
  font-family: var(--serif); font-size: 2.5rem; font-weight: 500;
  color: var(--accent); letter-spacing: 0.04em; margin: 0;
}
.era-head h2 { margin: 8px 0 0 0; font-style: italic; }
.era-events {
  list-style: none; padding: 0; margin: 0;
  border-left: 1px solid var(--rule);
  margin-left: 40px;
}
.event {
  position: relative;
  padding: 22px 0 22px 40px;
}
.event::before {
  content: '';
  position: absolute;
  left: -7px; top: 30px;
  width: 13px; height: 13px;
  background: var(--accent);
  border-radius: 50%;
  border: 3px solid var(--bg);
}
.event-year {
  display: inline-block;
  font-family: var(--serif); font-size: 1.3rem; font-weight: 600;
  color: var(--accent-soft); margin-right: 18px; min-width: 60px;
}
.event-text {
  font-family: var(--serif); font-size: 1.1rem; line-height: 1.5;
  color: var(--ink); display: inline;
}
.event-text:hover { color: var(--accent); }

/* ---------- Reveal-on-scroll ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 1s ease, transform 1.1s cubic-bezier(.2,.7,.2,1);
}
[data-reveal].is-revealed {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Reduce-motion respect ---------- */
@media (prefers-reduced-motion: reduce) {
  .hero-bg { animation: none; transform: scale(1.05); }
  [data-reveal] { opacity: 1; transform: none; transition: none; }
  .parallax-slow { transform: none !important; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
}
