/* =====================================================
   StoryKeep 永恆誌 — Shared Stylesheet
   Design System: Vintage Ledger
   Colors: #F2E8D9 (parchment) | #1A1208 (ink) | #C9A84C (gold)
   Fonts: EB Garamond (headings) | Source Sans 3 (body)
   ===================================================== */

@import url('https://fonts.googleapis.com/css2?family=EB+Garamond:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500&family=Source+Sans+3:wght@300;400;600&family=Work+Sans:wght@400;600&display=swap');

/* ---------- Reset & Base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:       #F2E8D9;
  --ink:      #1A1208;
  --gold:     #C9A84C;
  --gold-dim: #a8873a;
  --warm:     #8B6347;
  --surface:  #FDF5EA;
  --border:   #cfc5bb;
  --shadow:   rgba(26,18,8,.08);

  --font-head: 'EB Garamond', Georgia, serif;
  --font-body: 'Source Sans 3', system-ui, sans-serif;
  --font-label:'Work Sans', sans-serif;

  --max-w: 1200px;
  --gutter: clamp(1.5rem, 5vw, 5rem);
  --radius: 2px;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.7;
  min-height: 100vh;
}

img { display: block; max-width: 100%; }
a   { color: inherit; text-decoration: none; }

/* ---------- Typography ---------- */
h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 500;
  line-height: 1.2;
  color: var(--ink);
}
h1 { font-size: clamp(2.4rem, 5vw, 4rem); }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.8rem); }
h3 { font-size: clamp(1.3rem, 2.5vw, 1.8rem); }
h4 { font-size: 1.2rem; }

.label-caps {
  font-family: var(--font-label);
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--warm);
}

/* ---------- Layout Helpers ---------- */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: clamp(3rem, 8vw, 6rem); }

/* ---------- Decorative ---------- */
.asterism { text-align: center; color: var(--gold); font-size: 1.2rem; letter-spacing: .5em; margin-block: 2.5rem; }
.divider  { width: 60px; height: 1px; background: var(--gold); margin-block: 1.25rem; }

/* =====================================================
   NAVIGATION
   ===================================================== */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(242,232,217,.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: var(--gutter);
  height: 64px;
}

.nav-logo {
  font-family: var(--font-head);
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: .5rem;
}
.nav-logo span { color: var(--gold); }

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}
.nav-links a {
  font-family: var(--font-label);
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink);
  position: relative;
  padding-bottom: 2px;
  transition: color .2s;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 0; height: 1px;
  background: var(--gold);
  transition: width .25s ease;
}
.nav-links a:hover, .nav-links a.active { color: var(--gold-dim); }
.nav-links a:hover::after, .nav-links a.active::after { width: 100%; }

/* Hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px;
}
.nav-toggle span {
  display: block;
  width: 22px; height: 1.5px;
  background: var(--ink);
  transition: all .25s;
}

/* =====================================================
   FOOTER
   ===================================================== */
.site-footer {
  background: var(--ink);
  color: #e2d9ca;
  padding-block: 3rem 2rem;
}

.footer-inner {
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: var(--gutter);
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 2.5rem;
}

.footer-brand .brand-name {
  font-family: var(--font-head);
  font-size: 1.4rem;
  color: var(--gold);
  margin-bottom: .5rem;
}
.footer-brand p { font-size: .9rem; opacity: .7; line-height: 1.6; }

.footer-links h4 {
  font-family: var(--font-label);
  font-size: .72rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1rem;
}
.footer-links ul { list-style: none; }
.footer-links li + li { margin-top: .5rem; }
.footer-links a { font-size: .9rem; opacity: .7; transition: opacity .2s; }
.footer-links a:hover { opacity: 1; color: var(--gold); }

.footer-contact h4 {
  font-family: var(--font-label);
  font-size: .72rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1rem;
}
.footer-contact p { font-size: .9rem; opacity: .7; margin-bottom: .4rem; }

.social-links { display: flex; gap: 1rem; margin-top: 1rem; }
.social-links a {
  width: 32px; height: 32px;
  border: 1px solid rgba(201,168,76,.4);
  display: grid; place-items: center;
  font-size: .8rem; opacity: .6;
  transition: all .2s;
}
.social-links a:hover { opacity: 1; border-color: var(--gold); color: var(--gold); }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1);
  margin-top: 2.5rem;
  padding-top: 1.25rem;
  text-align: center;
  font-size: .8rem;
  opacity: .45;
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* =====================================================
   BUTTONS
   ===================================================== */
