/* ============================================================
   Spuni — spuni.org
   One continuous composition. Warm off-white, near-black ink,
   muted grey, and a restrained ochre accent used sparingly.
   ============================================================ */

:root {
  --paper: #F2F0E9;
  --ink:   #11110F;
  --grey:  #6F6B63;
  --ochre: #B78A2D;

  --sans: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --serif: Georgia, "Times New Roman", Times, serif;
  --mono: ui-monospace, "SFMono-Regular", "Cascadia Code", Menlo, Consolas, monospace;

  --rule: 1px solid rgba(17, 17, 15, 0.16);
  --measure: 34rem;
  --edge: clamp(1.25rem, 5vw, 5rem);

  /* Session-stable spiral nudges. Default to zero so the page is
     stable with JavaScript disabled and never jumps after render. */
  --sp-hero-x: 0px;   --sp-hero-y: 0px;   --sp-hero-r: 0deg;
  --sp-eve-x: 0px;    --sp-eve-y: 0px;    --sp-eve-r: 0deg;
  --sp-con-x: 0px;    --sp-con-y: 0px;    --sp-con-r: 0deg;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  /* Offset for the sticky header when jumping to anchors. */
  scroll-padding-top: 4.5rem;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: clamp(1.02rem, 0.97rem + 0.3vw, 1.18rem);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden; /* guard against decorative bleed; nav strip scrolls internally */
}

img { max-width: 100%; height: auto; display: block; }

a { color: inherit; }

p { margin: 0 0 1.15em; }

/* --- Focus + skip link -------------------------------------- */

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
  border-radius: 1px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: var(--paper);
  padding: 0.6rem 1rem;
  z-index: 100;
  text-decoration: none;
}
.skip-link:focus {
  left: 0.5rem;
  top: 0.5rem;
}

/* --- Shared layout ------------------------------------------ */

.wrap {
  max-width: 72rem;
  margin: 0 auto;
  padding: 0 var(--edge);
  position: relative;
}

.measure { max-width: var(--measure); }
.measure--shift { margin-left: clamp(0rem, 6vw, 7rem); } /* occasional asymmetry */

.section {
  padding: clamp(3.5rem, 9vw, 7rem) 0;
  position: relative;
  overflow: hidden; /* contain decorative spiral bleed */
}

.section-title {
  font-size: clamp(1.7rem, 1.2rem + 2.4vw, 2.9rem);
  line-height: 1.08;
  letter-spacing: -0.01em;
  font-weight: 650;
  margin: 0 0 1.1rem;
}

.section-intro {
  font-family: var(--serif);
  font-size: clamp(1.15rem, 1.05rem + 0.6vw, 1.45rem);
  line-height: 1.5;
  color: var(--ink);
  margin: 0 0 1.6rem;
}

.lead-serif {
  font-family: var(--serif);
  font-size: clamp(1.15rem, 1.05rem + 0.6vw, 1.45rem);
  line-height: 1.55;
  margin-bottom: 1.4rem;
}

.eyebrow {
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 0.78rem;
  color: var(--grey);
  margin: 0 0 1.4rem;
}

/* ============================================================
   Header / navigation — a single scrollable strip, no hamburger
   ============================================================ */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(242, 240, 233, 0.9);
  backdrop-filter: saturate(120%) blur(6px);
  border-bottom: var(--rule);
}

.nav-strip {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 3vw, 2.4rem);
  max-width: 72rem;
  margin: 0 auto;
  padding: 0.7rem var(--edge);
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none; /* Firefox */
}
.nav-strip::-webkit-scrollbar { display: none; }

.nav-brand {
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
  text-decoration: none;
  flex: 0 0 auto;
}

.nav-links {
  list-style: none;
  display: flex;
  align-items: center;
  gap: clamp(0.9rem, 2.6vw, 2rem);
  margin: 0;
  padding: 0;
  flex: 0 0 auto;
}

.nav-links a {
  flex: 0 0 auto;
  display: inline-block;
  white-space: nowrap;
  text-decoration: none;
  color: var(--grey);
  padding: 0.35rem 0;
  border-bottom: 2px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.nav-links a:hover { color: var(--ink); }
.nav-links a.is-active {
  color: var(--ink);
  border-bottom-color: var(--ochre);
}

/* ============================================================
   Hero
   ============================================================ */

.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(3rem, 9vw, 8rem) var(--edge) clamp(3.5rem, 8vw, 6.5rem);
  border-bottom: var(--rule);
}

.hero-inner {
  max-width: 72rem;
  margin: 0 auto;
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(1.5rem, 5vw, 4rem);
}

.hero-title {
  font-size: clamp(3.6rem, 2rem + 14vw, 9.5rem);
  line-height: 0.9;
  letter-spacing: -0.03em;
  font-weight: 700;
  margin: 0 0 clamp(1.5rem, 1rem + 1.6vw, 2.6rem);
}

.hero-lead {
  font-family: var(--serif);
  font-size: clamp(1.2rem, 1rem + 1.1vw, 1.7rem);
  line-height: 1.4;
  max-width: 26rem;
  margin: 0 0 1.6rem;
  color: var(--ink);
}

