/* ===================================================================
   site.css — Cleaned & Annotated
   Goals:
   - Tokens → base → header → nav → hero → cards → footer
   - Remove duplicates (manifesto appeared twice, hero had two versions)
   - Separate homepage hero (.hero-banner) from reading hero (.hero)
   =================================================================== */

/* ========== Tokens ========== */
:root {
  --bg:#fffdf8; --ink:#141414; --muted:#6b6b6b; --line:#ececec;
  --max:1120px; --space:clamp(16px, 2vw, 28px);
}

/* ========== Base ========== */
* { box-sizing:border-box }
html, body { margin:0; padding:0; background:var(--bg); color:var(--ink); }
body { 
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI",
               "Helvetica Neue", Helvetica, sans-serif;
  line-height: 1.5;
  letter-spacing: .01em;
}

a { color:inherit; text-decoration:none } a:hover { opacity:.9 }
.container { max-width:var(--max); margin:0 auto; padding:0 var(--space) }
a, button {
  -webkit-tap-highlight-color: transparent;
}
/* ========== Header + Nav ========== */
.site-header {
  position:sticky; top:0; z-index:20;
  background:rgba(255,253,248,.9); backdrop-filter:saturate(180%) blur(8px);
  border-bottom:1px solid var(--line);
}

.header-inner { display:flex; align-items:center; justify-content:space-between; min-height:100px; gap:16px }
.brand { font-weight:700; font-size:clamp(18px,2.2vw,22px) }
.brand img {
  height: 20px;   /* adjust as needed for your design */
  width: auto;    /* keep aspect ratio */
  display: block; /* remove inline spacing */
}

.site-nav { display:flex; gap:30px; align-items:center }
.nav-link { padding:8px 6px; border-radius:8px; font-weight:500; opacity:.85; text-decoration: none; }
.nav-link:hover, .nav-link:focus, .nav-link.active { outline: none; color: #999; opacity: 1; background: transparent }

/* Mobile nav */
.menu-toggle {
  display:none; inline-size:40px; block-size:40px;
  border-radius:10px; border:none; background:transparent; position:relative; cursor:pointer;
}
.menu-toggle::before, .menu-toggle::after {
  content:""; position:absolute; left:9px; right:9px; height:2px; background:var(--ink);
  transition:transform .2s ease, top .2s ease;
}
.menu-toggle::before { top:12px } .menu-toggle::after { top:24px }
.menu-toggle:hover::before,
.menu-toggle:hover::after {
  background: #999;  /* change dashes to gray */
}
@media (max-width:860px) {
  .menu-toggle { display:inline-block }
  .site-nav { position:absolute; inset:64px 0 auto 0; display:none; flex-direction:column;
    background:var(--bg); border-bottom:1px solid var(--line); padding:12px var(--space); }
  .site-nav.open { display:flex }
}

/* ====================================================================
   HERO SYSTEM
   - Home (index.html): .hero-banner → glass card overlay
   - Reading (reading.html): .hero → image + gradient + centered text
   ==================================================================== */

/* Home hero */
.hero-banner { position: relative }
.hero-banner .hero-img {
  width:100%; height:auto; aspect-ratio: 16 / 9;
  object-fit:cover; object-position:center; display:block; max-height: 880px;
}
.banner-overlay { position:absolute; inset:0; display:grid; place-items:center; padding:clamp(16px,4vw,40px) }
.glass-card {
  display:grid; gap:8px; padding:clamp(16px,3vw,32px);
  width:min(720px,92%); background:rgba(255,255,255,.18);
  border:1px solid rgba(255,255,255,.35); border-radius:16px;
  backdrop-filter:blur(10px) saturate(120%); box-shadow:0 10px 40px rgba(0,0,0,.16);
}
.display { margin:0 0 6px; font-weight:700; font-size:clamp(34px,6vw,72px); line-height:1.1 }
.display .subtext { display:block; font-weight:600; font-size:clamp(14px,2.2vw,18px); margin-top:16px }
.en { font-weight:600; letter-spacing:.04em; opacity:.85 }
@media (max-width:480px) { .hero-banner .en{font-size:12px;line-height:1.4} }

/* Reading hero */
.hero { position:relative; width:100%; height:0; padding-top:56.25%; overflow:hidden }
.hero .hero-bg { position:absolute; inset:0; overflow:hidden }
.hero .hero-img {
  position:absolute; inset:0; width:100%; height:100%;
  object-fit:cover; object-position:center;
}
.hero-overlay { position:absolute; inset:0; background:linear-gradient(to bottom, rgba(0,0,0,.35), rgba(0,0,0,.55)) }
.hero-content {
  position:absolute; inset:0; display:flex; flex-direction:column; justify-content:center; align-items:center;
  text-align:center; padding:0 20px; z-index:2; color:#b8b5b5; /* softer than pure white */
}
.hero-content .kicker {
  background: rgba(255,255,255,.15); border:1px solid rgba(255,255,255,.4);
  color:#b8b5b5; margin-bottom:12px; padding:6px 12px; border-radius:999px; font-size:12px; letter-spacing:.1em;
}
.hero-content .hero-title { font-size:2.4rem; margin-bottom:12px }
.hero-content .hero-sub { font-size:1.1rem; line-height:1.8; max-width:720px }
@media (max-width:560px) {
  .hero-content .hero-title{font-size:1.6rem}
  .hero-content .hero-sub{font-size:1rem}
}
/* warm placeholder so the hero doesn't feel empty while loading */
.hero, .hero-banner .hero-bg { background-color: #f7f3e8; }

/* optional soft fade-in */
.hero-img { opacity: 0; transition: opacity .3s ease; }
.hero-img:is([complete="true"]), .hero-img:not([src=""]) { opacity: 1; }


/* ========== Cards ========== */
.grid { display:grid; gap:16px; grid-template-columns:repeat(12,1fr) }
.card { grid-column:span 4; display:block; border:1px solid var(--line); border-radius:16px; padding:18px; background:#fff; transition:.2s }
.card:hover { transform:translateY(-2px); box-shadow:0 6px 24px rgba(0,0,0,.06) }
.card .title { font-weight:700; margin:6px 0 2px }
.card .sub { color:var(--muted); font-size:.92em; margin:0 }
@media (max-width:920px){ .card{grid-column:span 6} }
@media (max-width:560px){ .card{grid-column:span 12} }
/* Home 4-link grid */
.grid-home {
  display: grid;
  grid-template-columns: 1fr 1fr; /* 2 columns */
  gap: 20px;
  margin-top: 32px;
}

.grid-home .card {
  grid-column: auto;          /* stop using span 4/6 defaults */
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;    /* left-align text */
  text-align: left;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  transition: transform .2s, box-shadow .2s;
}
.grid-home .card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(0,0,0,.06);
}

/* Stack 1 column on small screens */
@media (max-width: 560px) {
  .grid-home {
    grid-template-columns: 1fr;
  }
}
/* ===== Reading page: make 2×3 and 1×3 elegant (keep your style, no HTML changes) ===== */

/* 6 items → 2 columns on desktop/tablet, 1 column on phones */
.grid-6 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  align-items: stretch;                /* equal height cards */
}

/* 3 items → 3 columns on desktop, 2 on tablet, 1 on phones */
.cards-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  align-items: stretch;
}

