/*
Theme Name: ReelFrame
Theme URI: https://example.com/reelframe
Author: Your Studio
Description: A clean, modern film-review theme. Genuine editorial writeups,
  trailers and ratings — no download links, no dark patterns. All real
  styling lives in this file plus single-page.css; header.php/footer.php/
  index.php/archive.php/single.php only carry markup.
Version: 1.0.0
*/

/* ============================================================
   DESIGN TOKENS
   Palette: near-black background, off-white ink text, and a
   vibrant yellow accent for links/tags/hover states. Signature
   elements: a circular "score dial" rating badge and a ticket-stub
   perforated divider.
   ============================================================ */
:root {
    --bg: #0A0A0C;
    --surface: #1C1D22;
    --ink: #F2F2F0;
    --ink-soft: #B4B7C2;
    --ink-faint: #797D8A;
    --line: #34353C;
    --line-strong: #45464F;

    --accent: #F2F2F0;         /* clean ink accent — no gold */
    --accent-deep: #FFFFFF;
    --accent-ink: #F2F2F0;
    --accent-tint: rgba(255,255,255,.08);

    --teal: #FFD400;
    --teal-tint: rgba(255,212,0,.16);

    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 22px;

    --shadow-sm: 0 1px 2px rgba(0,0,0,.2);
    --shadow-md: 0 2px 5px rgba(0,0,0,.25);
    --shadow-lg: 0 3px 8px rgba(0,0,0,.3);
    --shadow-inset: inset 0 1px 2px rgba(0,0,0,.2);

    --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: 'IBM Plex Mono', 'SFMono-Regular', Menlo, monospace;
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; overflow-x: hidden; }
html, body {
    background: var(--bg);
    color: var(--ink);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    max-width: 100%;
}
img { max-width: 100%; display: block; }
ul { list-style: none; margin: 0; padding: 0; }
a { color: var(--teal); text-decoration: none; transition: color .15s ease; }
a:hover { color: var(--accent-deep); }
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-body);
    color: var(--ink);
    line-height: 1.15;
    margin: 0 0 .5em;
    font-weight: 600;
}
p { margin: 0 0 1em; }
.container { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 20px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; padding: 0; }
:focus-visible { outline: 2px solid var(--accent-deep); outline-offset: 2px; border-radius: 4px; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

/* ============================================================
   SIGNATURE ELEMENT — score dial
   A circular rating badge: conic-gradient progress ring around
   a raised white lens, mono numerals. Used on cards + single page.
   ============================================================ */
.score-dial {
    --pct: 0;
    position: relative;
    width: 58px; height: 58px;
    border-radius: 50%;
    background: conic-gradient(var(--accent) calc(var(--pct) * 1%), var(--line) 0);
    display: flex; align-items: center; justify-content: center;
    box-shadow: var(--shadow-md);
    flex-shrink: 0;
}
.score-dial::before {
    content: "";
    position: absolute;
    inset: 5px;
    border-radius: 50%;
    background: var(--surface);
    box-shadow: var(--shadow-inset);
}
.score-dial .score-value {
    position: relative;
    font-family: var(--font-mono);
    font-weight: 600;
    font-size: 15px;
    color: var(--ink);
    line-height: 1;
    text-align: center;
}
.score-dial .score-value small { display: block; font-size: 8px; color: var(--ink-faint); font-weight: 500; margin-top: 2px; letter-spacing: .04em; }
.score-dial.score-dial-lg { width: 84px; height: 84px; }
.score-dial.score-dial-lg .score-value { font-size: 21px; }
.score-dial.score-dial-lg .score-value small { font-size: 9px; }

/* ============================================================
   SIGNATURE ELEMENT — ticket perforation
   A dashed rule with punched-out "holes" at each end, like the
   tear line on a cinema ticket stub.
   ============================================================ */
.ticket-perf {
    position: relative;
    height: 1px;
    background-image: repeating-linear-gradient(90deg, var(--line-strong) 0 8px, transparent 8px 16px);
    margin: 0;
}
.ticket-perf::before, .ticket-perf::after {
    content: "";
    position: absolute;
    top: 50%; transform: translateY(-50%);
    width: 16px; height: 16px;
    border-radius: 50%;
    background: var(--bg);
    border: 1px solid var(--line);
}
.ticket-perf::before { left: -9px; }
.ticket-perf::after { right: -9px; }

/* ============================================================
   HERO — homepage spotlight review
   ============================================================ */
.hero-spotlight {
    padding: 44px 0 8px;
}
.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--accent-deep);
    font-weight: 600;
    margin-bottom: 18px;
}
.hero-eyebrow::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px var(--accent-tint); }

