:root {
  --ink: #1d1a14;
  --paper: #f4ede1;
  --paper-warm: #ebe0ce;
  --cream: #faf6ee;
  --moss: #4a5d3a;
  --moss-deep: #2f3d27;
  --terracotta: #a8432a;
  --gold: #c9a44a;
  --stone: #8a7e6b;
  --rule: rgba(29, 26, 20, 0.18);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', sans-serif;
  background: var(--paper);
  color: var(--ink);
  line-height: 1.6;
  overflow-x: hidden;
}

.serif { font-family: 'Fraunces', Georgia, serif; font-variation-settings: "opsz" 144; }
img { max-width: 100%; display: block; }

/* ===== Ribbon & Nav ===== */
.ribbon {
  background: var(--moss-deep); color: var(--cream); text-align: center;
  padding: 9px 20px; font-size: 12px; letter-spacing: 0.15em;
  text-transform: uppercase; font-weight: 500;
}
.ribbon span { color: var(--gold); margin: 0 8px; }

nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(244, 237, 225, 0.93);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--rule);
}
.nav-inner {
  max-width: 1400px; margin: 0 auto; padding: 12px 40px;
  display: flex; justify-content: space-between; align-items: center;
}
.logo { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.logo img { width: 46px; height: 46px; border-radius: 50%; }
.logo-text { font-family: 'Fraunces', serif; font-weight: 500; font-size: 20px; line-height: 1.1; }
.logo-text small {
  display: block; font-family: 'Inter', sans-serif; font-size: 9px;
  letter-spacing: 0.22em; text-transform: uppercase; color: var(--stone);
  margin-top: 3px; font-weight: 500;
}
.nav-links { display: flex; gap: 30px; align-items: center; list-style: none; }
.nav-links a {
  color: var(--ink); text-decoration: none; font-size: 13px;
  letter-spacing: 0.08em; text-transform: uppercase; font-weight: 500;
  transition: color 0.3s;
}
.nav-links a:hover, .nav-links a.active { color: var(--terracotta); }
.nav-cta {
  background: var(--ink); color: var(--cream) !important;
  padding: 11px 22px; border-radius: 2px; transition: background 0.3s !important;
}
.nav-cta:hover { background: var(--terracotta); }
.nav-toggle { display: none; background: none; border: none; font-size: 26px; cursor: pointer; color: var(--ink); }

/* ===== Buttons ===== */
.btn {
  display: inline-flex; align-items: center; gap: 10px; padding: 16px 28px;
  font-size: 13px; letter-spacing: 0.12em; text-transform: uppercase;
  font-weight: 500; text-decoration: none; transition: all 0.3s ease;
  cursor: pointer; border: none;
}
.btn-primary { background: var(--ink); color: var(--cream); }
.btn-primary:hover { background: var(--terracotta); transform: translateY(-1px); }
.btn-secondary { color: var(--ink); border-bottom: 1px solid var(--ink); padding: 6px 0; }
.btn-secondary:hover { color: var(--terracotta); border-color: var(--terracotta); }

/* ===== Section framework ===== */
section { padding: 110px 80px; max-width: 1400px; margin: 0 auto; }
.section-label {
  display: flex; align-items: center; gap: 14px; font-size: 11px;
  letter-spacing: 0.3em; text-transform: uppercase; color: var(--stone);
  margin-bottom: 24px; font-weight: 500;
}
.section-label::before { content: ''; width: 24px; height: 1px; background: var(--stone); }
h2.display {
  font-family: 'Fraunces', serif; font-size: clamp(38px, 4.5vw, 62px);
  line-height: 1.02; letter-spacing: -0.02em; font-weight: 400; margin-bottom: 32px;
}
h2.display em { font-style: italic; color: var(--moss-deep); }
h2.display em.tc { color: var(--terracotta); }
.lede {
  font-family: 'Fraunces', serif; font-size: 17px; line-height: 1.7;
  opacity: 0.85; max-width: 560px;
}

/* ===== Page hero (interior pages) ===== */
.page-hero { position: relative; min-height: 46vh; display: flex; align-items: flex-end; overflow: hidden; max-width: none; padding: 0; }
.page-hero .bg { position: absolute; inset: 0; background-size: cover; background-position: center; }
.page-hero .bg::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(29,26,20,0.15), rgba(29,26,20,0.55)); }
.page-hero .inner { position: relative; z-index: 2; padding: 60px 80px; color: var(--cream); max-width: 1400px; margin: 0 auto; width: 100%; }
.page-hero h1 { font-family: 'Fraunces', serif; font-size: clamp(42px, 5.5vw, 76px); font-weight: 400; letter-spacing: -0.02em; line-height: 1; }
.page-hero h1 em { font-style: italic; }
.page-hero .crumb { font-size: 11px; letter-spacing: 0.3em; text-transform: uppercase; margin-bottom: 18px; color: var(--gold); font-weight: 500; }

