/* ============================================================
   BASE.CSS — Singapore Saxophone Symposium
   Design tokens · Typography · Shared utilities · Header · Footer
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,600;1,400;1,600&family=DM+Mono:ital,wght@0,400;0,500;1,400&family=DM+Sans:ital,opsz,wght@0,9..40,400;0,9..40,500;0,9..40,700;1,9..40,400&display=swap');

/* ── Design Tokens ─────────────────────────────────────────── */

:root {
    --black:      #0A0A0A;
    /* --off-white:  #F0EDE6; */
    --off-white:  #EFE1B6;
    --gold:       #C9A84C;
    --dark-gold:       #7A5F28;
    --muted-gold: #1E1E1E;
    --dark-card:  #141414;
    --light-gray:   #D6D6D6;
    --mid-gray:   #2A2A2A;
    --muted:      #888888;
    --white:      #FFFFFF;

    --font-display:  'DM Sans', sans-serif;
    --font-serif:    'Cormorant Garamond', serif;
    --font-body:     'DM Sans', sans-serif;
    --font-mono:     'DM Mono', monospace;

    --hero-max-width: 1008px;
    --max-width:     1248px;
    --wrapper-width: 1440px;
    --section-pad:   5rem;
    --radius-card:   12px;
    --radius-btn:    0;
    --transition:    all 0.3s ease;
}

/* ── Reset & Base ──────────────────────────────────────────── */
*, *::before, *::after {
    box-sizing: border-box;
    text-underline-offset: 4px;
}

*:focus { outline: 0; }

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--black);
    color: var(--off-white);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    overflow-x: hidden;
    margin: 0;
    padding: 0;
}

/* ── Typography ────────────────────────────────────────────── */
h1 {
    font-family: var(--font-serif);
    font-size: 80px;
    font-weight: 400;
    line-height: 1.0;
    color: var(--white);
    margin-bottom: 1.5rem;
}

h2 {
    font-family: var(--font-serif);
    font-size: 36px;
    font-weight: 600;
    letter-spacing: 0;
    color: var(--off-white);
    margin-bottom: 1.25rem;
}

h3 {
    font-family: var(--font-body);
    font-size: 18px;
    font-weight: 700;
    color: var(--off-white);
    margin-bottom: 0.75rem;
}

p {
    font-family: var(--font-body);
    font-size: 16px;
    color: var(--off-white);
    line-height: 1.7;
    margin-bottom: 1rem;
}

a {
    font-family: var(--font-body);
    color: var(--off-white);
    text-decoration: none;
    transition: var(--transition);
    cursor: pointer;
}

a:hover { color: var(--gold); }

