/*
Theme Name: SFF Midnight Marquee
Theme URI: https://www.staffordfilmfestival.com/
Author: Stafford Film Festival
Description: Midnight Marquee, the Stafford Film Festival design. Ink black, festival pink and pale rose, Anton over Archivo. Built from the approved design handoff. Operated by Beeyawn Ltd.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 7.4
License: Proprietary
Text Domain: sff
*/

/* ---------------------------------------------------------
   Design tokens. Kept as custom properties so a future pass
   can move the inline styles onto classes without a rewrite.
   --------------------------------------------------------- */
:root {
  --sff-ink: #0d0b0c;
  --sff-pink: #e23e6d;
  --sff-rose: #f6dee3;
  --sff-hairline: rgba(246, 222, 227, .14);
  --sff-border: rgba(246, 222, 227, .18);
  --sff-muted: rgba(246, 222, 227, .55);
  --sff-secondary: rgba(246, 222, 227, .8);
}

/* ---------------------------------------------------------
   Base
   --------------------------------------------------------- */
body {
  margin: 0;
  background: var(--sff-ink);
  color: var(--sff-rose);
  font-family: 'Archivo', 'Barlow', system-ui, -apple-system, sans-serif;
  /* 16px floor is an accessibility requirement in the brief, not a preference */
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
a:hover { color: var(--sff-pink); }
img { max-width: 100%; }
input, textarea, select, button { font-family: inherit; font-size: 16px; }
::placeholder { color: rgba(13, 11, 12, .45); }

/* No border radius anywhere, per the design */
input, textarea, select, button { border-radius: 0; }

/* Visible focus. The design has none, so this is added rather than copied. */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid var(--sff-pink);
  outline-offset: 2px;
}

.sff-skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--sff-pink);
  color: var(--sff-ink);
  padding: 12px 20px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  z-index: 100;
}
.sff-skip:focus { left: 0; }

/* ---------------------------------------------------------
   Article body, for News posts written in the editor.
   The design has no long form prose style, so this derives
   one from the same tokens.
   --------------------------------------------------------- */
.sff-prose { font-size: 17px; line-height: 1.7; color: var(--sff-secondary); }
.sff-prose > *:first-child { margin-top: 0; }
.sff-prose p { margin: 0 0 20px; }
.sff-prose h2 {
  font-family: 'Anton', sans-serif;
  font-weight: 400;
  font-size: 32px;
  line-height: 1.1;
  text-transform: uppercase;
  color: var(--sff-rose);
  margin: 40px 0 14px;
}
.sff-prose h3 {
  font-family: 'Anton', sans-serif;
  font-weight: 400;
  font-size: 24px;
  line-height: 1.15;
  text-transform: uppercase;
  color: var(--sff-rose);
  margin: 32px 0 12px;
}
.sff-prose a { color: var(--sff-pink); font-weight: 600; }
.sff-prose a:hover { color: var(--sff-rose); }
.sff-prose ul, .sff-prose ol { margin: 0 0 20px; padding-left: 22px; }
.sff-prose li { margin-bottom: 8px; }
.sff-prose blockquote {
  margin: 28px 0;
  padding: 4px 0 4px 22px;
  border-left: 2px solid var(--sff-pink);
  color: var(--sff-rose);
}
.sff-prose img { display: block; margin: 28px 0; }
.sff-prose figcaption { font-size: 13px; color: var(--sff-muted); margin-top: 8px; }
.sff-prose hr { border: 0; border-top: 1px solid var(--sff-hairline); margin: 36px 0; }

/* ---------------------------------------------------------
   Form feedback
   --------------------------------------------------------- */
.sff-notice {
  margin: 0 40px 24px;
  padding: 14px 20px;
  font-size: 15px;
  line-height: 1.6;
  border: 1px solid var(--sff-pink);
  color: var(--sff-rose);
}
.sff-notice--ok { border-color: var(--sff-pink); }
.sff-notice--error { border-color: var(--sff-pink); background: rgba(226, 62, 109, .12); }
.sff-hp { position: absolute; left: -9999px; }