/* Make the cards feel like index: lighter “box”, more air, subtle shadow */
.grid-6 .feat-card,
.cards-3 .card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: left;
  padding: 20px 22px;
  border-radius: 16px;
  border: 1px solid rgba(0, 0, 0, .08);      /* lighter border → no “bracket” look */
  background: #fff;
  box-shadow: 0 6px 24px rgba(0, 0, 0, .06);  /* soft shadow like index */
  text-decoration: none;                      /* no underline */
  color: inherit;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
  -webkit-tap-highlight-color: transparent;   /* kill iOS grey tap block */
}

/* Hover / tap feedback: subtle lift + slightly darker edge */
.grid-6 .feat-card:hover,
.cards-3 .card:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 34px rgba(0, 0, 0, .08);
  border-color: rgba(0, 0, 0, .14);
}

/* Titles & subtitles to match your index cards */
.grid-6 .feat-card .title,
.cards-3 .card .title {
  margin: 0 0 6px;
  font-weight: 700;
  font-size: 1.05rem;
  line-height: 1.35;
  color: #222;
}
.grid-6 .feat-card .sub,
.cards-3 .card .sub {
  margin: 0;
  color: var(--muted);
  font-size: .95rem;
  line-height: 1.6;
}

/* Responsive: stack neatly on smaller screens */
@media (max-width: 860px) {
  .cards-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .grid-6,
  .cards-3 { grid-template-columns: 1fr; }
}

/* Optional: accessible focus (keyboard) without the ugly iOS rectangle */
.grid-6 .feat-card:focus-visible,
.cards-3 .card:focus-visible {
  outline: 2px solid #999;
  outline-offset: 2px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, .08);
}