ul {
    padding-left: 0;
    margin-bottom: 0;
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ── Accent Italic ─────────────────────────────────────────── */
/* Used in h1/h2 for decorative gold italic word at end of heading */
.accent-italic {
    font-family: var(--font-serif);
    font-style: italic;
    font-weight: 400;
    color: var(--gold);
    text-transform: none;
}

.accent-italic.off-white {
    color: var(--off-white);
}

/* ── Eyebrow Label ─────────────────────────────────────────── */
.eyebrow {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: 11px;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 1rem;
}

/* ── Numbered Section Label (02 / TITLE ──) shared pattern ──
   Reusable across all pages. The trailing __line is OPTIONAL —
   include the <span class="section-label__line"> only where the
   design calls for a decorative accent line beside the label.   */
.section-label {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 2rem;
}

.section-label__num {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 500;
    color: var(--dark-gold);
    letter-spacing: 0.08em;
    flex-shrink: 0;
}

.section-label__text {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 500;
    color: var(--gold);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    flex-shrink: 0;
}

.section-label__line {
    flex: 0 0 120px;          /* fixed-width accent, NOT a stretch separator */
    height: 1px;
    background-color: var(--muted-gold);
}

/* ── Text Utilities ────────────────────────────────────────── */
.text-gold   { color: var(--gold); }
.text-muted  { color: var(--muted); }
.text-white  { color: var(--white); }
.text-center { text-align: center; }

.info-paragraph {
    font-size: 20px;
    line-height: 1.6;
}

/* ── Layout Wrappers ───────────────────────────────────────── */
.body-wrapper {
    width: var(--wrapper-width);
    margin: 0 auto;
}

.content-wrapper {
    width: var(--max-width);
    margin: 0 auto;
}

.section-pad {
    padding: var(--section-pad) 0;
}

/* ── Horizontal Rule ───────────────────────────────────────── */
hr {
    border: none;
    border-top: 1px solid var(--mid-gray);
    margin: 2rem 0;
}

hr.content {
    border: none;
    border-top: 1px solid var(--mid-gray);
    margin: 5rem 0;
}

/* ── Buttons ───────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 10px 28px;
    border-radius: var(--radius-btn);
    font-family: var(--font-mono);
    font-weight: 500;
    font-size: 12px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    border: 1px solid transparent;
}

/* .btn::after {
    content: '';
    display: inline-block;
    width: 20px;
    height: 14px;
    background-image: url('../images/arrow.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    transition: transform 0.3s;
    flex-shrink: 0;
} */

.btn:hover::after {
    transform: translateX(4px);
}

/* Gold filled button */
.btn-gold {
    background-color: var(--gold);
    color: var(--black);
    border-color: var(--gold);
}
.btn-gold::after {
    filter: brightness(0); /* invert gold arrow to black on gold bg */
}
.btn-gold:hover {
    background-color: transparent;
    color: var(--gold);
    border-color: var(--gold);
}
.btn-gold:hover::after {
    filter: none; /* restore gold arrow on transparent hover */
}

/* Outlined button */
.btn-outline {
    background-color: transparent;
    color: var(--off-white);
    border-color: var(--off-white);
}
.btn-outline:hover {
    background-color: rgba(240, 237, 230, 0.08);
    color: var(--off-white);
    border-color: var(--off-white);
}

/* Outlined gold button */
.btn-outline-gold {
    background-color: transparent;
    color: var(--gold);
    border-color: var(--gold);
}
.btn-outline-gold:hover {
    background-color: rgba(201, 168, 76, 0.08);
    color: var(--gold);
    border-color: var(--gold);
}

/* Muted ghost button */
.btn-muted {
    background-color: transparent;
    color: var(--muted);
    border-color: var(--muted);
}
.btn-muted:hover {
    background-color: rgba(136, 136, 136, 0.08);
    color: var(--off-white);
    border-color: var(--muted);
}

/* Full-width button */
.btn-full {
    width: 100%;
    justify-content: center;
}

/* ── Cards ─────────────────────────────────────────────────── */
.card {
    background-color: var(--dark-card);
    border: 1px solid var(--mid-gray);
    border-radius: var(--radius-card);
    overflow: hidden;
}

/* ── Divider Bar ────────────────────────────────────────────── */
.divider-bar {
    width: 40px;
    height: 2px;
    background-color: var(--gold);
    margin-bottom: 1.5rem;
}

/* ── Row (Bootstrap-style) ─────────────────────────────────── */
.row {
    display: flex;
    flex-wrap: wrap;
    margin-left: 0;
    margin-right: 0;
}

/* ── Grid gap utility ──────────────────────────────────────── */
.gap-20 { gap: 20px; }
.gap-4  { gap: 4px; }

/* ═══════════════════════════════════════════════════════════
   HEADER
   ═══════════════════════════════════════════════════════════ */
.sss-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background-color: rgba(10, 10, 10, 0.92);
    backdrop-filter: blur(8px);
    padding: 8px 0;
    transition: background-color 0.4s, padding 0.35s ease;
}

/* Header padding tightens once the page is scrolled (.scrolled toggled in common.js) */
.sss-header.scrolled {
    padding: 2px 0;
}

.sss-header__inner {
    max-width: var(--max-width);
    margin: 0 auto;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: height 0.35s ease;
}

/* Inner row collapses to a shorter height when scrolled */
.sss-header.scrolled .sss-header__inner {
    height: 56px;
}

/* Brand (logos) */
.sss-header__brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sss-header__brand img {
    width: 200px;
    height: auto;
    transition: width 0.35s ease;
}

/* Logo shrinks slightly once the page is scrolled (.scrolled toggled in common.js) */
.sss-header.scrolled .sss-header__brand img {
    width: 150px;
}