/* ===== Marquee ===== */
.marquee { background: var(--ink); color: var(--paper); padding: 16px 0; overflow: hidden; white-space: nowrap; }
.marquee-track { display: inline-flex; animation: mscroll 50s linear infinite; gap: 60px; }
.marquee-track span {
  font-family: 'Fraunces', serif; font-style: italic; font-size: 21px;
  display: inline-flex; align-items: center; gap: 60px;
}
.marquee-track span::after { content: '✦'; color: var(--gold); font-style: normal; font-size: 13px; }
@keyframes mscroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ===== Footer ===== */
footer { background: var(--ink); color: var(--paper); padding: 80px 80px 32px; }
.footer-inner { max-width: 1400px; margin: 0 auto; }
.footer-top {
  display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 60px;
  padding-bottom: 60px; border-bottom: 1px solid rgba(244, 237, 225, 0.15);
}
.footer-brand h3 { font-family: 'Fraunces', serif; font-size: 30px; font-weight: 400; margin-bottom: 16px; }
.footer-brand p { font-family: 'Fraunces', serif; font-style: italic; font-size: 15px; opacity: 0.7; max-width: 320px; }
.footer-col h4 { font-size: 10px; letter-spacing: 0.25em; text-transform: uppercase; margin-bottom: 18px; color: var(--gold); font-weight: 500; }
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 10px; }
.footer-col a { color: var(--paper); text-decoration: none; font-size: 14px; opacity: 0.75; transition: opacity 0.3s; }
.footer-col a:hover { opacity: 1; }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; padding-top: 32px; font-size: 12px; opacity: 0.5; }
.footer-bottom .dev { font-family: 'Fraunces', serif; font-style: italic; }

/* ===== Cards, grids, misc shared ===== */
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.card { position: relative; aspect-ratio: 4/5; overflow: hidden; background: var(--ink); }
.card img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.8s cubic-bezier(0.2,0.8,0.2,1), opacity 0.4s; opacity: 0.88; }
.card:hover img { transform: scale(1.06); opacity: 1; }
.card-content {
  position: absolute; inset: 0; padding: 34px 30px; display: flex;
  flex-direction: column; justify-content: space-between; color: var(--cream);
  background: linear-gradient(180deg, rgba(29,26,20,0.25) 0%, rgba(29,26,20,0) 40%, rgba(29,26,20,0.72) 100%);
  z-index: 2;
}
.card-num { font-family: 'Fraunces', serif; font-style: italic; font-size: 14px; opacity: 0.85; }
.card-title { font-family: 'Fraunces', serif; font-size: 27px; line-height: 1.08; font-weight: 400; }
.card-title small {
  display: block; font-family: 'Inter', sans-serif; font-size: 11px;
  letter-spacing: 0.2em; text-transform: uppercase; margin-top: 10px; opacity: 0.85; font-weight: 500;
}

.info-block { padding: 22px 0; border-top: 1px solid var(--rule); display: grid; grid-template-columns: 130px 1fr; gap: 24px; align-items: start; }
.info-block:last-of-type { border-bottom: 1px solid var(--rule); }
.info-block .label { font-size: 10px; letter-spacing: 0.25em; text-transform: uppercase; color: var(--stone); padding-top: 6px; font-weight: 500; }
.info-block .value { font-family: 'Fraunces', serif; font-size: 18px; line-height: 1.5; }
.info-block .value a { color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--rule); }
.info-block .value a:hover { color: var(--terracotta); border-color: var(--terracotta); }
.info-block .value small { display: block; font-family: 'Inter', sans-serif; font-size: 13px; color: var(--stone); margin-top: 4px; }

