/*
  Fortoday portfolio ecosystem — shared navigation, tokens, and tactical hovers.
  Load after page-specific <style> blocks so these rules win on nav/header/footer.
*/

:root {
  --bone: #E5DFD3;
  --bone-soft: #FAF9F6;
  --muted-opacity: 0.72;
  --nav-gap: 3rem;
  --nav-pad-y: 0.2rem;
  --nav-pad-x: 2rem;
  --header-margin-top: 10px;
  --header-margin-bottom: 40px;
  --logo-width: 100px;
}

html.brand-fortoday {
  --bg: #1A1A1A;
  --fg: var(--bone);
  --fg-muted: var(--bone);
  --fg-dim: #1A1A1A;
  --rule: rgba(229, 223, 211, 0.22);
  --accent: #C68B45;
  --container: #2E2C2A;
  --header: 'Sorts Mill Goudy', 'EB Garamond', Georgia, serif;
  --tagline-font: var(--header);
  --editorial: var(--header);
  --utility: var(--header);
  --typewriter: var(--header);
}

html.brand-boudoir {
  --bg: #0D0B0A;
  --fg: var(--bone);
  --fg-muted: var(--bone);
  --fg-dim: #0D0B0A;
  --accent: #5C2528;
  --container: #2A2421;
  --rule: #2A2421;
}

html.brand-friend {
  --bg: #111111;
  --fg: var(--bone);
  --fg-muted: var(--bone);
  --fg-dim: #111111;
  --accent: #7A1C1C;
  --container: #231818;
  --rule: rgba(229, 223, 211, 0.18);
}

html.brand-aftr-hrs {
  --bg: #130f0d;
  --fg: var(--bone);
  --fg-muted: var(--bone);
  --fg-dim: #130f0d;
  --accent: #B8954A;
  --container: #2E2618;
  --rule: rgba(229, 223, 211, 0.18);
  /* Dual logo: wide wordmark PNG (name + tagline); small mono mark above */
  --logo-width: min(96vw, 920px);
  --logo-mark-width: 72px;
}

/* ── anchored header + nav (same screen position across brands) ── */
header {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin: var(--header-margin-top) auto var(--header-margin-bottom) auto;
  border-bottom: none;
  width: max-content;
  max-width: 100%;
  --title-size: clamp(2.8rem, 8vw, 5.5rem);
}

.brand-logo-container {
  width: var(--logo-width);
  margin-bottom: 15px;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--nav-gap);
  flex-wrap: wrap;
  padding: var(--nav-pad-y) var(--nav-pad-x);
  min-height: 2.75rem;
  box-sizing: border-box;
}

/* ── global secondary tone ── */
.filter-label,
#photo-count,
.accessibility-link,
.gate-field label,
.gate-disclaimer,
.gate-sub,
footer span {
  color: var(--fg);
  opacity: var(--muted-opacity);
}

/* ── navigation: 50% idle, accent snap on hover/active ── */
.nav a {
  color: var(--fg);
  opacity: var(--muted-opacity);
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-thickness: 1px;
  transition: none;
}

.nav a:hover,
.nav a:focus-visible {
  opacity: 1;
  color: var(--accent);
  text-decoration-color: var(--accent);
  border-color: var(--accent);
}

.nav a[aria-current="page"] {
  opacity: 1;
  color: var(--accent);
  text-decoration-color: var(--accent);
}

/* ── instant tactical hovers (menus, buttons, links — not gallery motion) ── */
a,
button,
.form-submit-btn,
#gate-submit,
#lb-close,
.lb-arrow,
.email-btn,
.accessibility-link,
nav a,
.input-box {
  transition: none;
}

.accessibility-link:hover,
.accessibility-link:focus-visible,
.email-btn:hover,
.email-btn:focus-visible,
#lb-close:hover,
#lb-close:focus-visible,
.lb-arrow:hover,
.lb-arrow:focus-visible,
#gate-submit:hover,
#gate-submit:focus-visible {
  opacity: 1;
  color: var(--accent);
}

/* ── For Today Photography typography ── */
html.brand-fortoday body {
  font-family: var(--header);
  font-weight: 400;
}

html.brand-fortoday .site-title {
  font-family: var(--header);
  font-weight: 500;
  font-size: clamp(2.2rem, 7vw, 3.2rem);
  letter-spacing: 0.02em;
  text-transform: lowercase;
  line-height: 1;
}