.sss-header__brand .brand-divider {
    width: 1px;
    height: 28px;
    background-color: var(--mid-gray);
}

/* Desktop navigation */
.sss-nav {
    display: flex;
    align-items: center;
    gap: 0;
}

.sss-nav a {
    font-family: var(--font-display);
    font-size: 12px;
    font-weight: 400;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
    padding: 0 20px;
    transition: color 0.2s;
}

.sss-nav a:last-child {
    padding: 0 0 0 20px;
}

.sss-nav a:hover,
.sss-nav a.active {
    color: var(--gold);
}

/* Burger (hidden on desktop) */
.sss-burger {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 28px;
    height: 20px;
    cursor: pointer;
    padding: 0;
    background: none;
    border: none;
}

.sss-burger span {
    display: block;
    width: 100%;
    height: 2px;
    background-color: var(--off-white);
    transition: var(--transition);
}

.sss-burger.is-active span:nth-child(1) { transform: rotate(45deg) translate(6px, 6px); }
.sss-burger.is-active span:nth-child(2) { opacity: 0; }
.sss-burger.is-active span:nth-child(3) { transform: rotate(-45deg) translate(6px, -6px); }

/* Mobile nav drawer */
.sss-mobile-nav {
    display: none;
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--black);
    z-index: 99;
    padding: 2rem;
    overflow-y: auto;
    transition: top 0.35s ease;
}

/* Track the header's shrunk inner height so the drawer stays flush — no gap
   when the user opens the menu after scrolling. Mirrors .sss-header.scrolled
   inner-height changes (72→56 default, 64→52 on narrow mobile). */
.sss-header.scrolled ~ .sss-mobile-nav {
    top: 56px;
}

.sss-mobile-nav.is-open {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.sss-mobile-nav a {
    display: block;
    font-family: var(--font-display);
    font-size: 36px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--off-white);
    padding: 1rem 0;
    border-bottom: 1px solid var(--mid-gray);
    letter-spacing: 0.02em;
}

.sss-mobile-nav a:hover { color: var(--gold); }

/* Spacer so content isn't hidden behind fixed header */
.header-spacer { height: 72px; }

/* ═══════════════════════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════════════════════ */
.sss-footer {
    background-color: var(--black);
    border-top: 1px solid var(--mid-gray);
    padding: 4rem 0 2.5rem;
}

.sss-footer__inner {
    max-width: var(--max-width);
    margin: 0 auto;
}

.sss-footer__nav {
    display: flex;
    gap: 0;
    border-bottom: 1px solid var(--mid-gray);
    padding-bottom: 2.5rem;
    margin-bottom: 1.5rem;
}

.sss-footer__nav a {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-family: var(--font-mono);
    font-weight: 500;
    font-size: 12px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted);
    padding: 0 48px 0 0;
    transition: color 0.2s;
}

.sss-footer__nav a::after {
    content: '';
    display: inline-block;
    width: 18px;
    height: 12px;
    background-image: url('../images/arrow.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    transition: transform 0.3s, filter 0.2s;
    flex-shrink: 0;
}

.sss-footer__nav a:hover {
    color: var(--gold);
}

.sss-footer__nav a:hover::after {
    filter: none; /* restore gold on hover */
    transform: translateX(6px);
}

.sss-footer__copy {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sss-footer__copy span {
    font-size: 12px;
    color: var(--muted);
    letter-spacing: 0.05em;
}

/* ── Back to Top ────────────────────────────────────────────── */
#btn-go-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background-color: var(--gold);
    color: var(--black);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
    z-index: 90;
    text-decoration: none;
}

#btn-go-to-top.visible {
    opacity: 1;
    pointer-events: all;
}

#btn-go-to-top::after {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    background-image: url('../images/arrow.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    transform: rotate(-90deg);
}


/* ═══════════════════════════════════════════════════════════
   RESPONSIVE — Tablet (≤1024px) · Mobile (≤768px) · Narrow (≤480px)
   Global layout defaults. Page-specific tuning lives in each page CSS.
   ═══════════════════════════════════════════════════════════ */

/* Tablet & below — wrapper widths become fluid, header padding tightens */
@media screen and (max-width: 1440px) {
    .body-wrapper { width: 100%; }
}