.prose { font-family: 'Fraunces', serif; font-size: 17.5px; line-height: 1.75; }
.prose p { margin-bottom: 24px; opacity: 0.88; }
.prose h3 { font-family: 'Fraunces', serif; font-size: 30px; font-weight: 400; margin: 48px 0 20px; letter-spacing: -0.01em; }
.prose h3 em { font-style: italic; color: var(--moss-deep); }
.prose .dropcap::first-letter {
  font-size: 74px; font-weight: 400; float: left; line-height: 0.85;
  padding: 8px 12px 0 0; color: var(--moss-deep);
}
.prose blockquote {
  border-left: 2px solid var(--gold); padding: 8px 0 8px 28px; margin: 36px 0;
  font-style: italic; font-size: 20px; color: var(--moss-deep);
}

figure.framed { position: relative; }
figure.framed img { width: 100%; }
figure.framed::before { content: ''; position: absolute; inset: -1px; border: 1px solid var(--rule); pointer-events: none; z-index: 2; }
figure.framed figcaption {
  font-family: 'Fraunces', serif; font-style: italic; font-size: 13px;
  color: var(--stone); line-height: 1.5; margin-top: 14px;
}
figure.framed figcaption::before { content: ''; display: block; width: 30px; height: 1px; background: var(--stone); margin-bottom: 8px; }

/* ===== Language toggle (blog) ===== */
.lang-toggle { display: inline-flex; border: 1px solid var(--ink); margin-bottom: 40px; }
.lang-toggle button {
  background: transparent; border: none; padding: 10px 24px; cursor: pointer;
  font-family: 'Inter', sans-serif; font-size: 12px; letter-spacing: 0.15em;
  text-transform: uppercase; font-weight: 500; color: var(--ink); transition: all 0.25s;
}
.lang-toggle button.on { background: var(--ink); color: var(--cream); }
.lang-ne { display: none; }
body.show-ne .lang-en { display: none; }
body.show-ne .lang-ne { display: block; }
.lang-ne .prose, .lang-ne.prose { font-family: 'Noto Serif Devanagari', 'Fraunces', serif; font-size: 18px; line-height: 1.9; }

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .nav-inner { padding: 12px 20px; }
  .nav-links {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    background: var(--paper); flex-direction: column; padding: 24px;
    gap: 20px; border-bottom: 1px solid var(--rule);
  }
  .nav-links.open { display: flex; }
  .nav-toggle { display: block; }
  section { padding: 64px 22px; }
  .page-hero .inner { padding: 40px 22px; }
  .card-grid { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr; gap: 40px; }
  .footer-bottom { flex-direction: column; gap: 12px; text-align: center; }
  footer { padding: 60px 22px 28px; }
}

/* ===== Polish layer: grain, reveals, motion ===== */
body::after {
  content: ''; position: fixed; inset: -50%; z-index: 2147483647; pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.72' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 7s steps(10) infinite;
}
@keyframes grain {
  0%, 100% { transform: translate(0, 0); }
  10% { transform: translate(-4%, -6%); } 20% { transform: translate(-9%, 3%); }
  30% { transform: translate(5%, -12%); } 40% { transform: translate(-3%, 13%); }
  50% { transform: translate(-8%, 5%); } 60% { transform: translate(9%, 0); }
  70% { transform: translate(0, 8%); } 80% { transform: translate(3%, 18%); }
  90% { transform: translate(-6%, 6%); }
}

.reveal {
  opacity: 0; transform: translateY(28px);
  transition: opacity 0.95s cubic-bezier(0.2, 0.7, 0.2, 1), transform 0.95s cubic-bezier(0.2, 0.7, 0.2, 1);
  transition-delay: var(--d, 0s);
}
.reveal.in { opacity: 1; transform: none; }

.page-hero .bg { animation: kenburns 22s ease-out forwards; }
@keyframes kenburns { from { transform: scale(1); } to { transform: scale(1.09); } }

.page-hero .inner > * { opacity: 0; transform: translateY(24px); animation: heroin 1.1s cubic-bezier(0.2, 0.7, 0.2, 1) forwards; }
.page-hero .inner .crumb { animation-delay: 0.15s; }
.page-hero .inner h1 { animation-delay: 0.3s; }
@keyframes heroin { to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .page-hero .bg, .page-hero .inner > *, body::after, .marquee-track { animation: none !important; }
  .page-hero .inner > * { opacity: 1; transform: none; }
}