/* ---------------------------------------------------------
   Pagination
   --------------------------------------------------------- */
.sff-pagination {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  padding: 8px 40px 56px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .1em;
}
.sff-pagination .page-numbers {
  border: 1px solid rgba(246, 222, 227, .4);
  padding: 10px 16px;
}
.sff-pagination .page-numbers:hover { border-color: var(--sff-pink); color: var(--sff-pink); }
.sff-pagination .page-numbers.current { background: var(--sff-pink); color: var(--sff-ink); border-color: var(--sff-pink); }

/* ---------------------------------------------------------
   Responsive. The design is desktop first with inline grids,
   so these collapse them. Mobile must never scroll sideways.
   --------------------------------------------------------- */
@media (max-width: 900px) {
  [style*="grid-template-columns"] { grid-template-columns: 1fr !important; }
  [style*="font-size:88px"] { font-size: 46px !important; }
  [style*="font-size:72px"] { font-size: 40px !important; }
  [style*="font-size:60px"] { font-size: 36px !important; }
  [style*="font-size:48px"] { font-size: 30px !important; }
  [style*="font-size:42px"] { font-size: 28px !important; }
  [style*="padding:72px 48px 64px 40px"] { padding: 44px 22px !important; }
}

@media (max-width: 700px) {
  /* Header collapses to a wrapped row rather than a hamburger, which keeps
     every destination reachable without JavaScript. */
  header, nav { flex-wrap: wrap !important; }
  [style*="justify-content:space-between"] { flex-wrap: wrap !important; gap: 14px !important; }
  [style*="padding:14px 40px"] { padding: 14px 22px !important; }
  [style*="padding:0 40px"] { padding: 0 22px !important; }
  [style*="padding:56px 40px"] { padding: 40px 22px !important; }
  [style*="padding:48px 40px"] { padding: 36px 22px !important; }
  [style*="padding:36px 40px 30px"] { padding: 30px 22px 26px !important; }
  [style*="padding:18px 40px 8px"] { padding: 18px 22px 8px !important; }
  [style*="padding:52px 40px 60px"] { padding: 40px 22px 48px !important; }
  [style*="margin:18px 40px"] { margin: 18px 22px !important; }
  .sff-notice, .sff-pagination { margin-left: 22px; margin-right: 22px; padding-left: 0; padding-right: 0; }

  /* Winner and nominee rows stack instead of squeezing */
  [style*="justify-content:space-between"][style*="align-items:baseline"] {
    display: block !important;
  }
  [style*="text-align:right"] { text-align: left !important; }
}

@media (max-width: 400px) {
  [style*="font-size:88px"] { font-size: 38px !important; }
}

/* Nothing here should ever cause a horizontal scrollbar */
html, body { overflow-x: hidden; }

/* ---------------------------------------------------------
   Placeholder contrast.
   The design sets a dark placeholder, which suits the pale
   newsletter input but disappears on the transparent dark
   fields used by the contact and volunteer forms.
   --------------------------------------------------------- */
input[style*="background:transparent"]::placeholder,
textarea[style*="background:transparent"]::placeholder {
  color: rgba(246, 222, 227, .6);
  opacity: 1;
}

/* ---------------------------------------------------------
   Contrast corrections.
   Two colours in the design fail WCAG AA against ink black,
   which the brief treats as a requirement rather than a
   preference. Pale rose needs at least 51% opacity on ink to
   reach 4.5:1; both are raised to 60%, which measures 5.93:1.

   .45 was used on the NOMINATIONS labels, 17 of them across
   the winners pages, at 3.78:1.
   .35 was used on the empty sponsor slots at 2.72:1.
   --------------------------------------------------------- */
[style*="rgba(246,222,227,.45)"] { color: rgba(246, 222, 227, .6) !important; }
[style*="rgba(246,222,227,.35)"] { color: rgba(246, 222, 227, .6) !important; }