@media screen and (max-width: 1280px) {
    .content-wrapper { width: 100%; padding: 0 40px; }
    .sss-header__inner { padding: 0 40px; }
    .sss-footer__inner { padding: 0 40px; }
}

/* Tablet — swap desktop nav for burger drawer */
@media screen and (max-width: 1024px) {
    .sss-nav { display: none; }
    .sss-burger { display: flex; }
    .sss-header__inner { padding: 0 32px; }
    .sss-footer__inner { padding: 0 32px; }
}

/* Mobile — full stacking, footer rows wrap, typography scales */
@media screen and (max-width: 768px) {
    :root { --section-pad: 3rem; }

    /* Global typography scaling — applies to all pages that use the default
       h1/h2 (about, faq, registration, programme, artists page headers). */
    h1 { font-size: 36px; line-height: 1.05; }
    h2 { font-size: 24px; line-height: 1.15; }

    /* First-fold spacing — the desktop 5rem hr margin is punishing on phones.
       Roughly halve it to keep the hero/header tight to what follows. */
    hr.content { margin: 2.5rem 0; }
    hr { margin: 1.25rem 0; }

    .content-wrapper { padding: 0 24px; }
    .sss-header__inner { padding: 0 20px; }
    .sss-footer__inner { padding: 0 20px; }

    /* Header — smaller logo, slightly taller for touch comfort */
    .sss-header__brand img { width: 140px; }
    .sss-header.scrolled .sss-header__brand img { width: 120px; }

    /* Footer nav stacks vertically; copy lines stack too */
    .sss-footer__nav {
        flex-direction: column;
        gap: 0;
        padding-bottom: 1.5rem;
    }
    .sss-footer__nav a {
        padding: 1rem 0;
        border-bottom: 1px solid var(--mid-gray);
    }
    .sss-footer__nav a:last-child { border-bottom: none; }
    .sss-footer__copy {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    /* Section label gap tightens so a 02 / TITLE line doesn't wrap awkwardly */
    .section-label { gap: 8px; flex-wrap: wrap; }
    .section-label__line { flex-basis: 60px; }

    /* Back-to-top — smaller, closer to corner */
    #btn-go-to-top {
        width: 38px;
        height: 38px;
        bottom: 1rem;
        right: 1rem;
    }

    /* Mobile nav drawer typography scales down */
    .sss-mobile-nav a { font-size: 28px; padding: 0.85rem 0; }
}

/* Narrow phones — final tightening */
@media screen and (max-width: 480px) {
    h1 { font-size: 28px; }
    h2 { font-size: 20px; }

    hr.content { margin: 1.75rem 0; }
    hr { margin: 1rem 0; }

    .content-wrapper { padding: 0 16px; }
    .sss-header__inner { padding: 0 16px; }
    .sss-footer__inner { padding: 0 16px; }
    .sss-mobile-nav { padding: 1.25rem; top: 64px; }
    .sss-header.scrolled ~ .sss-mobile-nav { top: 52px; }
    .sss-mobile-nav a { font-size: 24px; }
    .header-spacer { height: 64px; }
    .sss-header__inner { height: 64px; }
    .sss-header.scrolled .sss-header__inner { height: 52px; }
    .sss-header__brand img { width: 120px; }
    .sss-header.scrolled .sss-header__brand img { width: 105px; }
}

/* ============================================================
   SHARED UTILITY · Tag Pills
   Used on FAQ (MRT stations) and Registration (artist names).
   Promoted from per-page CSS to remove the .tag-pill conflict.
   ------------------------------------------------------------
   Default: rounded gray pill (FAQ-style)
   Modifier: .tag-pill--gold for squared gold variant (Registration design intent)
   ============================================================ */
.tag-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0.75rem 0 1rem;
}

.tag-pill {
    display: inline-block;
    padding: 4px 14px;
    border: 1px solid var(--mid-gray);
    border-radius: 50px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.05em;
    color: var(--off-white);
    text-transform: uppercase;
}

.tag-pill--gold {
    border: 1px solid var(--dark-gold);
    border-radius: 0;
    color: var(--dark-gold);
    background: transparent;
}