.hero-more a {
  font-family: var(--mono);
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  text-decoration: none;
  color: var(--grey);
  border-bottom: 1px solid rgba(111, 107, 99, 0.5);
  padding-bottom: 2px;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.hero-more a:hover {
  color: var(--ink);
  border-bottom-color: var(--ochre);
}

.hero-mark { flex: 0 0 auto; }
.hero-logo {
  width: clamp(9rem, 22vw, 17rem);
  height: auto;
  /* a slight, deliberate tilt — control that has just escaped */
  transform: rotate(-2deg);
  opacity: 0.92;
}

/* ============================================================
   Decorative spirals — cropped, oversized, session-nudged.
   Rendered as backgrounds so they never affect layout.
   ============================================================ */

.spiral {
  position: absolute;
  pointer-events: none;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  z-index: 1;
}

.spiral--hero {
  /* oversized cropped detail bleeding off the top-right */
  top: -14%;
  right: -8%;
  width: clamp(20rem, 46vw, 40rem);
  height: clamp(20rem, 46vw, 40rem);
  background-image: url("assets/logo-right.png");
  opacity: 0.07;
  transform: translate(var(--sp-hero-x), var(--sp-hero-y)) rotate(var(--sp-hero-r));
}

.spiral--evenings {
  top: 4%;
  right: -12%;
  width: clamp(14rem, 30vw, 26rem);
  height: clamp(14rem, 30vw, 26rem);
  background-image: url("assets/logo-left.png");
  opacity: 0.06;
  transform: translate(var(--sp-eve-x), var(--sp-eve-y)) rotate(var(--sp-eve-r));
}

.spiral--contact {
  bottom: -18%;
  left: -10%;
  width: clamp(16rem, 34vw, 30rem);
  height: clamp(16rem, 34vw, 30rem);
  background-image: url("assets/logo-right-light.png");
  opacity: 0.14;
  transform: translate(var(--sp-con-x), var(--sp-con-y)) rotate(var(--sp-con-r));
}

/* ============================================================
   Section-specific tone
   ============================================================ */

.section--about {
  border-bottom: var(--rule);
}

.section--evenings {
  border-bottom: var(--rule);
}

.section--history {
  border-bottom: var(--rule);
}

/* Timeline — modest and deliberately incomplete */
.timeline {
  list-style: none;
  margin: 2.5rem 0 0;
  padding: 0;
  display: grid;
  gap: 0;
}

.timeline-item {
  padding: 1.5rem 0;
  border-top: var(--rule);
  display: grid;
  grid-template-columns: minmax(8rem, 12rem) 1fr;
  gap: clamp(1rem, 4vw, 3rem);
  align-items: baseline;
}
.timeline-item:last-child { border-bottom: var(--rule); }

/* a short ochre tick echoing the logo's line weight — decorative accent */
.timeline-year {
  position: relative;
  padding-left: 2rem;
}
.timeline-year::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 1.3rem;
  height: 1px;
  background: var(--ochre);
}

/* slight shifts in alignment between rows */
.timeline-item:nth-child(2) { margin-left: clamp(0rem, 3vw, 3rem); }
.timeline-item:nth-child(3) { margin-left: clamp(0rem, 6vw, 6rem); }

.timeline-year {
  font-family: var(--mono);
  font-size: 0.86rem;
  letter-spacing: 0.14em;
  color: var(--ink);
}

.timeline-note {
  margin: 0;
  color: var(--ink);
  max-width: 30rem;
}

/* --- Contact: reversed light-on-dark treatment -------------- */

.section--contact {
  background: var(--ink);
  color: var(--paper);
}
.section--contact .section-title { color: var(--paper); }
.section--contact p { color: rgba(242, 240, 233, 0.86); }

.contact-address {
  margin-top: 1.6rem;
  font-size: clamp(1.3rem, 1rem + 1.6vw, 2rem);
}
.contact-address a {
  color: var(--paper);
  text-decoration: none;
  border-bottom: 1px solid rgba(242, 240, 233, 0.35);
  padding-bottom: 3px;
  transition: border-color 0.15s ease;
}
.contact-address a:hover { border-bottom-color: var(--ochre); }
.section--contact :focus-visible { outline-color: var(--ochre); }

/* ============================================================
   Footer
   ============================================================ */

.site-footer {
  background: var(--ink);
  color: rgba(242, 240, 233, 0.7);
  padding: 2.2rem 0 2.6rem;
  border-top: 1px solid rgba(242, 240, 233, 0.12);
}
.footer-line {
  margin: 0;
  font-family: var(--mono);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
}

/* ============================================================
   Responsive
   ============================================================ */

@media (max-width: 620px) {
  .hero-inner {
    grid-template-columns: 1fr;
  }
  .hero-mark { order: -1; }
  .hero-logo {
    width: clamp(7rem, 40vw, 11rem);
  }
  .measure--shift { margin-left: 0; }
  .timeline-item {
    grid-template-columns: 1fr;
    gap: 0.4rem;
  }
  .timeline-item:nth-child(2),
  .timeline-item:nth-child(3) { margin-left: 0; }
}

/* ============================================================
   Reduced motion
   ============================================================ */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