html.brand-fortoday .manifesto-heading.site-title {
  font-family: var(--header);
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: none;
}

html.brand-fortoday .nav a,
html.brand-fortoday .filter-label,
html.brand-fortoday #tag-select,
html.brand-fortoday #photo-count,
html.brand-fortoday .accessibility-link,
html.brand-fortoday footer span,
html.brand-fortoday .skip-link,
html.brand-fortoday #lb-close,
html.brand-fortoday .lb-arrow,
html.brand-fortoday .cell-label,
html.brand-fortoday .cell-tag,
html.brand-fortoday .lb-cap-tag,
html.brand-fortoday #lb-cap-title,
html.brand-fortoday .form-group label,
html.brand-fortoday .form-group input,
html.brand-fortoday .form-group textarea,
html.brand-fortoday .form-group select,
html.brand-fortoday .form-submit-btn,
html.brand-fortoday .display-text,
html.brand-fortoday .portal-intro,
html.brand-fortoday .manifesto p,
html.brand-fortoday footer {
  font-family: var(--header);
}

html.brand-fortoday .nav a {
  letter-spacing: 0.28em;
  text-transform: lowercase;
  font-size: clamp(0.68rem, 0.85vw, 0.82rem);
}

html.brand-fortoday .tagline {
  font-family: var(--header);
  font-size: clamp(0.78rem, 1.1vw, 0.92rem);
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: lowercase;
}

html.brand-fortoday .cell {
  border: 1px solid var(--container);
}

/* ── unified footer tagline ── */
footer {
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 0.75rem;
}

footer span {
  font-size: clamp(0.95rem, 1.15vw, 1.2rem);
  letter-spacing: 0.08em;
  text-align: center;
  width: 100%;
}

.footer-links,
.footer-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: var(--nav-gap);
  row-gap: 0.85rem;
  width: 100%;
}

/* Footer links — same look as .accessibility-link (no underline, muted until hover) */
footer .accessibility-link,
.footer-links a,
.footer-actions a {
  font-family: var(--utility, var(--header, Georgia, serif));
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: lowercase;
  color: var(--fg);
  text-decoration: none;
  opacity: 0.5;
  white-space: nowrap;
  transition: none;
}

footer .accessibility-link:link,
footer .accessibility-link:visited,
.footer-links a:link,
.footer-links a:visited,
.footer-actions a:link,
.footer-actions a:visited {
  color: var(--fg);
}

footer .accessibility-link:hover,
footer .accessibility-link:focus-visible,
.footer-links a:hover,
.footer-links a:focus-visible,
.footer-actions a:hover,
.footer-actions a:focus-visible {
  opacity: 1;
  color: var(--accent);
}

html.brand-boudoir footer .accessibility-link,
html.brand-boudoir .footer-links a,
html.brand-boudoir .footer-actions a,
html.brand-aftr-hrs footer .accessibility-link,
html.brand-aftr-hrs .footer-links a,
html.brand-aftr-hrs .footer-actions a {
  font-style: italic;
}

/* Mid-page testimonial CTA (matches footer link tone, not underlined) */
.testimonial-submit-cta a,
.testimonial-submit-cta .accessibility-link {
  font-family: var(--utility, var(--header, Georgia, serif));
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: lowercase;
  color: var(--fg);
  text-decoration: none;
  opacity: 0.5;
  transition: none;
}

.testimonial-submit-cta a:hover,
.testimonial-submit-cta a:focus-visible,
.testimonial-submit-cta .accessibility-link:hover,
.testimonial-submit-cta .accessibility-link:focus-visible {
  opacity: 1;
  color: var(--accent);
}

/* Inline / gate links (underlined secondary CTAs — not footer) */
.filter-booking-cta a,
.gate-error a,
#gate-error a {
  color: var(--fg);
  opacity: var(--muted-opacity);
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-thickness: 1px;
  transition: none;
}

.filter-booking-cta a:link,
.filter-booking-cta a:visited,
.gate-error a:link,
.gate-error a:visited,
#gate-error a:link,
#gate-error a:visited {
  color: var(--fg);
}

.filter-booking-cta a:hover,
.filter-booking-cta a:focus-visible,
.gate-error a:hover,
.gate-error a:focus-visible,
#gate-error a:hover,
#gate-error a:focus-visible {
  opacity: 1;
  color: var(--accent);
  text-decoration-color: var(--accent);
}

