@import url("https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,500;9..144,600;9..144,700&family=Inter+Tight:wght@400;500;600&display=swap");

:root {
  --background: #fbfaf6;
  --foreground: #22262f;
  --muted: #6b7280;
  --border: #e6e2d8;
  --sand: #ece5d8;
  --primary: #1f3242;
  --accent: #c2743a;
  --accent-soft: #e0a071;
  --ink: #1b2230;
  --ease: cubic-bezier(.22,.61,.36,1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--background);
  color: var(--foreground);
  font-family: "Inter Tight", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  line-height: 1.55;
  overflow-x: hidden;
}

h1, h2, h3 { font-family: "Fraunces", Georgia, serif; font-weight: 500; letter-spacing: -0.02em; }
h1 { font-size: clamp(2.25rem, 5vw, 3.4rem); line-height: 1.08; }
h2 { font-size: clamp(1.75rem, 3.5vw, 2.35rem); }
h3 { font-size: 1.25rem; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

.wrap { max-width: 72rem; margin: 0 auto; padding: 0 1.5rem; }
.eyebrow { font-size: 0.72rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--accent); font-weight: 600; }
.muted { color: var(--muted); }
.section { padding: 5.5rem 0; }
.sand { background: var(--sand); }
.secondary { background: #f3efe6; border-bottom: 1px solid var(--border); }

/* ---------- scroll reveal ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: .08s; }
.reveal.d2 { transition-delay: .16s; }
.reveal.d3 { transition-delay: .24s; }
.reveal.d4 { transition-delay: .32s; }
.reveal.from-left  { transform: translateX(-34px); }
.reveal.from-right { transform: translateX(34px); }
.reveal.from-left.in, .reveal.from-right.in { transform: none; }

/* ---------- header ---------- */
header.site {
  position: sticky; top: 0; z-index: 50;
  background: rgba(251, 250, 246, 0.82);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow .35s var(--ease), background .35s var(--ease), padding .35s var(--ease);
}
header.site.scrolled { box-shadow: 0 8px 30px rgba(31,50,66,.09); background: rgba(251,250,246,.95); }
header.site .bar { display: flex; align-items: center; justify-content: space-between; padding: 1rem 1.5rem; max-width: 72rem; margin: 0 auto; transition: padding .35s var(--ease); }
header.site.scrolled .bar { padding: .65rem 1.5rem; }
.brand { font-family: "Fraunces", Georgia, serif; font-size: 1.5rem; line-height: 1; transition: transform .3s var(--ease); }
.brand:hover { transform: translateY(-1px); }
.brand span { color: var(--accent); }
.brand small { display: block; margin-top: 0.35rem; font-family: "Inter Tight", sans-serif; font-size: 0.6rem; letter-spacing: 0.3em; text-transform: uppercase; color: var(--muted); }
nav.main { display: flex; align-items: center; gap: 2rem; }
nav.main a { font-size: 0.9rem; color: #3a4150; position: relative; padding-bottom: 3px; transition: color .25s var(--ease); }
nav.main a:not(.btn)::after {
  content: ""; position: absolute; left: 0; bottom: 0; height: 1.5px; width: 0;
  background: var(--accent); transition: width .32s var(--ease);
}
nav.main a:not(.btn):hover::after, nav.main a.active::after { width: 100%; }
nav.main a:hover, nav.main a.active { color: var(--accent); }

.btn {
  display: inline-block; background: var(--primary); color: #fbfaf6;
  padding: 0.7rem 1.4rem; border-radius: 2px; font-size: 0.9rem;
  position: relative; overflow: hidden; isolation: isolate;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.btn::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: var(--accent); transform: translateY(101%);
  transition: transform .38s var(--ease);
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 10px 22px rgba(31,50,66,.22); }
.btn:hover::before { transform: translateY(0); }

.menu-toggle { display: none; background: none; border: 0; font-size: 1.4rem; cursor: pointer; }
nav.mobile { display: none; border-top: 1px solid var(--border); padding: 0.5rem 1.5rem 1rem; }
nav.mobile a { display: block; padding: 0.6rem 0; font-size: 0.9rem; }
nav.mobile.open { display: block; animation: slideDown .35s var(--ease); }
@keyframes slideDown { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

/* ---------- hero ---------- */
.hero { position: relative; min-height: 36rem; display: flex; align-items: center; color: #fbfaf6; overflow: hidden; }
.hero img.bg {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  animation: heroZoom 16s var(--ease) forwards;
  will-change: transform;
}
@keyframes heroZoom { from { transform: scale(1.14); } to { transform: scale(1); } }
.hero .veil { position: absolute; inset: 0; background: linear-gradient(100deg, rgba(27,34,48,0.92), rgba(27,34,48,0.5)); }
.hero .wrap { position: relative; padding-top: 6.5rem; padding-bottom: 6.5rem; }
.hero p.lead { max-width: 34rem; margin-top: 1.5rem; color: rgba(251,250,246,0.82); }
.hero .eyebrow, .hero h1, .hero p.lead, .hero p.actions {
  opacity: 0; animation: heroUp .9s var(--ease) forwards;
}
.hero .eyebrow { animation-delay: .15s; }
.hero h1 { animation-delay: .3s; }
.hero p.lead { animation-delay: .45s; }
.hero p.actions { animation-delay: .6s; }
@keyframes heroUp { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }

/* scroll cue */
.scroll-cue {
  position: absolute; bottom: 1.8rem; left: 50%; transform: translateX(-50%);
  width: 1px; height: 2.6rem; background: rgba(251,250,246,.4); overflow: hidden;
}
.scroll-cue::after {
  content: ""; position: absolute; top: -100%; left: 0; width: 100%; height: 100%;
  background: var(--accent-soft); animation: cue 2.2s ease-in-out infinite;
}
@keyframes cue { 0% { top: -100%; } 60%,100% { top: 100%; } }

/* ---------- grids & cards ---------- */
.grid { display: grid; gap: 2.5rem; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.stat p.n { font-family: "Fraunces", serif; font-size: 2.4rem; color: var(--primary); line-height: 1.1; }
.stat { position: relative; padding-left: 1rem; }
.stat::before {
  content: ""; position: absolute; left: 0; top: .35rem; width: 2px; height: 0;
  background: var(--accent); transition: height .7s var(--ease) .2s;
}
.stat.in::before { height: 2.1rem; }

.card {
  background: #fff; border: 1px solid var(--border); overflow: hidden;
  transition: transform .4s var(--ease), box-shadow .4s var(--ease), border-color .4s var(--ease);
}
a.card:hover { transform: translateY(-6px); box-shadow: 0 18px 40px rgba(31,50,66,.13); border-color: var(--accent-soft); }
.card img { height: 220px; width: 100%; object-fit: cover; transition: transform .7s var(--ease); }
a.card:hover img { transform: scale(1.07); }
.card .body { padding: 1.5rem; }
.card .body h3 { transition: color .3s var(--ease); }
a.card:hover .body h3 { color: var(--accent); }

.tags { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1.5rem; list-style: none; }
.tags li {
  border: 1px solid var(--border); background: #fff; padding: 0.35rem 0.8rem; font-size: 0.75rem;
  letter-spacing: 0.03em; transition: background .3s var(--ease), color .3s var(--ease), border-color .3s var(--ease), transform .3s var(--ease);
}
.tags li:hover { background: var(--accent); color: #fbfaf6; border-color: var(--accent); transform: translateY(-2px); }

.rule::before {
  content: ""; display: block; width: 0; height: 2px; background: var(--accent);
  margin-bottom: 1.25rem; transition: width .8s var(--ease) .25s;
}
.rule.in::before, .in .rule::before { width: 3rem; }

/* section images */
.section img:not(.card img):not(.bg) { transition: transform .8s var(--ease), box-shadow .5s var(--ease); }
.section img:not(.card img):not(.bg):hover { transform: scale(1.02); box-shadow: 0 18px 44px rgba(31,50,66,.16); }

/* ---------- forms ---------- */
label { display: block; font-size: 0.75rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin-bottom: 0.4rem; }
input, textarea {
  width: 100%; padding: 0.75rem 0.9rem; border: 1px solid var(--border);
  background: #fff; font: inherit; border-radius: 2px; margin-bottom: 1.1rem;
  transition: border-color .3s var(--ease), box-shadow .3s var(--ease);
}
input:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; box-shadow: 0 6px 18px rgba(194,116,58,.13); }
.notice { margin-top: 1rem; font-size: 0.9rem; color: var(--accent); animation: heroUp .5s var(--ease); }

/* ---------- footer ---------- */
footer.site { background: var(--ink); color: #fbfaf6; margin-top: auto; }
footer.site .cols { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 2.5rem; padding: 4rem 1.5rem; max-width: 72rem; margin: 0 auto; }
footer.site p, footer.site li { color: rgba(251,250,246,0.7); font-size: 0.9rem; }
footer.site ul { list-style: none; margin-top: 1rem; display: grid; gap: 0.5rem; }
footer.site a { transition: color .28s var(--ease), padding-left .28s var(--ease); }
footer.site a:hover { color: var(--accent-soft); padding-left: .3rem; }
footer.site .label { font-size: 0.72rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--accent); }
footer.site .bottom { border-top: 1px solid rgba(251,250,246,0.12); }
footer.site .bottom p { max-width: 72rem; margin: 0 auto; padding: 1.5rem; font-size: 0.75rem; color: rgba(251,250,246,0.5); }

/* back to top */
.to-top {
  position: fixed; right: 1.4rem; bottom: 1.4rem; z-index: 60;
  width: 2.75rem; height: 2.75rem; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--primary); color: #fbfaf6; font-size: 1rem;
  opacity: 0; pointer-events: none; transform: translateY(12px);
  transition: opacity .35s var(--ease), transform .35s var(--ease), background .3s var(--ease);
}
.to-top.show { opacity: 1; pointer-events: auto; transform: none; }
.to-top:hover { background: var(--accent); }

@media (max-width: 860px) {
  nav.main { display: none; }
  .menu-toggle { display: block; }
  .grid-2, .grid-3, .grid-4, footer.site .cols { grid-template-columns: 1fr; }
  .section { padding: 3.5rem 0; }
  .hero { min-height: 30rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal, .reveal.in { opacity: 1 !important; transform: none !important; transition: none !important; }
  .hero img.bg, .hero .eyebrow, .hero h1, .hero p.lead, .hero p.actions, .scroll-cue::after { animation: none !important; opacity: 1 !important; }
  .rule::before { width: 3rem !important; transition: none; }
  .stat::before { height: 2.1rem !important; transition: none; }
  * { transition-duration: .01ms !important; }
}
