/* ============================================================
   main.css — Riva Rocci · Global Styles
   Covers: reset, CSS variables, nav, footer, shared components
   ============================================================ */

/* ── RESET ── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ── ACCESSIBILITY: skip-to-content ── */
.skip-link {
  position: fixed; top: -100%; left: 1.5rem; z-index: 9999;
  background: var(--blue); color: #fff;
  padding: .6rem 1.4rem; border-radius: 0 0 8px 8px;
  font-size: .82rem; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; transition: top .2s;
}
.skip-link:focus { top: 0; }

/* ── ACCESSIBILITY: visible focus styles ── */
:focus-visible {
  outline: 2px solid var(--blue-l);
  outline-offset: 3px;
  border-radius: 3px;
}
/* Nav links and buttons get a tighter pill focus ring */
.nav-links a:focus-visible,
.btn:focus-visible,
.burger:focus-visible,
.yr:focus-visible,
.ig-follow-btn:focus-visible {
  outline: 2px solid var(--blue-l);
  outline-offset: 2px;
  border-radius: 100px;
}

/* ── DESIGN TOKENS ── */
:root {
  --ink:    #0d0c0a;
  --warm:   #161410;
  --cream:  #f0ebe0;
  --muted:  #969696;
  --dim:    rgba(240, 235, 224, .55);
  --blue:   #1a4fff;
  --blue-l: #8eaaff;
  --green:  #0b7a10;
  --grn-l:  #6ee875;
  --yel:    #f0c200;
  --yel-l:  #ffe87a;
  --border: rgba(240, 235, 224, .09);
  --bord2:  rgba(240, 235, 224, .16);
}

/* ── BASE ── */
html { scroll-behavior: smooth; }
body {
  font-family: 'DM Sans', sans-serif;
  background: var(--ink);
  color: var(--cream);
  overflow-x: hidden;
}
a { text-decoration: none; color: inherit; }

/* ── PAGE SYSTEM ── */
.page { display: none; }
.page.active { display: block; }

/* ── NAV ── */
nav {
  position: fixed; top: 1.25rem; left: 0; right: 0; z-index: 200;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.1rem 3rem;
  transition: background-color .3s, border-color .3s, top .3s;
  border-bottom: 1px solid transparent;
}
nav.stuck {
  top: 0;
  background: rgba(13, 12, 10, .94);
  backdrop-filter: blur(16px);
  border-color: var(--border);
}

.logo {
  font-family: 'Playfair Display', serif;
  font-style: italic; font-weight: 900;
  font-size: 1.35rem; cursor: pointer; letter-spacing: -.01em;
}
.logo a {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
}
.logo-dots { display: flex; gap: 3px; align-items: center; }
.ld { width: 7px; height: 7px; border-radius: 50%; }