/* ── Boudoir accent cues ── */
html.brand-boudoir .tagline {
  color: var(--accent);
  opacity: 1;
}

html.brand-boudoir .gate-eyebrow {
  color: var(--accent);
}

html.brand-boudoir #gate-box,
html.brand-boudoir .cell {
  border: 1px solid var(--container);
}

html.brand-boudoir #gate-box {
  border-color: var(--container);
}

html.brand-boudoir .nav a {
  border: 1px solid var(--container);
}

html.brand-boudoir .nav a:hover,
html.brand-boudoir .nav a[aria-current="page"] {
  border-color: var(--accent);
}

/* ── f(r)iend gallery frames ── */
html.brand-friend .nav a:hover,
html.brand-friend .nav a[aria-current="page"],
html.brand-friend .cell-tag,
html.brand-friend #tag-select:focus {
  color: var(--accent);
}

html.brand-friend .cell {
  border: 1px solid var(--container);
}

html.brand-aftr-hrs .brand-logo-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: var(--logo-width);
  max-width: 100%;
  gap: 10px;
}

html.brand-aftr-hrs .brand-logo-mark {
  width: var(--logo-mark-width);
  height: auto;
}

html.brand-aftr-hrs .brand-logo-wordmark {
  width: 100%;
  height: auto;
}

/* ── aftr hrs (direct-link private gallery) ── */
html.brand-aftr-hrs .gate-eyebrow,
html.brand-aftr-hrs .cell-tag,
html.brand-aftr-hrs .lb-cap-tag {
  color: var(--accent);
}

html.brand-aftr-hrs #gate-box,
html.brand-aftr-hrs .cell {
  border: 1px solid var(--container);
}

html.brand-aftr-hrs .nav a {
  border: 1px solid var(--container);
}

html.brand-aftr-hrs .nav a:hover,
html.brand-aftr-hrs .nav a:focus-visible {
  border-color: var(--accent);
}

/* ── portfolio conversion (sticky book, gallery intro, filter CTA) ── */
.gallery-intro {
  max-width: 36rem;
  margin: 0 auto 1.25rem;
  padding: 0 1.5rem;
  text-align: center;
  font-family: var(--header, Georgia, serif);
  font-size: clamp(0.78rem, 1.05vw, 0.92rem);
  font-weight: 500;
  line-height: 1.55;
  letter-spacing: 0.04em;
  color: var(--fg);
  opacity: 0.72;
  text-transform: lowercase;
}

.filter-booking-cta {
  text-align: center;
  padding: 0.35rem 1.5rem 0.75rem;
  font-family: var(--header, Georgia, serif);
  font-size: clamp(0.75rem, 1vw, 0.88rem);
  opacity: 0.72;
  text-transform: lowercase;
}

.filter-booking-cta[hidden] {
  display: none;
}

.filter-booking-cta a {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.booking-sticky {
  display: none;
}

@media (max-width: 768px) {
  .booking-sticky {
    display: flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 8000;
    padding: 0.65rem 1rem calc(0.65rem + env(safe-area-inset-bottom, 0px));
    background: rgba(26, 26, 26, 0.94);
    border-top: 1px solid var(--container, rgba(229, 223, 211, 0.14));
  }

  html.brand-boudoir .booking-sticky {
    background: rgba(13, 11, 10, 0.94);
  }

  html.brand-friend .booking-sticky {
    background: rgba(17, 17, 17, 0.94);
  }

  .booking-sticky a {
    font-family: var(--header, var(--utility, Georgia, serif));
    font-size: clamp(0.72rem, 2.5vw, 0.85rem);
    letter-spacing: 0.22em;
    text-transform: lowercase;
    text-decoration: underline;
    text-underline-offset: 4px;
    color: var(--fg);
    opacity: 0.85;
    padding: 0.35rem 0.75rem;
  }

  .booking-sticky a:hover,
  .booking-sticky a:focus-visible {
    opacity: 1;
    color: var(--accent);
  }

  body.has-booking-sticky {
    padding-bottom: calc(3.25rem + env(safe-area-inset-bottom, 0px));
  }
}

@media (max-width: 768px) {
  header {
    margin-bottom: 25px;
    width: 100%;
  }

  .site-title,
  .tagline {
    white-space: normal;
  }
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