.hero-card {
    display: grid;
    grid-template-columns: 300px 1fr;
    background: var(--surface);
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}
.hero-card-poster { position: relative; }
.hero-card-poster img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 2/3; }
.hero-card-body { padding: 36px 40px; display: flex; flex-direction: column; gap: 16px; }
.hero-card-title { font-size: 34px; }
.hero-card-dek { color: var(--ink-soft); font-size: 16.5px; line-height: 1.65; }
.hero-card-meta { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.hero-card-footer { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding-top: 20px; border-top: 1px dashed var(--line-strong); }

.btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 11px 22px;
    border-radius: 999px;
    font-weight: 600; font-size: 14.5px;
    background: var(--ink);
    color: var(--bg);
    box-shadow: var(--shadow-sm);
    transition: transform .15s ease, box-shadow .15s ease;
}
.btn:hover { color: var(--bg); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-ghost { background: transparent; color: var(--ink); border: 1px solid var(--line-strong); box-shadow: none; }
.btn-ghost:hover { background: var(--bg); color: var(--ink); }

/* ============================================================
   META CHIPS (genre, year, runtime tags)
   ============================================================ */
.chip {
    display: inline-flex; align-items: center;
    font-family: var(--font-mono);
    font-size: 12px;
    padding: 5px 11px;
    border-radius: 999px;
    background: var(--bg);
    border: 1px solid var(--line);
    color: var(--ink-soft);
}
.chip-accent { background: var(--accent-tint); border-color: transparent; color: var(--accent-ink); }
.chip-teal { background: #FFD400; border-color: transparent; color: #14151A; font-weight: 700; }
.chip-stat {
    background: #FFFFFF;
    border-color: transparent;
    color: #14151A;
    gap: 6px;
}
.chip-stat .rating-num { color: #14151A; font-weight: 700; }
.chip-stat .stars { font-size: 13px; letter-spacing: 1px; color: #D9D9D9; }
.chip-stat .rating-count { color: #14151A; opacity: .65; }
a.chip:hover { color: var(--ink); border-color: var(--line-strong); }

/* ============================================================
   STAR-FILL COMPONENT (reused by the app-rating-badge and the
   chip-stat "4.5 (670)" chip — base rules live here, unscoped, so
   both contexts get the gold overlay; each context only overrides
   size/spacing/empty-star color above.)
   ============================================================ */
.stars {
    position: relative;
    display: inline-block;
    line-height: 1;
    color: var(--line-strong); /* empty-star base color, default */
}
.stars::before {
    content: "★★★★★";
    position: absolute;
    top: 0; left: 0;
    width: var(--pct, 0%);
    overflow: hidden;
    white-space: nowrap;
    color: #FFD400; /* bright yellow — a one-off for this recognizable rating pattern, not a site-wide accent */
}

/* ============================================================
   APP-STORE-STYLE RATING BADGE (single review header)
   ============================================================ */
.app-rating-badge {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    margin: 6px 0 14px;
    font-size: 15px;
    color: var(--ink-soft);
}
.app-rating-badge .rating-num { color: var(--ink); font-weight: 700; }
.app-rating-badge .stars { font-size: 16px; letter-spacing: 2px; }
.app-rating-badge .rating-count { color: var(--ink-faint); }
.app-rating-badge .sep { color: var(--ink-faint); }
.app-rating-badge .badge-item { color: var(--ink-soft); }

/* Filled, vibrant variants for the reader-reaction buttons */
.chip-fill-green  { background: #2E9E5B; border-color: transparent; color: #FFFFFF; }
.chip-fill-red     { background: #D64545; border-color: transparent; color: #FFFFFF; }
.chip-fill-yellow { background: #E0A72E; border-color: transparent; color: #1A1400; }
.chip-fill-green:hover, .chip-fill-red:hover, .chip-fill-yellow:hover { filter: brightness(1.08); }
.chip-fill-green.is-disabled, .chip-fill-red.is-disabled, .chip-fill-yellow.is-disabled { filter: grayscale(.25); }

/* ============================================================
   SECTION HEADINGS
   ============================================================ */
.section-heading {
    display: flex; align-items: baseline; justify-content: space-between;
    margin: 56px 0 22px;
}
.section-heading h2 { font-size: 24px; }
.section-heading .section-link { font-size: 13.5px; font-weight: 600; color: var(--ink-soft); font-family: var(--font-mono); }
.section-heading .section-link:hover { color: var(--accent-deep); }

/* ============================================================
   TICKET CARDS — the movie review grid
   ============================================================ */
.movie-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    padding: 0 0 20px;
}
.ticket-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 0;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform .2s ease, box-shadow .2s ease;
    display: flex;
    flex-direction: column;
}
.ticket-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.ticket-poster { position: relative; aspect-ratio: 2/3; overflow: hidden; background: var(--bg); }
.ticket-poster img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.ticket-card:hover .ticket-poster img { transform: scale(1.045); }
.ticket-poster .score-dial { position: absolute; bottom: -22px; right: 14px; z-index: 2; }
.ticket-body { padding: 30px 18px 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.ticket-title { font-size: 17px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ticket-title a { color: var(--ink); }
.ticket-title a:hover { color: var(--accent-deep); }
.ticket-meta { display: flex; align-items: center; gap: 8px; font-family: var(--font-mono); font-size: 11.5px; color: var(--ink-faint); flex-wrap: wrap; }
.ticket-meta .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--ink-faint); }

@media (max-width: 760px) {
    .hero-card { grid-template-columns: 1fr; }
    .hero-card-poster img { aspect-ratio: 16/9; }
    .hero-card-body { padding: 26px 22px; }
}
@media (max-width: 640px) {
    .movie-grid { gap: 16px; }
    .ticket-body { padding: 24px 14px 14px; }
    .ticket-title { font-size: 15px; }
}
@media (max-width: 400px) {
    .movie-grid { gap: 10px; }
    .ticket-body { padding: 20px 10px 10px; }
}

/* ============================================================
   PAGINATION
   ============================================================ */
.pagination-wrap { display: flex; justify-content: center; gap: 6px; margin: 48px 0 20px; flex-wrap: wrap; }
.pagination-wrap .page-numbers {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 40px; height: 40px; padding: 0 12px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--line);
    color: var(--ink-soft);
    font-family: var(--font-mono);
    font-size: 13.5px;
    font-weight: 600;
    background: var(--surface);
}
.pagination-wrap .page-numbers:hover { border-color: var(--line-strong); color: var(--ink); }
.pagination-wrap .page-numbers.current { background: var(--ink); border-color: var(--ink); color: var(--bg); }

/* ============================================================
   ARCHIVE HEADER
   ============================================================ */
.archive-header { padding: 44px 0 8px; border-bottom: 1px solid var(--line); margin-bottom: 40px; }
.archive-kicker { font-family: var(--font-mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-deep); font-weight: 600; margin-bottom: 10px; }
.archive-title { font-size: 32px; }
.archive-desc { color: var(--ink-soft); max-width: 640px; margin-top: 6px; }

/* ============================================================
   FOOTER — styled inline in footer.php now (self-contained)
   ============================================================ */

@media (max-width: 480px) {
    .container { padding: 0 14px; }
}

/* ============================================================
   STATIC PAGES (about, contact, privacy, terms, disclaimer)
   ============================================================ */
.page-hero { padding: 48px 0 8px; }
.page-hero h1 { font-size: 32px; }
.static-content { max-width: 760px; padding: 24px 0 80px; }
.static-content h2 { font-size: 21px; margin-top: 40px; }
.static-content p, .static-content li { color: var(--ink-soft); font-size: 16px; line-height: 1.75; }
.static-content ul { list-style: disc; padding-left: 22px; margin-bottom: 1em; }
.contact-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-md); padding: 28px; box-shadow: var(--shadow-sm); margin-top: 24px; }
.contact-card a { font-weight: 600; }

/* ============================================================
   404 / SEARCH EMPTY STATE
   ============================================================ */
.empty-state { padding: 80px 0; text-align: center; }
.empty-state h2 { font-size: 26px; }
.empty-state p { color: var(--ink-soft); }