.nav-links {
  display: flex; list-style: none;
  align-items: center; gap: 1rem;
}
.nav-links a {
  padding: .42rem 1rem;
  font-size: .95rem; font-weight: 500; letter-spacing: .04em;
  color: rgba(240, 235, 224, .5);
  border-radius: 100px; transition: color .15s, background .15s; cursor: pointer;
}
.nav-links a:hover,
.nav-links a.on { color: var(--cream); background: var(--border); }
.nav-cta { background: var(--blue) !important; color: #fff !important; border-radius: 100px !important; }
.nav-cta:hover { background: #2e5fff !important; }

.burger { display: none; flex-direction: column; gap: 5px; cursor: pointer; }
.burger span { width: 22px; height: 1.5px; background: var(--cream); display: block; }

.mob-menu {
  display: none; position: fixed; inset: 0;
  background: var(--ink); z-index: 190;
  flex-direction: column; align-items: center; justify-content: center; gap: 1.2rem;
}
.mob-menu.open { display: flex; }
.mob-menu a {
  font-family: 'Playfair Display', serif;
  font-style: italic; font-weight: 900; font-size: 3rem;
  color: var(--cream); cursor: pointer; transition: color .15s;
}
.mob-menu a:hover { color: var(--yel); }

/* ── PILLS ── */
.pill {
  display: inline-flex; align-items: center;
  font-size: .66rem; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; padding: .32rem .9rem; border-radius: 100px;
}
.pill-b { background: rgba(26, 79, 255, .18); color: var(--blue-l); border: 1px solid rgba(26, 79, 255, .3); }
.pill-g { background: rgba(11, 122, 16, .18); color: var(--grn-l); border: 1px solid rgba(11, 122, 16, .3); }
.pill-y { background: rgba(240, 194, 0, .18); color: var(--yel-l); border: 1px solid rgba(240, 194, 0, .3); }

/* ── BUTTONS ── */
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  font-family: 'DM Sans', sans-serif;
  font-size: .75rem; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; padding: .8rem 2.2rem;
  border-radius: 100px; cursor: pointer; border: none; transition: background .2s, color .2s, transform .2s;
}
.btn-light   { background: var(--cream); color: var(--ink); }
.btn-light:hover   { background: var(--blue); color: #fff; transform: translateY(-1px); }
.btn-outline { background: transparent; color: var(--cream); border: 1.5px solid var(--bord2); }
.btn-outline:hover { border-color: rgba(240, 235, 224, .4); transform: translateY(-1px); }
.btn-blue    { background: var(--blue); color: #fff; }
.btn-blue:hover    { background: #2e5fff; transform: translateY(-1px); }
.btn-yellow  { background: var(--yel); color: var(--ink); }
.btn-yellow:hover  { background: var(--yel-l); transform: translateY(-1px); }
.btn-green   { background: var(--green); color: #fff; }
.btn-green:hover   { background: #0d9614; transform: translateY(-1px); }

.ph {
  background: rgba(240, 235, 224, .04);
  border-radius: 10px;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: .5rem;
  color: var(--muted); font-size: .62rem;
  letter-spacing: .12em; text-transform: uppercase; font-weight: 700;
}
.ph svg { opacity: .2; }

/* ── IMAGE UTILITIES ── */
.img-top         { object-position: center top; }
.img-bottom      { object-position: center bottom; }
.img-top-middle  { object-position: center 75%; }
.img-bottom-middle { object-position: center 25%; }

/* ── SCROLL REVEAL ── */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ── INNER PAGE HEADER ── */
.pg-hdr {
  padding: 10rem 3rem 5rem;
  border-bottom: 1px solid var(--border);
  position: relative; overflow: hidden;
}
.pg-hdr-orb {
  position: absolute; border-radius: 50%;
  filter: blur(100px); pointer-events: none;
}
.pg-tag {
  font-size: .65rem; font-weight: 700; letter-spacing: .2em;
  text-transform: uppercase; color: var(--muted);
  margin-bottom: 1.2rem; position: relative; z-index: 1;
}
.pg-title {
  font-family: 'Playfair Display', serif;
  font-style: italic; font-weight: 900;
  font-size: clamp(3.5rem, 9vw, 8.5rem);
  line-height: .9; letter-spacing: -.04em;
  position: relative; z-index: 1; margin-bottom: 1rem;
}
.pg-sub {
  font-size: 1rem; color: var(--dim);
  max-width: 520px; line-height: 1.75; font-weight: 300;
  position: relative; z-index: 1;
}

/* ── CTA SECTION ── */
.cta-section {
  padding: 9rem 3rem; text-align: center;
  position: relative; overflow: hidden;
}
.cta-bg {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  font-family: 'Playfair Display', serif;
  font-style: italic; font-weight: 900;
  font-size: 28vw; line-height: 1;
  color: rgba(240, 235, 224, .025); pointer-events: none;
  white-space: nowrap; letter-spacing: -.04em;
}
.cta-tag {
  font-size: .65rem; font-weight: 700; letter-spacing: .2em;
  text-transform: uppercase; color: var(--muted);
  margin-bottom: 1.8rem; position: relative; z-index: 1;
}
.cta-hl {
  font-family: 'Playfair Display', serif;
  font-style: italic; font-weight: 900;
  font-size: clamp(2.5rem, 7vw, 6.5rem);
  line-height: .96; letter-spacing: -.03em;
  margin-bottom: 1.5rem; position: relative; z-index: 1;
}
.cta-hl .ca { color: var(--blue-l); }
.cta-hl .cb { color: var(--grn-l); }
.cta-hl .cc { color: var(--yel-l); }
.cta-body {
  font-size: .92rem; color: var(--dim);
  max-width: 420px; margin: 0 auto 3rem;
  line-height: 1.8; font-weight: 300; position: relative; z-index: 1;
}
.cta-acts {
  display: flex; gap: .8rem;
  justify-content: center; flex-wrap: wrap; position: relative; z-index: 1;
}

/* ── FOOTER ── */
footer {
  background: var(--warm);
  padding: 4rem 3rem 2.5rem;
  border-top: 1px solid var(--border);
}
.ft-grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr;
  gap: 3rem; padding-bottom: 3rem;
  border-bottom: 1px solid var(--border); margin-bottom: 2rem;
}
.ft-logo {
  font-family: 'Playfair Display', serif;
  font-style: italic; font-weight: 900;
  font-size: 1.9rem; letter-spacing: -.01em; margin-bottom: .9rem;
}
.ft-desc { font-size: .8rem; color: var(--muted); line-height: 1.75; max-width: 260px; }
.ft-col h4 {
  font-size: .6rem; letter-spacing: .2em;
  text-transform: uppercase; font-weight: 700;
  color: var(--muted); margin-bottom: 1.1rem;
}
.ft-col ul { list-style: none; display: flex; flex-direction: column; gap: .6rem; }
.ft-col a { font-size: .82rem; color: rgba(240, 235, 224, .45); cursor: pointer; transition: color .15s; }
.ft-col a:hover { color: var(--cream); }
.ft-bot { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1rem; }
.ft-copy { font-size: .68rem; color: rgba(240, 235, 224, .2); }
.ft-soc { display: flex; gap: .6rem; }
.ft-soc a {
  width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid var(--bord2);
  display: flex; align-items: center; justify-content: center;
  transition: border-color .15s;
}
.ft-soc a:hover { border-color: rgba(240, 235, 224, .4); }

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  nav { padding: 1rem 1.5rem; }
  .nav-links { display: none; }
  .burger { display: flex; }

  .pillar-row, .about-section, .story, .barsol-section,
  .praes-body, .lied-layout, .sup-grid, .hist-grid, .faq-grid {
    grid-template-columns: 1fr;
  }
  .identity { grid-template-columns: 1fr; }
  .id-cell { border-right: none; border-bottom: 1px solid var(--border); }
  .id-cell:last-child { border-bottom: none; }
  .about-txt { border-right: none; border-bottom: 1px solid var(--border); }

  .story-img-col,
  .story.flip .story-img-col { border-right: none; border-left: none; border-bottom: 1px solid var(--border); min-height: 240px; }
  .barsol-img { min-height: 240px; }
  .barsol-txt { border-left: none; border-top: 1px solid var(--border); }
  .praes-photo-col { border-right: none; border-bottom: 1px solid var(--border); min-height: 240px; }
  .lied-aside { position: static; border-right: none; border-bottom: 1px solid var(--border); }
  .sup-left { border-right: none; border-bottom: 1px solid var(--border); }
  .sg1, .sg2 { grid-template-columns: 1fr 1fr; }
  .pillar-row { grid-template-columns: 1fr; min-height: auto; direction: ltr; }
  .pillar-row-img { min-height: 240px; border-right: none; border-left: none; border-bottom: 1px solid var(--border); }
  .pillar-row-flip .pillar-row-img { border-left: none; }
  .story.flip { direction: ltr; }
  .about-photos { grid-template-columns: 1fr 1fr; grid-template-rows: auto; }
  .about-photos .ph:first-child { grid-row: span 1; }
  .comm-grid { grid-template-columns: 1fr 1fr; grid-template-rows: auto; }
  .comm-grid .ph:first-child { grid-row: span 1; }
  .ft-grid { grid-template-columns: 1fr; gap: 2rem; }

  footer, .manifesto, .pillars-header, .about-txt,
  .story-txt-col, .barsol-txt, .hist-section, .praes-years,
  .praes-info-col, .lied-main, .spon-t1, .spon-t2,
  .sup-left, .sup-right, .faq-section, .soc-section,
  .pg-hdr, .events-section, .stats-section, .community,
  .cta-section, .oo-intro {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
}