.btn {
  display: inline-block;
  padding: .75rem 2rem;
  font-family: var(--font-label);
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  cursor: pointer;
  border: none;
  transition: all .25s;
  text-align: center;
}
.btn-primary {
  background: var(--gold);
  color: var(--ink);
}
.btn-primary:hover { background: var(--gold-dim); transform: translateY(-1px); }

.btn-outline {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--ink);
}
.btn-outline:hover { background: var(--ink); color: var(--bg); }

.btn-outline-gold {
  background: transparent;
  color: var(--gold);
  border: 1px solid var(--gold);
}
.btn-outline-gold:hover { background: var(--gold); color: var(--ink); }

/* =====================================================
   CARDS — parchment tiles with photo-corner accent
   ===================================================== */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
  transition: transform .3s, box-shadow .3s;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 12px 32px var(--shadow); }

/* photo-corner decoration */
.card::before, .card::after {
  content: '';
  position: absolute;
  width: 16px; height: 16px;
  border-color: var(--gold);
  border-style: solid;
}
.card::before { top: 10px; left: 10px; border-width: 1px 0 0 1px; }
.card::after  { bottom: 10px; right: 10px; border-width: 0 1px 1px 0; }

.card-img { width: 100%; aspect-ratio: 16/9; object-fit: cover; filter: sepia(15%) brightness(.95); }
.card-body { padding: 1.75rem; }
.card-meta { display: flex; gap: 1rem; align-items: center; margin-bottom: .75rem; }
.card-tag {
  font-family: var(--font-label);
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  border: 1px solid var(--gold);
  color: var(--gold);
  padding: .2rem .6rem;
}
.card-date { font-size: .8rem; color: var(--warm); }
.card-title { font-family: var(--font-head); font-size: 1.3rem; margin-bottom: .5rem; }
.card-desc  { font-size: .9rem; color: var(--warm); line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* =====================================================
   HERO (shared base)
   ===================================================== */
.hero {
  min-height: 85vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.hero-bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 70% 40%, rgba(201,168,76,.07) 0%, transparent 70%),
    url('https://images.unsplash.com/photo-1481627834876-b7833e8f5570?w=1600&q=80') center/cover no-repeat;
  filter: sepia(30%) brightness(.75);
}

.hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(242,232,217,.95) 0%, rgba(242,232,217,.7) 60%, rgba(242,232,217,.3) 100%);
}

.hero-content {
  position: relative;
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: var(--gutter);
  padding-block: 5rem;
}

.hero-eyebrow {
  font-family: var(--font-label);
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--gold-dim);
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-bottom: 1.5rem;
}
.hero-eyebrow::before { content: ''; display: block; width: 40px; height: 1px; background: var(--gold); }

.hero-title { max-width: 680px; margin-bottom: 1.25rem; }
.hero-title em { font-style: italic; color: var(--gold-dim); }

.hero-sub { font-size: 1.1rem; color: var(--warm); max-width: 480px; margin-bottom: 2.5rem; line-height: 1.8; }

.hero-cta { display: flex; gap: 1rem; flex-wrap: wrap; }

/* =====================================================
   PAGE HEADER (inner pages)
   ===================================================== */
.page-header {
  padding-block: 5rem 3rem;
  text-align: center;
  border-bottom: 1px solid var(--border);
}
.page-header .label-caps { margin-bottom: 1rem; }
.page-header h1 { margin-bottom: 1rem; }
.page-header p { color: var(--warm); max-width: 520px; margin-inline: auto; }

/* =====================================================
   RESPONSIVE
   ===================================================== */
@media (max-width: 900px) {
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .footer-contact { grid-column: 1 / -1; }
}

@media (max-width: 640px) {
  .nav-links { display: none; flex-direction: column; position: absolute; top: 64px; left: 0; right: 0;
    background: var(--bg); border-bottom: 1px solid var(--border);
    padding: 1.5rem var(--gutter); gap: 1.25rem; }
  .nav-links.open { display: flex; }
  .nav-toggle { display: flex; }
  .footer-inner { grid-template-columns: 1fr; }
  .footer-contact { grid-column: unset; }
  .hero-cta { flex-direction: column; align-items: flex-start; }
}
