/* ============================================
   NAE'S LAB. Shared design system.
   Palette: midnight indigo, ivory, warm brass, terracotta accent.
   ============================================ */

:root {
  --forest: #23264B;
  --forest-deep: #16182F;
  --ivory: #F7F3EA;
  --ivory-dim: #EDE6D6;
  --gold: #C08A3E;
  --gold-soft: #DDB877;
  --mauve: #B5602F;
  --ink: #1C231F;

  box-sizing: border-box;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
html { scroll-behavior: smooth; scroll-padding-top: 90px; }
*, *::before, *::after { box-sizing: inherit; }

body {
  margin: 0;
  background: var(--ivory);
  color: var(--ink);
  font-family: 'Inter', -apple-system, sans-serif;
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, .serif { font-family: 'Fraunces', Georgia, serif; font-weight: 500; letter-spacing: -0.01em; color: var(--forest); }

::selection { background: var(--gold-soft); color: var(--forest-deep); }

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }

.wrap { max-width: 1140px; margin: 0 auto; padding: 0 clamp(20px, 5vw, 56px); }
.section-pad { padding: clamp(70px, 10vw, 120px) 0; }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
}

/* ---------- Nav ---------- */
nav {
  position: sticky; top: 0; z-index: 100;
  padding-top: env(safe-area-inset-top, 0px);
  background: rgba(247,243,234,0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(23,59,50,0.1);
}
.nav-inner {
  max-width: 1140px; margin: 0 auto; padding: 18px clamp(20px, 5vw, 56px);
  display: flex; align-items: center; justify-content: space-between;
}
.nav-mark { font-family: 'Fraunces', serif; font-size: 1.25rem; color: var(--forest); font-weight: 500; }
.nav-mark em { font-style: italic; color: var(--gold); }
.nav-links { display: flex; gap: 30px; font-size: 0.88rem; }
.nav-links a { position: relative; padding-bottom: 4px; color: var(--forest); }
.nav-links a.active { color: var(--gold); }
.nav-links a::after {
  content: ''; position: absolute; left: 0; bottom: 0; width: 0; height: 1px;
  background: var(--gold); transition: width .35s cubic-bezier(.4,0,.2,1);
}
.nav-links a:hover::after { width: 100%; }
.nav-cta {
  border: 1px solid var(--forest); border-radius: 2px; padding: 9px 20px; font-size: 0.82rem;
  color: var(--forest); transition: all .3s ease;
}
.nav-cta:hover { background: var(--forest); color: var(--ivory); }
.nav-toggle { display: none; background: none; border: none; }
@media (max-width: 780px) {
  .nav-links, .nav-cta { display: none; }
}

/* ---------- Page header (non-home pages) ---------- */
.page-header {
  background: var(--forest); color: var(--ivory);
  padding: clamp(60px, 9vw, 100px) 0 clamp(40px, 6vw, 60px);
}
.page-header .eyebrow { color: var(--gold-soft); }
.page-header h1 { color: var(--ivory); font-size: clamp(2.4rem, 6vw, 4rem); margin: 8px 0 0; line-height: 1.05; }
.page-header p { color: var(--ivory-dim); max-width: 56ch; margin: 20px 0 0; font-size: 1.05rem; }

.eyebrow {
  font-family: 'Fraunces', serif; font-style: italic; color: var(--gold);
  font-size: 0.92rem; margin: 0 0 10px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 26px; border-radius: 2px; font-size: 0.86rem;
  transition: all .3s cubic-bezier(.4,0,.2,1);
  border: 1px solid transparent;
}
.btn-solid { background: var(--forest); color: var(--ivory); }
.btn-solid:hover { background: var(--gold); color: var(--forest-deep); }
.btn-outline { border-color: var(--forest); color: var(--forest); }
.btn-outline:hover { background: var(--forest); color: var(--ivory); }
.btn-outline.on-dark { border-color: var(--ivory-dim); color: var(--ivory); }
.btn-outline.on-dark:hover { background: var(--ivory); color: var(--forest-deep); }

/* ---------- Reveal on scroll (one treatment, used sparingly) ---------- */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity .8s cubic-bezier(.16,.9,.3,1), transform .8s cubic-bezier(.16,.9,.3,1); }
.reveal.in { opacity: 1; transform: translateY(0); }

/* ---------- Footer ---------- */
footer {
  background: var(--forest-deep); color: var(--ivory-dim);
  padding: 56px 0 calc(30px + env(safe-area-inset-bottom, 0px));
}
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; margin-bottom: 40px; }
.footer-mark { font-family: 'Fraunces', serif; font-size: 1.4rem; color: var(--ivory); margin-bottom: 14px; }
.footer-mark em { font-style: italic; color: var(--gold); }
.footer-grid p { font-size: 0.9rem; max-width: 34ch; color: var(--ivory-dim); }
.footer-col h4 { color: var(--gold-soft); font-family: 'Inter', sans-serif; font-weight: 500; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.05em; margin: 0 0 14px; }
.footer-col a { display: block; font-size: 0.9rem; margin-bottom: 10px; color: var(--ivory-dim); transition: color .25s; }
.footer-col a:hover { color: var(--gold); }
.footer-bottom {
  border-top: 1px solid rgba(247,243,234,0.12); padding-top: 24px;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; font-size: 0.8rem; color: rgba(247,243,234,0.55);
}
@media (max-width: 780px) { .footer-grid { grid-template-columns: 1fr; } }

/* Demo tag: diagonal corner ribbon, fixed so it shows on every page */
.demo-tag {
  position: fixed; top: 0; right: 0; z-index: 200;
  width: 220px; overflow: hidden; height: 220px;
  pointer-events: none;
}
.demo-tag span {
  position: absolute; top: 38px; right: -58px; width: 260px;
  transform: rotate(45deg); text-align: center;
  background: var(--forest-deep); color: var(--ivory);
  font-family: 'Inter', sans-serif; font-size: 0.72rem; letter-spacing: 0.04em;
  padding: 7px 0; box-shadow: 0 2px 10px rgba(0,0,0,0.18);
  border-top: 1px solid rgba(247,243,234,0.25); border-bottom: 1px solid rgba(247,243,234,0.25);
}
.demo-tag span b { color: var(--gold-soft); font-weight: 500; }
@media (max-width: 480px) {
  .demo-tag { width: 170px; height: 170px; }
  .demo-tag span { top: 28px; right: -50px; width: 200px; font-size: 0.62rem; padding: 5px 0; }
}
