/* CYNOSURE — site mockup from Figma (SkSLmxNh8lDcogCH70VDNW) */

@import url('https://fonts.googleapis.com/css2?family=Archivo:wght@600;700;800&family=Archivo+Black&family=Playfair+Display:wght@700;800&display=swap');

:root {
  --red-overlay: #c50000;   /* Figma: C50000 @ 80% + background blur */
  --red-label: #d90000;     /* Figma: column-name labels */
  --gray-placeholder: #d9d9d9;
  --black: #000;
  --white: #fff;
  --sans: "Helvetica Neue", Helvetica, Arial, -apple-system, sans-serif;
  --serif: "Playfair Display", "Didot", "Bodoni Moda", serif;
  --display: "Archivo Black", "Helvetica Neue", sans-serif;
  --grotesk: "Archivo", "Helvetica Neue", Arial, sans-serif;  /* PAPER-style heavy nav */
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  background: var(--white);
  color: var(--black);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

/* ---------- Nav (frame 8) ---------- */

.nav {
  /* space-between gives the logo equal breathing room to each link group,
     so it reads as centered even though the groups are unequal widths */
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 26px 40px;
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.nav-group { display: flex; gap: 30px; flex: 0 0 auto; }
.nav-logo { flex: 0 0 auto; }

/* right side holds the section links AND the search icon together */
.nav-right {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 26px;
}
.nav-group.right { justify-content: flex-end; }

/* PAPER-style heavy grotesque for the section links */
.nav-group a,
.mobile-menu a {
  font-family: var(--grotesk);
  font-weight: 700;
  letter-spacing: -0.02em;   /* tight tracking */
}

.nav a { transition: opacity 0.2s ease; }
.nav a:hover { opacity: 0.55; }

.nav-logo { grid-column: 2; justify-self: center; }
.nav-logo img { height: 26px; width: auto; display: block; }

/* hamburger + search — desktop hidden, shown on mobile */
.nav-toggle,
.nav-search-btn {
  background: none;
  border: 0;
  padding: 6px;
  cursor: pointer;
  color: inherit;
  align-items: center;
  justify-content: center;
}

.nav-toggle { display: none; grid-column: 1; justify-self: start; }  /* mobile only */
.nav-search-btn { display: inline-flex; }                            /* all breakpoints */

.nav-toggle svg,
.nav-search-btn svg { display: block; width: 24px; height: 24px; }

.nav.on-hero .nav-toggle,
.nav.on-hero .nav-search-btn { color: var(--white); }

/* ---------- Mobile menu drawer + search overlay ---------- */

.mobile-menu,
.search-overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: var(--white);
  display: flex;
  flex-direction: column;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease, visibility 0.35s;
}

.mobile-menu.open,
.search-overlay.open { opacity: 1; visibility: visible; }

.mobile-menu-head,
.search-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 20px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.mobile-menu-head .nav-logo img { height: 24px; }

.menu-close,
.search-close {
  background: none;
  border: 0;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  padding: 4px 8px;
}

.mobile-menu nav {
  display: flex;
  flex-direction: column;
  padding: 20px 24px;
  gap: 4px;
}

.mobile-menu a {
  font-size: 30px;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  padding: 12px 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.search-form {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 40px 24px;
}

.search-form input {
  flex: 1;
  border: 0;
  border-bottom: 2px solid var(--black);
  background: transparent;
  font-family: var(--grotesk);
  font-weight: 700;
  font-size: clamp(28px, 6vw, 44px);
  text-transform: uppercase;
  letter-spacing: 0.01em;
  padding: 10px 0;
  outline: none;
}

.search-form input::placeholder { color: rgba(0, 0, 0, 0.3); }

/* Search results */
.search-results {
  flex: 1;
  overflow-y: auto;
  padding: 0 24px 60px;
}

.search-count {
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(0, 0, 0, 0.45);
  padding: 4px 0 12px;
}

.search-result {
  display: flex;
  gap: 20px;
  align-items: center;
  padding: 16px 0;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  transition: opacity 0.2s ease;
}

.search-result:hover { opacity: 0.6; }

.search-result img {
  width: 120px;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  background: var(--gray-placeholder);
  flex: 0 0 auto;
}

.search-result .sr-column {
  color: var(--red-label);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.search-result .sr-title {
  margin-top: 5px;
  font-size: clamp(16px, 1.8vw, 22px);
  font-weight: 500;
  line-height: 1.12;
  text-transform: uppercase;
  letter-spacing: -0.005em;
}

.search-result .sr-byline {
  margin-top: 6px;
  font-size: 12px;
  color: rgba(0, 0, 0, 0.55);
}

.search-empty {
  font-size: 15px;
  color: rgba(0, 0, 0, 0.5);
  padding: 6px 0;
}

/* Fixed reveal nav (homepage): hidden over the header, slides in on scroll */
.nav.reveal {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 30;
  background: rgba(255, 255, 255, 0.88);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  transform: translateY(-100%);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.45s ease, opacity 0.45s ease;
}

.nav.reveal.visible {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

/* Article header: fixed bar — transparent white over the hero, then the same
   frosted bar as the homepage once scrolled past the cover image */
.nav.on-hero {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 30;
  color: var(--white);
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background 0.35s ease, color 0.35s ease, border-color 0.35s ease;
}

.nav.on-hero .nav-logo img { filter: invert(1); opacity: 0.92; transition: filter 0.35s ease; }

.nav.on-hero.solid {
  color: var(--black);
  background: rgba(255, 255, 255, 0.9);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom-color: rgba(0, 0, 0, 0.08);
}

.nav.on-hero.solid .nav-logo img { filter: none; opacity: 1; }
.nav.on-hero.solid .nav-toggle,
.nav.on-hero.solid .nav-search-btn { color: var(--black); }

/* ---------- Cover (frame 5) ---------- */

.cover {
  position: relative;
  display: grid;
  grid-template-columns: 51.5% 48.5%;
  height: 100vh;
  min-height: 620px;
  background: var(--white);
}

.cover-left {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 0 0 10.5%;
}

.cover-brand img { width: 74%; height: auto; }

.cover-issue {
  font-family: var(--display);
  font-size: clamp(38px, 4.6vw, 78px);
  letter-spacing: 0.015em;
  line-height: 1;
  margin-top: 0.28em;
}

.cover-meta {
  position: absolute;
  bottom: 3.4%;
  left: 0;
  width: 100%;
  display: flex;
  padding-left: 10.5%;
  font-size: 15px;
  letter-spacing: 0.01em;
}

.cover-meta .preorder { margin-left: 24%; }
.cover-meta a:hover { text-decoration: underline; }

.cover-right {
  background: url("../assets/cover-photo.jpg") center top / cover no-repeat;
}

/* ---------- Red manifesto card (frames 2–3) ---------- */

.card-overlay {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  cursor: pointer;
  transition: opacity 0.8s ease, visibility 0.8s;
}

.card-overlay.dismissed { opacity: 0; visibility: hidden; }

.red-card {
  position: relative;
  margin-top: 1.5vh;
  width: min(560px, 82vw);
  height: 96vh;
  /* blur lives on the card element alone — no blend mode / no opacity here,
     otherwise the browser drops backdrop-filter and you get a flat panel */
  -webkit-backdrop-filter: blur(9px) saturate(1.25);
  backdrop-filter: blur(9px) saturate(1.25);
  transform: rotate(-1.6deg);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.35);
  isolation: isolate;
}

/* red multiply tint — sits over the frosted backdrop, beneath the text */
.red-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background: var(--red-overlay);
  opacity: 0.82;
  mix-blend-mode: multiply;
  pointer-events: none;
}

/* paper grain on the card */
.red-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 0.9 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  background-size: 150px 150px;
  opacity: 0.4;
  mix-blend-mode: soft-light;
  pointer-events: none;
}

.card-content {
  position: relative;
  z-index: 1;              /* above the multiply tint, below the grain */
  height: 100%;
  padding: 9% 9% 7%;
  display: flex;
  flex-direction: column;
  color: var(--black);
}

/* ---------- Manifesto typography (card + frame 4 overlay) ---------- */

.manifesto { text-align: center; font-size: 12.5px; line-height: 1.6; }

.manifesto .m-title {
  font-family: var(--serif);
  font-weight: 800;
  font-size: clamp(34px, 3.4vw, 52px);
  letter-spacing: 0.05em;
  line-height: 1;
}

.manifesto .m-phonetic {
  font-family: var(--serif);
  font-size: 15px;
  margin-top: 14px;
  letter-spacing: 0.04em;
}

.manifesto .m-block { margin-top: 26px; }
.manifesto .m-noun { text-align: left; }
.manifesto .m-noun .pos { font-style: italic; font-size: 11px; }
.manifesto .m-noun .quote { opacity: 0.75; font-style: italic; }
.manifesto u { text-underline-offset: 2px; }
.manifesto .m-list { margin-top: 6px; }
.manifesto .m-list li { list-style: none; }
.manifesto .m-close { margin-top: 30px; font-weight: 600; }
.manifesto .m-info { text-align: left; }

/* ---------- Red full overlay (frame 4) ---------- */

.manifesto-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  /* light base so the red multiply reads as red even over dark pages */
  background: rgba(255, 255, 255, 0.55);
  -webkit-backdrop-filter: blur(22px) saturate(1.3);
  backdrop-filter: blur(22px) saturate(1.3);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s ease, visibility 0.5s;
  cursor: pointer;
}