/* ========== Manifesto ========== */
.manifesto { padding:48px 0 8px; border-top:1px solid #eee }
.manifesto-title { text-align:center; margin-bottom:18px; font-size:1.8rem; color:#222 }
.manifesto-text { max-width:760px; margin:0 auto; font-size:1.06rem; line-height:1.9; color:#444 }
.manifesto-text p { margin-bottom:1.4em }
.manifesto-text strong { color:#7a5c86 }

/* ========== Features (3-up cards) ========== */
.features { padding:28px 0 8px }
.cards-3 { display:grid; grid-template-columns:repeat(3,1fr); gap:16px }
.cards-3 .card {
  background:#fff; border:1px solid rgba(0,0,0,.06); border-radius:16px;
  padding:18px; box-shadow:0 8px 24px rgba(0,0,0,.05);
}
.cards-3 h3 { margin:0 0 6px; font-size:1.05rem }
.cards-3 p { margin:0; color:#4b4e53 }

/* ========== Featured 6 ========== */
.featured { padding:32px 0 8px }
.featured .section-title { text-align:center; margin-bottom:16px }
.grid-6 { display:grid; grid-template-columns:repeat(3,1fr); gap:14px; max-width:1080px; margin:0 auto }
.feat-card {
  display:grid; grid-template-rows:auto auto 1fr; gap:6px;
  padding:16px; border-radius:16px; border:1px solid rgba(0,0,0,.06);
  background:#fff; text-decoration:none; color:inherit;
  box-shadow:0 8px 24px rgba(0,0,0,.05);
  transition:transform .18s, box-shadow .18s, border-color .18s;
}
.feat-card:hover { transform:translateY(-2px); box-shadow:0 14px 34px rgba(0,0,0,.08); border-color:rgba(0,0,0,.12) }
.feat-index { display:inline-block; font-variant-numeric:tabular-nums; font-weight:700; color:#7a5c86; opacity:.9 }
.feat-title { margin:0; font-size:1.02rem; line-height:1.4; color:#222 }
.feat-sub { margin:0; color:#4b4e53; font-size:.95rem }
@media (max-width:980px){ .grid-6{grid-template-columns:1fr 1fr} }
@media (max-width:560px){ .grid-6{grid-template-columns:1fr} }

/* ========== Footer ========== */
/* === Footer === */
.site-footer {
  border-top: none;
  padding: 20px 0;
  margin-top: 40px;
  margin-bottom: 40px;
}

/* Footer nav links */
.footer-nav {
  display: flex;
  gap: 20px;
  margin-bottom: 12px; /* space above copyright */
}
.footer-nav a {
  font-size: 15px;
  color: var(--muted);
  text-decoration: none;
  transition: color .2s ease;
}
.footer-nav a:hover,
.footer-nav a:focus {
  color: #999;
  text-decoration: none;
}

/* Footer copyright text — responsive sizing */
.site-footer p.copyright {
  color: var(--muted);
  margin: 0;
  line-height: 1.5;
  font-size: 14px;   /* ~13px on desktop */
}
@media (max-width: 1024px) {
  .site-footer p.copyright {
    font-size: 15px; /* ~14–15px on tablets */
  }
}
@media (max-width: 600px) {
  .site-footer p.copyright {
    font-size: 15px;   /* ~16px on phones */
  }
}



/* === Subscribe band === */
.subscribe {
  background: transparent;
  border-top: none;
  border-bottom: none;
  padding: clamp(48px, 8vw, 96px) 0;
}

.subscribe .cta-bar {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: clamp(16px, 4vw, 48px);
}

.subscribe .cta-text h3 {
  margin: 0 0 8px;
  font-size: .85rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  font-weight: 600;
  color: #666;
}
.subscribe .cta-text p {
  margin: 0;
  max-width: 50ch;
  font-size: 1rem;
  line-height: 1.7;
  color: #222;
}

/* Form layout */
.subscribe .cta-form {
  display: flex;
  align-items: flex-end;
  gap: 12px;
}

/* Email input — underline only, no grey bracket */
.subscribe .cta-form input[type="email"] {
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  border: none;
  border-bottom: 1px solid #222;    /* single underline */
  border-radius: 0;
  padding: 8px 0 10px;
  width: min(320px, 60vw);
  font: inherit;
  color: #111;
  outline: none;
  transition: border-color .2s ease;
}
.subscribe .cta-form input::placeholder {
  color: #999;
}
.subscribe .cta-form input:focus {
  border-bottom-color: #999;        /* subtle color shift */
}

/* Button — simple pill */
.subscribe .cta-form button {
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  color: #111;
  border: 1px solid #111;
  border-radius: 999px;
  padding: 8px 18px;
  font-weight: 500;
  letter-spacing: .04em;
  transition: all .2s ease;
  cursor: pointer;
}
.subscribe .cta-form button:hover {
  background: #111;
  color: #fff;
  border-color: #111;
  transform: translateY(-1px);
}

/* Mobile stack */
@media (max-width: 720px) {
  .subscribe .cta-bar {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: left;
    gap: 24px;
  }
  .subscribe .cta-form { width: 100%; }
  .subscribe .cta-form input[type="email"] { width: 100%; }
}