.manifesto-overlay::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--red-overlay);      /* Figma: C50000 @ 80% + background blur */
  opacity: 0.8;
  mix-blend-mode: multiply;
}

/* film grain over the frosted editor-letter overlay */
.manifesto-overlay::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 0.85 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  background-size: 150px 150px;
  opacity: 0.4;
  mix-blend-mode: overlay;
  pointer-events: none;
}

.manifesto-overlay.open { opacity: 1; visibility: visible; }

.manifesto-overlay .manifesto {
  position: relative;
  z-index: 2;                 /* keep text crisp above the grain layer */
  width: min(680px, 86vw);
  color: var(--black);
}

/* ---------- Article grid (frames 6–7) ---------- */

.grid-section { padding: 0 2.5% 90px; }

/* homepage stories: clear the fixed reveal nav once it slides in */
#stories { padding-top: 48px; }

.story-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  column-gap: 2.8%;
  row-gap: 64px;
  margin-top: 56px;
}

.story-card .thumb {
  aspect-ratio: 200 / 137;
  background: var(--gray-placeholder);
  overflow: hidden;
}

.story-card .thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.story-card:hover .thumb img { transform: scale(1.03); }

.story-card .column-name {
  margin-top: 14px;
  color: var(--red-label);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.story-card h3 {
  margin-top: 6px;
  font-size: clamp(18px, 1.75vw, 27px);
  font-weight: 500;
  line-height: 1.12;
  text-transform: uppercase;
  letter-spacing: -0.005em;
  max-width: 92%;
}

.story-card .byline { margin-top: 10px; font-size: 12px; }

.feature-banner {
  margin-top: 64px;
  background: var(--gray-placeholder);
  min-height: 240px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.feature-banner h3 {
  font-size: clamp(16px, 1.6vw, 24px);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.01em;
}

/* ---------- Article page (frames 8–9) ---------- */

.article-hero { position: relative; }

.article-hero .hero-img {
  width: 100%;
  height: 67vh;
  min-height: 420px;
  object-fit: cover;
}

.article-head {
  padding: 48px 4% 72px;
  display: flex;
  align-items: flex-end;
  gap: 40px;
}

.article-head h1 {
  font-size: clamp(40px, 5vw, 86px);
  font-weight: 500;
  line-height: 1.04;
  letter-spacing: -0.015em;
  text-transform: uppercase;
  max-width: 62%;
  flex: 1;
}

.article-head .byline {
  font-size: clamp(16px, 1.5vw, 24px);
  padding-bottom: 0.35em;
  margin-right: 8%;
  white-space: nowrap;
}

.article-body { padding: 40px 12% 120px 8%; }

.article-body .lede {
  font-size: clamp(22px, 2vw, 34px);
  font-weight: 500;
  line-height: 1.22;
  letter-spacing: -0.01em;
  max-width: 88%;
}

.article-body p.copy {
  margin-top: 28px;
  max-width: 62%;
  font-size: 14px;
  line-height: 1.65;
}

.article-body .pull-quote {
  margin-top: 44px;
  max-width: 62%;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.5;
}

/* Inline article images (PAPER-style) — align to the text column, with caption */
.article-figure {
  margin: 48px 0;
  max-width: 62%;
}

.article-figure.wide { max-width: 88%; }

.article-figure img {
  width: 100%;
  height: auto;
  display: block;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  background: var(--gray-placeholder);
}

.article-figure figcaption {
  margin-top: 10px;
  font-size: 12px;
  line-height: 1.45;
  color: rgba(0, 0, 0, 0.5);
}

/* ---------- Footer (PAPER-style) ---------- */

.site-footer {
  background: var(--black);
  color: var(--white);
  text-align: center;
  padding: 84px 24px 46px;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 34px;
  font-family: var(--grotesk);
  font-weight: 700;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  font-size: 15px;
}

.footer-nav a,
.footer-social a { transition: opacity 0.2s ease; }
.footer-nav a:hover { opacity: 0.55; }

.footer-logo { display: inline-block; margin: 46px 0 38px; }
.footer-logo img { width: min(440px, 72vw); height: auto; filter: invert(1); display: block; }

.footer-social {
  display: flex;
  justify-content: center;
  gap: 28px;
  margin-bottom: 36px;
}

.footer-social a { color: var(--white); opacity: 0.9; }
.footer-social a:hover { opacity: 0.5; }
.footer-social svg { width: 22px; height: 22px; display: block; }

.footer-copy {
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
}

/* ---------- Responsive ---------- */

@media (max-width: 860px) {
  .cover { grid-template-columns: 1fr; grid-template-rows: 58% 42%; }
  .cover-left { padding: 0 8%; }
  .cover-brand img { width: 100%; }
  .cover-meta { padding-left: 8%; }
  .cover-meta .preorder { margin-left: auto; margin-right: 8%; }
  .story-grid { grid-template-columns: 1fr; row-gap: 48px; }
  .story-card h3 { max-width: 100%; }
  .nav { padding: 16px 20px; }
  .nav-group { display: none; }           /* links move into the drawer */
  .nav-toggle { display: inline-flex; }   /* search stays visible at all sizes */
  .article-head { flex-direction: column; align-items: flex-start; gap: 16px; }
  .article-head h1 { max-width: 100%; }
  .article-body { padding: 24px 8% 80px; }
  .article-body p.copy, .article-body .pull-quote { max-width: 100%; }
  .article-figure, .article-figure.wide { max-width: 100%; }
  .site-footer { padding: 56px 20px 36px; }
  .footer-nav { gap: 16px 22px; font-size: 13px; }
}
