/*
 * ============================================================
 * IVORY — Ghost Theme for Professional Music Services
 * screen.css
 * ============================================================
 * Table of contents:
 *
 *  1.  CSS Custom Properties (Design Tokens)
 *  2.  Reset & Base
 *  3.  Typography
 *  4.  Site Layout
 *  5.  Piano Sidebar
 *  6.  Piano Brand / Header
 *  7.  White Keys
 *  8.  Black Keys & Positioning
 *  9.  Key Interaction States (hover, active, pressed)
 * 10.  Sound Toggle
 * 11.  Content Stage
 * 12.  Cinematic Atmosphere
 * 13.  Content Panels — Base
 * 14.  Panel: Home / Hero
 * 15.  Panel: Services Grid
 * 16.  Panel: Repertoire
 * 17.  Panel: About
 * 18.  Panel: Contact
 * 19.  Panel: Posts & Pages
 * 20.  Buttons
 * 21.  Forms
 * 22.  Ghost Content Styles
 * 23.  Mobile — Horizontal Piano
 * 24.  Utility / Accessibility
 * ============================================================
 */


/* ============================================================
   1. CSS CUSTOM PROPERTIES
   ============================================================ */
:root {
    /* Background layers */
    --bg-void:          #06060a;
    --bg-base:          #09090e;
    --bg-panel:         #0d0d14;
    --bg-elevated:      #13131c;
    --bg-surface:       #1a1a26;
    --bg-hover:         #1f1f2e;

    /* Piano key colors */
    --ivory-top:        #f5eed8;
    --ivory-mid:        #ede4c8;
    --ivory-body:       #e0d5b8;
    --ivory-base:       #cec3a4;
    --ivory-shadow:     #b8ad92;
    --ivory-text:       #2a2418;

    --ebony-top:        #1c1c22;
    --ebony-mid:        #111116;
    --ebony-deep:       #08080c;
    --ebony-highlight:  rgba(255, 255, 255, 0.05);
    --ebony-edge:       rgba(255, 255, 255, 0.03);

    /* Gold accent */
    --gold:             #c8a44a;
    --gold-bright:      #d4b25a;
    --gold-dim:         rgba(200, 164, 74, 0.25);
    --gold-glow:        rgba(200, 164, 74, 0.12);
    --gold-border:      rgba(200, 164, 74, 0.2);

    /* Typography */
    --text-primary:     #e2d9c8;
    --text-secondary:   #9e9284;
    --text-muted:       #5e574e;
    --text-gold:        #c8a44a;

    /* Borders */
    --border-subtle:    rgba(200, 164, 74, 0.08);
    --border-dim:       rgba(200, 164, 74, 0.14);
    --border-accent:    rgba(200, 164, 74, 0.3);

    /* Sizing */
    --sidebar-w:        30%;
    --sidebar-w-max:    340px;
    --brand-h:          88px;
    --sound-h:          52px;
    --key-gap:          3px;
    --key-radius-white: 0 0 7px 7px;
    --key-radius-black: 0 0 5px 5px;

    /* Transitions */
    --t-key:            120ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --t-panel:          380ms cubic-bezier(0.4, 0, 0.2, 1);
    --t-fast:           160ms ease;
    --t-med:            260ms ease;

    /* Font stacks */
    --font-display:     'Garamond', 'Cormorant Garamond', 'EB Garamond', 'Book Antiqua',
                        'Palatino Linotype', Georgia, 'Times New Roman', serif;
    --font-body:        'Optima', 'Candara', 'Gill Sans', 'Gill Sans MT', Calibri,
                        'Century Gothic', Trebuchet MS, sans-serif;
    --font-mono:        'Courier New', Courier, monospace;
    --font-label:       var(--font-body);

    /* Spacing scale */
    --sp-xs:  6px;
    --sp-s:   12px;
    --sp-m:   20px;
    --sp-l:   32px;
    --sp-xl:  52px;
    --sp-2xl: 80px;
}


/* ============================================================
   2. RESET & BASE
   ============================================================ */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-void);
    color: var(--text-primary);
    font-family: var(--font-body);
    line-height: 1.65;
    overflow-x: hidden;
    min-height: 100vh;
}

/* Remove default Ghost body classes styling */
body.home-template,
body.post-template,
body.page-template {
    background: var(--bg-void);
}

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

a {
    color: var(--gold);
    text-decoration: none;
    transition: color var(--t-fast);
}

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

button {
    cursor: pointer;
    border: none;
    background: none;
    font-family: inherit;
    font-size: inherit;
    color: inherit;
}

ul, ol {
    list-style: none;
}

::selection {
    background: var(--gold-dim);
    color: var(--text-primary);
}

:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 3px;
}


/* ============================================================
   3. TYPOGRAPHY
   ============================================================ */

/* Display / Hero */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: normal;
    line-height: 1.2;
    color: var(--text-primary);
    letter-spacing: 0.01em;
}

/* Hierarchy */
h1 { font-size: clamp(2rem, 4vw, 3.2rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); }
h3 { font-size: clamp(1.2rem, 2vw, 1.6rem); }
h4 { font-size: 1.1rem; }

p {
    font-size: 0.97rem;
    line-height: 1.75;
    color: var(--text-secondary);
}

/* Overline label style */
.panel-overline,
.hero__overline {
    font-family: var(--font-label);
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--gold);
    display: block;
    margin-bottom: var(--sp-s);
}

/* Panel intro */
.panel-intro {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--text-secondary);
    max-width: 640px;
    margin-top: var(--sp-s);
}


/* ============================================================
   4. SITE LAYOUT
   ============================================================ */
.site-wrapper {
    display: flex;
    min-height: 100vh;
    position: relative;
}


/* ============================================================
   5. PIANO SIDEBAR
   ============================================================ */
.piano-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-w);
    max-width: var(--sidebar-w-max);
    height: 100vh;
    display: flex;
    flex-direction: column;
    background: linear-gradient(
        180deg,
        #0a0a10 0%,
        #08080e 40%,
        #060609 100%
    );
    border-right: 1px solid var(--border-dim);
    z-index: 200;
    overflow: hidden;

    /* Subtle inner shadow at right edge = depth effect */
    box-shadow:
        4px 0 32px rgba(0, 0, 0, 0.8),
        inset -1px 0 0 rgba(255, 255, 255, 0.02);
}


/* ============================================================
   6. PIANO BRAND / HEADER
   ============================================================ */
.piano-brand {
    flex-shrink: 0;
    height: var(--brand-h);
    display: flex;
    align-items: center;
    padding: 0 var(--sp-l) 0 var(--sp-m);
    border-bottom: 1px solid var(--border-subtle);
    background: linear-gradient(
        180deg,
        rgba(200, 164, 74, 0.04) 0%,
        transparent 100%
    );
}

.brand-link {
    display: flex;
    flex-direction: column;
    gap: 3px;
    color: inherit;
    text-decoration: none;
}

.brand-title {
    font-family: var(--font-display);
    font-size: clamp(0.9rem, 1.2vw, 1.1rem);
    font-weight: normal;
    letter-spacing: 0.12em;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
}

.brand-tagline {
    font-size: 0.62rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
}


/* ============================================================
   7. WHITE KEYS
   ============================================================ */

/* The keyboard container fills available sidebar height */
.piano-keyboard {
    flex: 1;
    overflow: hidden;
    position: relative;
    /* Small top padding creates a "ledge" feel above first key */
    padding-top: 4px;
}

.piano-keys-wrap {
    position: relative;
    height: 100%;
}

/* Flex column — 7 equal white keys fill height.
   position: relative makes this the containing block for .black-keys,
   so black keys scroll with the white keys on the mobile horizontal layout. */
.white-keys {
    display: flex;
    flex-direction: column;
    height: 100%;
    gap: var(--key-gap);
    padding: 0 10px 10px 10px;
    position: relative;
}

/* Individual white key */
.key--white {
    flex: 1;
    position: relative;
    border-radius: var(--key-radius-white);
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: flex-start;
    padding: 0 0 10px 14px;
    text-align: left;
    transition:
        transform var(--t-key),
        box-shadow var(--t-key),
        background var(--t-key);
    transform-origin: top center;

    /* Realistic ivory gradient — warm, slightly yellowed */
    background: linear-gradient(
        180deg,
        #f6efdb 0%,       /* bright ivory crown */
        #ede3c6 18%,      /* warm mid */
        #e3d8ba 55%,      /* body */
        #d0c5a2 85%,      /* lower body shadow */
        #bfb490 100%      /* base edge */
    );

    /* 3D depth: inner bevel + drop shadow */
    box-shadow:
        inset 0px  2px  4px  rgba(255, 255, 255, 0.45),  /* top inner light */
        inset -2px 0px  3px  rgba(0, 0, 0, 0.08),         /* right edge shadow */
        inset  1px 0px  2px  rgba(255, 255, 255, 0.3),    /* left edge highlight */
        inset  0px -3px 6px  rgba(0, 0, 0, 0.15),         /* bottom inner shadow */
        2px    3px 10px rgba(0, 0, 0, 0.55),               /* depth shadow right */
        0px    4px 14px rgba(0, 0, 0, 0.4);                /* bottom depth */

    /* No default browser focus ring — we handle :focus-visible */
    outline: none;

    /* Overflow hidden for the shine element */
    overflow: hidden;
}

/* Shine/gloss overlay — adds a subtle specular highlight */
.key--white .key-shine {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 30%;
    background: linear-gradient(
        180deg,
        rgba(255, 255, 255, 0.18) 0%,
        rgba(255, 255, 255, 0.04) 60%,
        transparent 100%
    );
    border-radius: 0 0 4px 4px;
    pointer-events: none;
}

/* Key label text */
.key--white .key-label {
    font-family: var(--font-label);
    font-size: 0.62rem;
    font-weight: 500;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--ivory-text);
    opacity: 0.7;
    transition: opacity var(--t-fast);
    position: relative;
    z-index: 1;
    line-height: 1;
}


/* ============================================================
   8. BLACK KEYS & POSITIONING
   ============================================================ */

/* Black key layer — lives INSIDE .white-keys so it scrolls with it on mobile.
   top/left/right/bottom: 0 = span the full padding-box of .white-keys.
   .white-keys has padding: 0 10px 10px 10px on desktop, which keeps the
   black-key coordinate space aligned with the white key flex items. */
.black-keys {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 10;
}

/* Black key base */
.key--black {
    position: absolute;
    right: 0;
    width: 56%;
    height: 0;        /* set by JS via calc or nth-child below */
    border-radius: var(--key-radius-black);

    /* Satin ebony gradient */
    background: linear-gradient(
        180deg,
        #2a2a34 0%,       /* subtle highlight at crown */
        #1a1a22 12%,      /* dark mid */
        #101016 50%,      /* deep body */
        #07070d 80%,      /* near-black base */
        #040408 100%      /* toe */
    );

    /* Premium black key shadow — heavy, floating above white keys */
    box-shadow:
        inset  1px 0    3px rgba(255, 255, 255, 0.06), /* left edge shimmer */
        inset -1px 0    2px rgba(0, 0, 0, 0.6),         /* right edge shadow */
        inset  0  -1px  4px rgba(0, 0, 0, 0.5),         /* bottom inner */
        3px    6px 14px rgba(0, 0, 0, 0.75),             /* cast shadow */
        1px    2px  6px rgba(0, 0, 0, 0.6),              /* near shadow */
        0      0    1px rgba(40, 40, 60, 0.5);           /* outline */

    /* Small line at crown of black key = reflection catch */
    border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.key--black__face {
    display: block;
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        rgba(255,255,255,0.04) 0%,
        transparent 40%
    );
    border-radius: inherit;
}

/*
 * Black key heights and positions.
 * The white key area is divided into 7 equal slots.
 * A gap of var(--key-gap) exists between keys.
 * Black keys straddle the border between white keys.
 *
 * Formula:
 *   unit = 100% / 7 = 14.2857%
 *   BK height ≈ 6% of the key area
 *   BK center  = N × unit  (where N = the white key it follows)
 *   BK top     = center − (BK_height / 2)
 *
 * Piano layout:  C  Db  D  Eb  E  F  Gb  G  Ab  A  Bb  B
 * Our mapping:   1   ↑  2   ↑  3  4   ↑  5   ↑  6   ↑  7
 * Black keys after: 1, 2, (skip 3-4), 4, 5, 6
 */

/* Height applied uniformly */
.key--black {
    height: 6%;
}

/* After key 1 (C→Db) — center at 14.2857% */
.key--black[data-position="1"] {
    top: calc(14.2857% - 3%);
}

/* After key 2 (D→Eb) — center at 28.5714% */
.key--black[data-position="2"] {
    top: calc(28.5714% - 3%);
}

/* SKIP: no black key between key 3 (E) and key 4 (F) */

/* After key 4 (F→Gb) — center at 57.1428% */
.key--black[data-position="4"] {
    top: calc(57.1428% - 3%);
}

/* After key 5 (G→Ab) — center at 71.4285% */
.key--black[data-position="5"] {
    top: calc(71.4285% - 3%);
}

/* After key 6 (A→Bb) — center at 85.7142% */
.key--black[data-position="6"] {
    top: calc(85.7142% - 3%);
}


/* ============================================================
   9. KEY INTERACTION STATES
   ============================================================ */

/* ── Hover state (white key) ── */
.key--white:hover {
    background: linear-gradient(
        180deg,
        #f2e9d0 0%,
        #e8ddc2 18%,
        #ded3b4 55%,
        #cbbf9e 85%,
        #b8ad8a 100%
    );
    box-shadow:
        inset  0px  2px  3px  rgba(255, 255, 255, 0.35),
        inset -2px  0px  3px  rgba(0, 0, 0, 0.1),
        inset  1px  0px  2px  rgba(255, 255, 255, 0.25),
        inset  0px -2px  5px  rgba(0, 0, 0, 0.18),
        2px    2px  8px  rgba(0, 0, 0, 0.5),
        0px    3px 10px  rgba(0, 0, 0, 0.38),
        0      0   10px  rgba(200, 164, 74, 0.06); /* gold warmth on hover */
    transform: scaleY(0.994) translateY(1.5px);
}

.key--white:hover .key-label {
    opacity: 1;
    color: #1e180e;
}

/* ── Pressed state (during click — class added/removed by JS) ── */
.key--white.is-pressed {
    transform: scaleY(0.985) translateY(4px) !important;
    background: linear-gradient(
        180deg,
        #e8e0ca 0%,
        #ddd4ba 18%,
        #d0c8aa 55%,
        #bfb395 85%,
        #aca08a 100%
    ) !important;
    box-shadow:
        inset  0px  3px  8px  rgba(0, 0, 0, 0.28),   /* pressed top shadow */
        inset -2px  0px  4px  rgba(0, 0, 0, 0.12),
        inset  1px  0px  3px  rgba(255, 255, 255, 0.15),
        inset  0px -2px  4px  rgba(0, 0, 0, 0.1),
        1px    1px  5px  rgba(0, 0, 0, 0.5),
        0px    1px  6px  rgba(0, 0, 0, 0.35) !important;
    transition: transform 60ms ease, box-shadow 60ms ease !important;
}

/* ── Active / selected state ── */
.key--white.is-active {
    background: linear-gradient(
        180deg,
        #ede5ce 0%,
        #e1d9bc 18%,
        #d5ccb0 55%,
        #c2b89a 85%,
        #b0a688 100%
    );
    transform: scaleY(0.988) translateY(2.5px);
    box-shadow:
        inset  0px  3px  8px  rgba(0, 0, 0, 0.22),
        inset -2px  0px  3px  rgba(0, 0, 0, 0.1),
        inset  1px  0px  2px  rgba(255, 255, 255, 0.2),
        inset  0px -1px  3px  rgba(0, 0, 0, 0.08),
        1px    2px  6px  rgba(0, 0, 0, 0.55),
        /* Gold edge glow — the "active tab" indicator */
        -3px   0    12px rgba(200, 164, 74, 0.35),
        0      0    18px rgba(200, 164, 74, 0.12);
}

/* Gold left-edge accent on active key */
.key--white.is-active::before {
    content: '';
    position: absolute;
    top: 8%;
    left: 0;
    width: 3px;
    height: 84%;
    background: linear-gradient(
        180deg,
        rgba(210, 175, 80, 0)   0%,
        rgba(210, 175, 80, 0.9) 30%,
        rgba(215, 180, 85, 1)   50%,
        rgba(210, 175, 80, 0.9) 70%,
        rgba(210, 175, 80, 0)   100%
    );
    border-radius: 0 2px 2px 0;
    pointer-events: none;
}

.key--white.is-active .key-label {
    opacity: 1;
    color: var(--ivory-text);
    font-weight: 600;
}

/* ── Focus visible on white key ── */
.key--white:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: -3px;
    z-index: 5;
}


/* ============================================================
   10. SOUND TOGGLE
   ============================================================ */
.sound-toggle-wrap {
    flex-shrink: 0;
    height: var(--sound-h);
    display: flex;
    align-items: center;
    padding: 0 var(--sp-m);
    border-top: 1px solid var(--border-subtle);
}

.sound-toggle {
    display: flex;
    align-items: center;
    gap: var(--sp-xs);
    padding: 6px 10px;
    border-radius: 4px;
    color: var(--text-muted);
    font-size: 0.65rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    transition: color var(--t-fast), background var(--t-fast);
    cursor: pointer;
}

.sound-toggle:hover {
    color: var(--gold);
    background: rgba(200, 164, 74, 0.06);
}

.sound-toggle.is-on {
    color: var(--gold);
}

.sound-icon--on {
    display: none;
}

.sound-toggle__label {
    font-family: var(--font-label);
}


/* ============================================================
   11. CONTENT STAGE
   ============================================================ */
.content-stage {
    margin-left: min(var(--sidebar-w), var(--sidebar-w-max));
    flex: 1;
    min-height: 100vh;
    position: relative;
    background: linear-gradient(
        135deg,
        #0b0b12 0%,
        #09090f 50%,
        #07070c 100%
    );
    overflow: hidden;
    display: flex;
    flex-direction: column;
}


/* ============================================================
   12. CINEMATIC ATMOSPHERE
   ============================================================ */
.stage-atmosphere {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

/* Soft spotlight gradients */
.atm-spotlight {
    position: absolute;
    border-radius: 50%;
    opacity: 0;
    animation: spotlightPulse 12s ease-in-out infinite alternate;
}

.atm-spotlight--1 {
    top: -20%;
    right: 10%;
    width: 60vw;
    height: 60vw;
    background: radial-gradient(
        ellipse at center,
        rgba(200, 164, 74, 0.055) 0%,
        rgba(160, 120, 40, 0.025) 40%,
        transparent 70%
    );
    animation-delay: 0s;
    animation-duration: 14s;
}

.atm-spotlight--2 {
    bottom: -10%;
    left: 5%;
    width: 50vw;
    height: 50vw;
    background: radial-gradient(
        ellipse at center,
        rgba(80, 60, 160, 0.04) 0%,
        rgba(40, 30, 80, 0.015) 40%,
        transparent 70%
    );
    animation-delay: 5s;
    animation-duration: 18s;
}

@keyframes spotlightPulse {
    0%   { opacity: 0.6; transform: scale(1); }
    50%  { opacity: 1;   transform: scale(1.08); }
    100% { opacity: 0.7; transform: scale(0.96); }
}

/* Film grain overlay — subtle texture */
.atm-grain {
    position: absolute;
    inset: 0;
    opacity: 0.025;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23noise)' opacity='1'/%3E%3C/svg%3E");
    background-size: 180px 180px;
}

/* Faint music staff lines — decorative */
.atm-staff {
    position: absolute;
    top: 30%;
    left: 0;
    right: 0;
    height: 40%;
    opacity: 0.018;
    background-image: repeating-linear-gradient(
        180deg,
        transparent 0px,
        transparent 11px,
        rgba(200, 164, 74, 0.8) 11px,
        rgba(200, 164, 74, 0.8) 12px
    );
    background-size: 100% 60px;
    pointer-events: none;
    transform: rotate(-1deg);
}


/* ============================================================
   13. CONTENT PANELS — BASE
   ============================================================ */

/* All panels occupy full stage */
.content-panel {
    position: absolute;
    inset: 0;
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 1;

    /* Hidden state */
    opacity: 0;
    pointer-events: none;
    transform: translateY(14px);
    transition:
        opacity var(--t-panel),
        transform var(--t-panel);

    /* Custom scrollbar */
    scrollbar-width: thin;
    scrollbar-color: var(--bg-elevated) transparent;
}

.content-panel::-webkit-scrollbar {
    width: 5px;
}
.content-panel::-webkit-scrollbar-track {
    background: transparent;
}
.content-panel::-webkit-scrollbar-thumb {
    background: var(--bg-elevated);
    border-radius: 3px;
}

/* Visible state — toggled by JS */
.content-panel.is-visible {
    opacity: 1;
    pointer-events: all;
    transform: translateY(0);
    position: relative;
    min-height: 100vh;
}

/* Exiting state — used during transitions */
.content-panel.is-exiting {
    opacity: 0;
    transform: translateY(-8px);
    pointer-events: none;
    transition:
        opacity 200ms ease,
        transform 200ms ease;
}

/* Inner content container */
.panel-inner {
    padding: var(--sp-xl) var(--sp-2xl) var(--sp-2xl) var(--sp-xl);
    max-width: 900px;
    position: relative;
    z-index: 1;
}

/* Panel header spacing */
.panel-header {
    margin-bottom: var(--sp-xl);
}

.panel-title {
    font-size: clamp(2rem, 3.5vw, 2.8rem);
    font-weight: normal;
    color: var(--text-primary);
    letter-spacing: 0.02em;
    margin-top: var(--sp-xs);
}

/* Panel CTA row */
.panel-cta {
    margin-top: var(--sp-xl);
    display: flex;
    gap: var(--sp-m);
    flex-wrap: wrap;
}


/* ============================================================
   14. PANEL: HOME / HERO
   ============================================================ */
.panel-inner--home {
    padding-top: var(--sp-2xl);
    max-width: 100%;
}

.hero {
    display: flex;
    align-items: flex-start;
    gap: var(--sp-xl);
    min-height: 75vh;
    padding: var(--sp-2xl) var(--sp-2xl) var(--sp-xl) var(--sp-xl);
}

.hero__text {
    flex: 1;
    max-width: 580px;
}

.hero__headline {
    font-size: clamp(2.4rem, 4.5vw, 3.8rem);
    font-weight: normal;
    letter-spacing: 0.01em;
    line-height: 1.1;
    color: var(--text-primary);
    margin-bottom: var(--sp-l);

    /* Subtle text shadow = depth on dark bg */
    text-shadow: 0 2px 30px rgba(0, 0, 0, 0.6);
}

.hero__body {
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: var(--sp-xl);
    max-width: 480px;
}

.hero__ctas {
    display: flex;
    gap: var(--sp-m);
    flex-wrap: wrap;
}

/* Staff decoration — right side of hero */
.hero__embellishment {
    flex-shrink: 0;
    width: 140px;
    align-self: center;
    opacity: 0.15;
    padding-top: 40px;
}

.staff-decoration {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-left: 20px;
}

.staff-line {
    height: 1px;
    background: linear-gradient(
        90deg,
        transparent 0%,
        var(--gold) 20%,
        var(--gold) 80%,
        transparent 100%
    );
    width: 100%;
}

/* Ghost posts on home panel */
.home-posts {
    padding: 0 var(--sp-2xl) var(--sp-2xl) var(--sp-xl);
    border-top: 1px solid var(--border-subtle);
}

.home-posts__heading {
    font-family: var(--font-label);
    font-size: 0.68rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: var(--sp-m);
    margin: var(--sp-xl) 0 var(--sp-l);
}

.heading-rule {
    flex: 1;
    height: 1px;
    background: var(--border-subtle);
}

.post-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: var(--sp-l);
}

.post-card {
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: 4px;
    overflow: hidden;
    transition: border-color var(--t-med), transform var(--t-med);
}

.post-card:hover {
    border-color: var(--gold-border);
    transform: translateY(-2px);
}

.post-card__image-wrap {
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
}

.post-card__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--t-med);
}

.post-card:hover .post-card__image {
    transform: scale(1.03);
}

.post-card__body {
    padding: var(--sp-m);
}

.post-card__title {
    font-family: var(--font-display);
    font-size: 1.05rem;
    margin-bottom: var(--sp-s);
    line-height: 1.35;
}

.post-card__title a {
    color: var(--text-primary);
    text-decoration: none;
}

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

.post-card__excerpt {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: var(--sp-s);
    line-height: 1.6;
}

.post-card__link {
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--gold);
}


/* ============================================================
   15. PANEL: SERVICES GRID
   ============================================================ */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: var(--sp-l);
    margin-top: var(--sp-l);
}

.services-grid--four {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}

.service-card {
    background: linear-gradient(
        135deg,
        var(--bg-elevated) 0%,
        var(--bg-panel) 100%
    );
    border: 1px solid var(--border-subtle);
    border-radius: 3px;
    padding: var(--sp-l);
    position: relative;
    transition: border-color var(--t-med), transform var(--t-med), box-shadow var(--t-med);
    overflow: hidden;
}

.service-card:hover {
    border-color: var(--gold-border);
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4), 0 0 20px rgba(200, 164, 74, 0.06);
}

/* Gold accent line at top of card */
.service-card__accent {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(
        90deg,
        transparent 0%,
        var(--gold-dim) 40%,
        var(--gold-dim) 60%,
        transparent 100%
    );
    opacity: 0;
    transition: opacity var(--t-med);
}

.service-card:hover .service-card__accent {
    opacity: 1;
}

.service-card__title {
    font-family: var(--font-display);
    font-size: 1.15rem;
    color: var(--text-primary);
    margin-bottom: var(--sp-s);
    letter-spacing: 0.02em;
}

.service-card__desc {
    font-size: 0.88rem;
    line-height: 1.75;
    color: var(--text-secondary);
}

.service-card--large {
    padding: var(--sp-xl);
}


/* ============================================================
   16. PANEL: REPERTOIRE
   ============================================================ */
.repertoire-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: var(--sp-l);
    margin-top: var(--sp-l);
}

.repertoire-category {
    padding: var(--sp-l);
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: 3px;
}

.repertoire-category__title {
    font-family: var(--font-display);
    font-size: 1.1rem;
    color: var(--text-primary);
    margin-bottom: var(--sp-m);
    padding-bottom: var(--sp-s);
    border-bottom: 1px solid var(--border-subtle);
    letter-spacing: 0.04em;
}

.repertoire-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: var(--sp-s);
}

.repertoire-list li {
    font-size: 0.86rem;
    color: var(--text-secondary);
    padding-left: var(--sp-m);
    position: relative;
    line-height: 1.55;
}

.repertoire-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 9px;
    width: 5px;
    height: 1px;
    background: var(--gold-dim);
}

.repertoire-note {
    margin-top: var(--sp-l);
    font-size: 0.84rem;
    color: var(--text-muted);
    font-style: italic;
    letter-spacing: 0.02em;
}


/* ============================================================
   17. PANEL: ABOUT
   ============================================================ */
.panel-inner--about {
    max-width: 100%;
}

.about-layout {
    display: flex;
    gap: var(--sp-2xl);
    padding: var(--sp-2xl) var(--sp-2xl) var(--sp-2xl) var(--sp-xl);
    min-height: 100vh;
    align-items: flex-start;
}

/* Portrait column */
.about-portrait-col {
    flex-shrink: 0;
    width: 240px;
    display: flex;
    flex-direction: column;
    gap: var(--sp-l);
    position: sticky;
    top: var(--sp-xl);
}

.portrait-frame {
    width: 220px;
    aspect-ratio: 3 / 4;
    border-radius: 2px;
    overflow: hidden;
    border: 1px solid var(--border-dim);
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.6),
        0  0   0 1px rgba(200, 164, 74, 0.08);
}

.portrait-placeholder {
    width: 100%;
    height: 100%;
    background: var(--bg-elevated);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-family: var(--font-label);
    font-size: 0.7rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

.portrait-placeholder img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Credentials list below portrait */
.credentials {
    display: flex;
    flex-direction: column;
    gap: var(--sp-s);
}

.credential {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding-bottom: var(--sp-s);
    border-bottom: 1px solid var(--border-subtle);
}

.credential__label {
    font-family: var(--font-label);
    font-size: 0.62rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.credential__value {
    font-family: var(--font-display);
    font-size: 0.96rem;
    color: var(--text-primary);
    letter-spacing: 0.03em;
}

/* Bio column */
.about-bio-col {
    flex: 1;
    max-width: 560px;
}

.bio-text {
    display: flex;
    flex-direction: column;
    gap: var(--sp-m);
    margin-bottom: var(--sp-xl);
}

.bio-text p {
    font-size: 0.97rem;
    line-height: 1.85;
    color: var(--text-secondary);
}

/* Timeline */
.timeline {
    margin-top: var(--sp-xl);
}

.timeline__heading {
    font-family: var(--font-label);
    font-size: 0.68rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: var(--sp-l);
}

.timeline__items {
    display: flex;
    flex-direction: column;
    gap: 0;
    border-left: 1px solid var(--border-subtle);
    padding-left: var(--sp-l);
}

.timeline__item {
    display: grid;
    grid-template-columns: 52px auto 1fr;
    gap: var(--sp-m);
    align-items: baseline;
    padding: var(--sp-m) 0;
    border-bottom: 1px solid var(--border-subtle);
}

.timeline__item:last-child {
    border-bottom: none;
}

.timeline__year {
    font-family: var(--font-display);
    font-size: 0.9rem;
    color: var(--gold);
    letter-spacing: 0.04em;
}

.timeline__dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--gold-dim);
    border: 1px solid var(--gold-border);
    flex-shrink: 0;
    position: relative;
    top: 1px;

    /* Pull dot to align with timeline bar */
    margin-left: calc(-1 * var(--sp-l) - 3px);
    margin-right: calc(var(--sp-m) - var(--sp-l) + 3px);
}

.timeline__event {
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.6;
}


/* ============================================================
   18. PANEL: CONTACT
   ============================================================ */
.contact-layout {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: var(--sp-2xl);
    align-items: start;
    margin-top: var(--sp-l);
}

@media (max-width: 1100px) {
    .contact-layout {
        grid-template-columns: 1fr;
        max-width: 520px;
    }
}

/* Direct contact section */
.contact-direct {
    width: 280px;
    flex-shrink: 0;
}

@media (max-width: 1100px) {
    .contact-direct {
        width: 100%;
    }
}

.contact-direct__heading {
    font-family: var(--font-label);
    font-size: 0.68rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: var(--sp-l);
}

.contact-methods {
    display: flex;
    flex-direction: column;
    gap: var(--sp-s);
    margin-bottom: var(--sp-xl);
}

.contact-method {
    display: flex;
    align-items: center;
    gap: var(--sp-m);
    padding: var(--sp-m) var(--sp-m);
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: 3px;
    text-decoration: none;
    transition: border-color var(--t-fast), background var(--t-fast);
    cursor: pointer;
}

.contact-method:hover {
    border-color: var(--gold-border);
    background: var(--bg-hover);
}

.contact-method__icon {
    color: var(--gold);
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

.contact-method__label {
    font-family: var(--font-label);
    font-size: 0.65rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--text-muted);
    min-width: 42px;
}

.contact-method__value {
    font-size: 0.88rem;
    color: var(--text-secondary);
    flex: 1;
}

.contact-method:hover .contact-method__value {
    color: var(--text-primary);
}

/* Availability notice */
.availability-block {
    padding: var(--sp-l);
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: 3px;
    border-left: 2px solid var(--gold-border);
}

.availability-block__heading {
    font-family: var(--font-label);
    font-size: 0.65rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: var(--sp-s);
}

.availability-block__text {
    font-size: 0.86rem;
    line-height: 1.7;
    color: var(--text-secondary);
    margin-bottom: var(--sp-s);
}

.availability-block__note {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-style: italic;
}


/* ============================================================
   19. PANEL: POSTS & PAGES
   ============================================================ */
.panel-inner--post {
    max-width: 720px;
    padding-top: var(--sp-2xl);
}

.post-header {
    margin-bottom: var(--sp-xl);
}

.post-tag {
    font-family: var(--font-label);
    font-size: 0.65rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: var(--sp-s);
}

.post-title {
    font-size: clamp(1.8rem, 3vw, 2.6rem);
    font-weight: normal;
    letter-spacing: 0.015em;
    line-height: 1.2;
    color: var(--text-primary);
}

.post-meta {
    display: flex;
    align-items: center;
    gap: var(--sp-m);
    margin-top: var(--sp-m);
    padding-top: var(--sp-m);
    border-top: 1px solid var(--border-subtle);
}

.post-date,
.post-read-time {
    font-size: 0.78rem;
    color: var(--text-muted);
    letter-spacing: 0.06em;
}

.post-feature-image {
    margin-bottom: var(--sp-xl);
    border-radius: 3px;
    overflow: hidden;
    border: 1px solid var(--border-subtle);
}

.post-feature-image img {
    width: 100%;
}

.post-feature-image figcaption {
    padding: var(--sp-s) var(--sp-m);
    font-size: 0.78rem;
    color: var(--text-muted);
    font-style: italic;
    border-top: 1px solid var(--border-subtle);
}

.post-footer {
    margin-top: var(--sp-2xl);
    padding-top: var(--sp-l);
    border-top: 1px solid var(--border-subtle);
}

.post-footer__inner {
    display: flex;
    gap: var(--sp-m);
}


/* ============================================================
   20. BUTTONS
   ============================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--sp-s);
    padding: 13px 28px;
    font-family: var(--font-label);
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    border-radius: 2px;
    cursor: pointer;
    transition:
        background var(--t-fast),
        border-color var(--t-fast),
        color var(--t-fast),
        transform var(--t-fast),
        box-shadow var(--t-fast);
    text-decoration: none;
    white-space: nowrap;
    user-select: none;
    -webkit-user-select: none;
}

.btn:active {
    transform: translateY(1px);
}

/* Primary — gold fill */
.btn--primary {
    background: linear-gradient(
        135deg,
        rgba(200, 164, 74, 0.92) 0%,
        rgba(185, 148, 58, 0.92) 100%
    );
    color: #0e0c08;
    border: 1px solid rgba(220, 184, 94, 0.6);
    box-shadow:
        0 2px 14px rgba(200, 164, 74, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.btn--primary:hover {
    background: linear-gradient(
        135deg,
        rgba(215, 178, 88, 1) 0%,
        rgba(200, 163, 70, 1) 100%
    );
    box-shadow:
        0 4px 22px rgba(200, 164, 74, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    color: #0a0805;
    transform: translateY(-1px);
}

/* Ghost — outlined */
.btn--ghost {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border-dim);
}

.btn--ghost:hover {
    border-color: var(--gold-border);
    color: var(--gold);
    background: var(--gold-glow);
    transform: translateY(-1px);
}

/* Full width variant */
.btn--full {
    width: 100%;
}


/* ============================================================
   21. FORMS
   ============================================================ */
.booking-form {
    display: flex;
    flex-direction: column;
    gap: var(--sp-m);
    max-width: 460px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.form-label {
    font-family: var(--font-label);
    font-size: 0.65rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.form-input,
.form-select,
.form-textarea {
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: 2px;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.92rem;
    padding: 12px 14px;
    transition: border-color var(--t-fast), box-shadow var(--t-fast);
    appearance: none;
    -webkit-appearance: none;
    width: 100%;
    outline: none;
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: var(--text-muted);
    opacity: 0.7;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    border-color: var(--gold-border);
    box-shadow: 0 0 0 3px rgba(200, 164, 74, 0.08);
}

.form-select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%235e574e' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
    cursor: pointer;
}

.form-select option {
    background: var(--bg-elevated);
    color: var(--text-primary);
}

.form-textarea {
    resize: vertical;
    min-height: 120px;
    line-height: 1.65;
}

/* Form status message */
.form-status {
    font-size: 0.85rem;
    min-height: 20px;
    padding: var(--sp-xs) 0;
}

.form-status.is-success {
    color: #7db87d;
}

.form-status.is-error {
    color: #c07070;
}


/* ============================================================
   22. GHOST CONTENT STYLES (.gh-content)
   ============================================================ */

/* Reset Ghost's default styling and apply Ivory's palette */
.gh-content {
    font-family: var(--font-body);
    font-size: 0.97rem;
    line-height: 1.82;
    color: var(--text-secondary);
    max-width: 660px;
}

.gh-content h1,
.gh-content h2,
.gh-content h3,
.gh-content h4 {
    color: var(--text-primary);
    margin-top: var(--sp-xl);
    margin-bottom: var(--sp-m);
}

.gh-content p {
    margin-bottom: var(--sp-m);
}

.gh-content a {
    color: var(--gold);
    border-bottom: 1px solid var(--gold-dim);
    text-decoration: none;
}

.gh-content a:hover {
    color: var(--gold-bright);
    border-bottom-color: var(--gold);
}

.gh-content strong {
    color: var(--text-primary);
    font-weight: 600;
}

.gh-content em {
    color: var(--text-secondary);
    font-style: italic;
}

.gh-content ul,
.gh-content ol {
    padding-left: var(--sp-l);
    margin-bottom: var(--sp-m);
}

.gh-content ul {
    list-style: disc;
}

.gh-content ol {
    list-style: decimal;
}

.gh-content li {
    margin-bottom: var(--sp-xs);
    line-height: 1.7;
}

.gh-content blockquote {
    border-left: 2px solid var(--gold-border);
    padding: var(--sp-m) var(--sp-l);
    margin: var(--sp-l) 0;
    background: var(--bg-elevated);
    font-style: italic;
    color: var(--text-secondary);
}

.gh-content pre {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: 3px;
    padding: var(--sp-l);
    overflow-x: auto;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    margin: var(--sp-m) 0;
}

.gh-content code {
    font-family: var(--font-mono);
    font-size: 0.85em;
    background: var(--bg-surface);
    padding: 2px 6px;
    border-radius: 2px;
    color: var(--gold);
}

.gh-content hr {
    border: none;
    border-top: 1px solid var(--border-subtle);
    margin: var(--sp-xl) 0;
}

.gh-content img,
.gh-content figure {
    margin: var(--sp-l) 0;
    border-radius: 3px;
    overflow: hidden;
}

.gh-content figcaption {
    font-size: 0.78rem;
    color: var(--text-muted);
    text-align: center;
    margin-top: var(--sp-xs);
    font-style: italic;
}

.gh-content table {
    width: 100%;
    border-collapse: collapse;
    margin: var(--sp-l) 0;
    font-size: 0.9rem;
}

.gh-content th,
.gh-content td {
    padding: var(--sp-s) var(--sp-m);
    border: 1px solid var(--border-subtle);
    text-align: left;
}

.gh-content th {
    background: var(--bg-elevated);
    color: var(--text-primary);
    font-family: var(--font-label);
    font-size: 0.72rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}


/* ============================================================
   23. MOBILE — HORIZONTAL PIANO
   ============================================================ */

/*
 * At narrow viewports the vertical piano sidebar becomes
 * a horizontal scrollable keyboard across the top of the screen.
 * White keys run left-to-right; black keys sit above them.
 */
@media (max-width: 900px) {

    :root {
        --brand-h: auto;
        --sound-h: auto;
    }

    /* Full-width stacked layout */
    .site-wrapper {
        flex-direction: column;
    }

    /* Sidebar becomes a top bar */
    .piano-sidebar {
        position: relative;
        width: 100%;
        max-width: 100%;
        height: auto;
        flex-direction: column;
        border-right: none;
        border-bottom: 1px solid var(--border-dim);
        box-shadow: 0 4px 24px rgba(0, 0, 0, 0.6);
        z-index: 200;
    }

    /* Brand — horizontal row */
    .piano-brand {
        height: auto;
        padding: var(--sp-m) var(--sp-l);
        border-bottom: 1px solid var(--border-subtle);
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }

    .brand-title {
        font-size: 1rem;
        max-width: none;
    }

    .brand-tagline {
        display: none; /* hidden on mobile — saves space */
    }

    /* Keyboard area — fixed height horizontal keyboard */
    .piano-keyboard {
        height: 120px;
        overflow: hidden;
    }

    .piano-keys-wrap {
        height: 100%;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .piano-keys-wrap::-webkit-scrollbar {
        display: none;
    }

    /* White keys run horizontally */
    .white-keys {
        flex-direction: row;
        height: 100%;
        padding: 10px 10px 8px 10px;
        gap: var(--key-gap);
        width: max-content;
        min-width: 100%;
    }

    /* White keys in horizontal mode */
    .key--white {
        flex: 0 0 auto;
        width: 80px;
        height: 100%;
        border-radius: 0 0 8px 8px;
        justify-content: flex-end;
        align-items: center;
        padding: 0 0 12px 0;
        transform-origin: top center;
    }

    .key--white:hover {
        transform: scaleY(0.97) translateY(0);
    }

    .key--white.is-active {
        transform: scaleY(0.96) translateY(0);
    }

    /* Gold indicator changes to top edge on horizontal */
    .key--white.is-active::before {
        top: 0;
        left: 8%;
        width: 84%;
        height: 3px;
        background: linear-gradient(
            90deg,
            rgba(210, 175, 80, 0)   0%,
            rgba(210, 175, 80, 0.9) 30%,
            rgba(215, 180, 85, 1)   50%,
            rgba(210, 175, 80, 0.9) 70%,
            rgba(210, 175, 80, 0)   100%
        );
        border-radius: 0 0 2px 2px;
    }

    .key--white .key-label {
        font-size: 0.56rem;
        letter-spacing: 0.12em;
        text-align: center;
        white-space: nowrap;
    }

    /* Black keys — now inside .white-keys, so they scroll with it.
       top aligns with start of white key content (padding-top: 10px).
       left: 0 and right: 0 inherit the full scrollable width automatically. */
    .black-keys {
        top: 10px;    /* = .white-keys padding-top at this breakpoint */
        left: 0;
        right: 0;
        bottom: auto;
        height: 55%;
    }

    /* Horizontal black key mode.
       Each slot = key_width + gap = 80 + 3 = 83px.
       Black key width = 50px (half = 25px).
       Formula: left = padding_left + (N-1)*slot + key_width + 1.5 - half_bk
              = 10 + (N-1)*83 + 80 + 1.5 - 25
              = 10 + (N-1)*83 + 56.5 */
    .key--black {
        position: absolute;
        top: 0;
        width: 50px;
        height: 100%;
        right: auto;
    }

    .key--black[data-position="1"] { left: 66px;  }   /* 10 + 0*83 + 56 */
    .key--black[data-position="2"] { left: 149px; }   /* 10 + 1*83 + 56 */
    .key--black[data-position="4"] { left: 315px; }   /* 10 + 3*83 + 56 */
    .key--black[data-position="5"] { left: 398px; }   /* 10 + 4*83 + 56 */
    .key--black[data-position="6"] { left: 481px; }   /* 10 + 5*83 + 56 */

    /* Sound toggle */
    .sound-toggle-wrap {
        height: auto;
        padding: var(--sp-xs) var(--sp-l);
        border-top: 1px solid var(--border-subtle);
        border-bottom: none;
        justify-content: flex-end;
    }

    /* Content stage — full width below piano */
    .content-stage {
        margin-left: 0;
        min-height: calc(100vh - 200px);
    }

    /* Panel inner — tighter mobile padding */
    .panel-inner {
        padding: var(--sp-l) var(--sp-l) var(--sp-xl) var(--sp-l);
    }

    .panel-inner--home,
    .about-layout {
        padding: var(--sp-l);
    }

    /* Hero — stack on mobile */
    .hero {
        flex-direction: column;
        min-height: auto;
        padding: var(--sp-xl) var(--sp-l) var(--sp-l) var(--sp-l);
    }

    .hero__embellishment {
        display: none;
    }

    .hero__headline {
        font-size: clamp(1.8rem, 6vw, 2.6rem);
    }

    .hero__ctas {
        flex-direction: column;
        align-items: flex-start;
    }

    /* About — stack on mobile */
    .about-layout {
        flex-direction: column;
        gap: var(--sp-xl);
    }

    .about-portrait-col {
        width: 100%;
        flex-direction: row;
        align-items: flex-start;
        gap: var(--sp-l);
        position: static;
    }

    .portrait-frame {
        width: 130px;
    }

    .credentials {
        flex: 1;
    }

    /* Services grid — single column on small screens */
    .services-grid,
    .repertoire-grid {
        grid-template-columns: 1fr;
    }

    /* Contact — stack */
    .contact-layout {
        grid-template-columns: 1fr;
    }

    .contact-direct {
        width: 100%;
    }

    /* Timeline simplify */
    .timeline__item {
        grid-template-columns: 44px 1fr;
    }

    .timeline__dot {
        display: none;
    }

    /* Post grid */
    .post-grid {
        grid-template-columns: 1fr;
    }

    .home-posts {
        padding: 0 var(--sp-l) var(--sp-xl) var(--sp-l);
    }
}

/* Narrow mobile adjustment */
@media (max-width: 480px) {
    .hero__headline {
        font-size: 1.75rem;
    }

    .panel-title {
        font-size: 1.8rem;
    }

    .btn {
        padding: 11px 20px;
        font-size: 0.68rem;
    }

    .panel-inner {
        padding: var(--sp-m) var(--sp-m) var(--sp-xl) var(--sp-m);
    }

    .key--white {
        width: 68px;
    }

    /* Black key positions for 68px white keys, 71px slot, 44px BK, 10px left padding
       Formula: padding_left + (N-1)×slot + key_width + 1.5 − half_bk_width
       = 10 + (N-1)×71 + 68 + 1.5 − 22 = (N-1)×71 + 57 */
    .key--black[data-position="1"] { left: 57px;  }
    .key--black[data-position="2"] { left: 128px; }
    .key--black[data-position="4"] { left: 270px; }
    .key--black[data-position="5"] { left: 341px; }
    .key--black[data-position="6"] { left: 412px; }

    .key--black {
        width: 44px;
    }
}


/* ============================================================
   24. UTILITY / ACCESSIBILITY
   ============================================================ */

/* ============================================================
   KOENIG EDITOR CARD WIDTHS
   Required by Ghost's GScan theme validator.
   These classes are applied to wide/full-bleed cards inserted
   via the Ghost post editor (images, galleries, embeds, etc.)
   ============================================================ */

/*
 * Wide cards break out of the column slightly.
 * Centred with a max-width cap so they don't bleed to the edge
 * on very large screens.
 */
.kg-width-wide {
    position: relative;
    width: min(90vw, 1100px);
    max-width: 1100px;
    margin-left: auto;
    margin-right: auto;
}

/*
 * Full-bleed cards stretch edge-to-edge within the content stage.
 * A negative margin trick pulls the card beyond the .panel-inner padding.
 */
.kg-width-full {
    position: relative;
    width: 100%;
    max-width: none;
    margin-left:  calc(-1 * var(--sp-xl));
    margin-right: calc(-1 * var(--sp-xl));
}

/*
 * Koenig card base styles — applied to all card types.
 * Ensures spacing consistency regardless of card type.
 */
.kg-card {
    margin-top: var(--sp-l);
    margin-bottom: var(--sp-l);
}

/* Image card */
.kg-image-card img {
    border-radius: 2px;
    width: 100%;
    height: auto;
    display: block;
}

/* Gallery card */
.kg-gallery-container {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.kg-gallery-row {
    display: flex;
    gap: 4px;
}

.kg-gallery-image {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.kg-gallery-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Bookmark card */
.kg-bookmark-card {
    border: 1px solid var(--border-subtle);
    border-radius: 3px;
    overflow: hidden;
    background: var(--bg-elevated);
}

.kg-bookmark-container {
    display: flex;
    text-decoration: none;
    color: inherit;
}

.kg-bookmark-content {
    padding: var(--sp-m);
    flex: 1;
}

.kg-bookmark-title {
    font-family: var(--font-display);
    font-size: 1rem;
    color: var(--text-primary);
    margin-bottom: var(--sp-xs);
}

.kg-bookmark-description {
    font-size: 0.84rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.kg-bookmark-metadata {
    margin-top: var(--sp-s);
    font-size: 0.75rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: var(--sp-xs);
}

.kg-bookmark-icon {
    width: 16px;
    height: 16px;
}

.kg-bookmark-thumbnail {
    width: 140px;
    flex-shrink: 0;
    overflow: hidden;
}

.kg-bookmark-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Callout card */
.kg-callout-card {
    display: flex;
    align-items: flex-start;
    gap: var(--sp-m);
    padding: var(--sp-l);
    border-radius: 3px;
    background: var(--bg-elevated);
    border-left: 2px solid var(--gold-border);
}

.kg-callout-emoji {
    font-size: 1.4rem;
    flex-shrink: 0;
}

.kg-callout-text {
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--text-secondary);
}

/* Toggle card */
.kg-toggle-card {
    border: 1px solid var(--border-subtle);
    border-radius: 3px;
    padding: var(--sp-m) var(--sp-l);
}

.kg-toggle-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    list-style: none;
}

.kg-toggle-heading-text {
    font-family: var(--font-display);
    font-size: 1rem;
    color: var(--text-primary);
}

.kg-toggle-content {
    margin-top: var(--sp-m);
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* Video card */
.kg-video-card {
    position: relative;
    border-radius: 3px;
    overflow: hidden;
    background: var(--bg-void);
}

.kg-video-card video {
    width: 100%;
    display: block;
}

/* Audio card */
.kg-audio-card {
    display: flex;
    align-items: center;
    gap: var(--sp-m);
    padding: var(--sp-m);
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: 3px;
}

/* File card */
.kg-file-card {
    border: 1px solid var(--border-subtle);
    border-radius: 3px;
    padding: var(--sp-m) var(--sp-l);
    display: flex;
    align-items: center;
    gap: var(--sp-m);
    background: var(--bg-elevated);
    text-decoration: none;
}

.kg-file-card-title {
    font-size: 0.9rem;
    color: var(--text-primary);
    font-family: var(--font-display);
}

.kg-file-card-filename {
    font-size: 0.78rem;
    color: var(--text-muted);
}

/* Product card */
.kg-product-card {
    border: 1px solid var(--border-subtle);
    border-radius: 3px;
    padding: var(--sp-l);
    background: var(--bg-elevated);
}

.kg-product-card-title {
    font-family: var(--font-display);
    font-size: 1.1rem;
    color: var(--text-primary);
    margin-bottom: var(--sp-s);
}

.kg-product-card-description {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* Header card (Ghost native header) */
.kg-header-card {
    padding: var(--sp-2xl) var(--sp-xl);
    text-align: center;
    background: var(--bg-elevated);
    border-radius: 3px;
}

.kg-header-card-header {
    font-family: var(--font-display);
    font-size: clamp(1.8rem, 3vw, 2.6rem);
    color: var(--text-primary);
    margin-bottom: var(--sp-m);
}

.kg-header-card-subheader {
    font-size: 1rem;
    color: var(--text-secondary);
    max-width: 500px;
    margin: 0 auto var(--sp-l);
}

/* NFT / embed card — basic containment */
.kg-nft-card,
.kg-embed-card {
    overflow: hidden;
    border-radius: 3px;
}

.kg-embed-card iframe {
    width: 100%;
    display: block;
}

/* Code card */
.kg-code-card pre {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: 3px;
    padding: var(--sp-l);
    overflow-x: auto;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* Caption text on all card types */
.kg-image-card figcaption,
.kg-gallery-card figcaption,
.kg-video-card figcaption,
.kg-embed-card figcaption {
    text-align: center;
    font-size: 0.78rem;
    color: var(--text-muted);
    font-style: italic;
    margin-top: var(--sp-xs);
}

/* ============================================================
   GHOST NAVIGATION (hidden — piano keyboard is primary nav)
   ============================================================ */

/* Ghost's {{navigation}} helper renders a <ul> inside .ghost-nav.
   Styled here for accessibility and fallback. sr-only hides it visually. */
.ghost-nav ul {
    display: flex;
    flex-direction: column;
    gap: var(--sp-xs);
    list-style: none;
}

.ghost-nav a {
    font-family: var(--font-label);
    font-size: 0.8rem;
    color: var(--text-muted);
    text-decoration: none;
    letter-spacing: 0.1em;
}

/* Ghost pagination (hidden — our SPA doesn't paginate sections) */
.ghost-pagination {
    display: none;
}

/* ============================================================
   UTILITY / ACCESSIBILITY
   ============================================================ */

/* Screen reader only */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* No-JS fallback: show all panels, remove piano layout */
.no-js .content-panel {
    opacity: 1;
    pointer-events: all;
    transform: none;
    position: relative;
    display: block;
    min-height: auto;
    padding-bottom: var(--sp-xl);
    border-bottom: 1px solid var(--border-subtle);
}

.no-js .piano-sidebar {
    display: none;
}

.no-js .content-stage {
    margin-left: 0;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* High contrast */
@media (forced-colors: active) {
    .key--white {
        border: 2px solid ButtonText;
    }
    .key--black {
        background: ButtonText;
    }
    .key--white.is-active {
        border-color: Highlight;
    }
}


/* ============================================================
   PATCH: layout tightening + responsive fixes
   Addresses desktop/mobile spacing and keyboard usability issues.
   ============================================================ */

/* 1. Brand tagline: hide Ghost default if it ever slips through. */
.brand-tagline {
    max-width: 220px;
}

/* 2 + 3. Home hero: remove doubled top padding and give copy the room. */
.panel-inner--home {
    padding-top: clamp(28px, 5vh, 52px);
}

.hero {
    min-height: auto;
    padding: clamp(28px, 5vh, 52px) var(--sp-2xl) var(--sp-xl) var(--sp-xl);
    gap: clamp(28px, 4vw, 52px);
}

.hero__text {
    flex: 1 1 620px;
    max-width: 680px;
    min-width: min(100%, 420px);
}

.hero__body {
    max-width: 600px;
}

.hero__embellishment {
    width: clamp(70px, 12vw, 120px);
    opacity: 0.11;
}

/* 5. About: remove compounded padding from nested layout. */
.panel-inner--about {
    padding: 0;
    max-width: 100%;
}

.about-layout {
    padding: var(--sp-xl) var(--sp-2xl) var(--sp-2xl) var(--sp-xl);
    min-height: auto;
}

.about-bio-col {
    max-width: 660px;
}

/* 4 + 6. Contact: keep two columns longer and stop narrow caps wasting space. */
.contact-layout {
    grid-template-columns: minmax(0, 1fr) minmax(240px, 280px);
    gap: clamp(28px, 5vw, var(--sp-2xl));
    max-width: 100%;
}

.contact-direct {
    width: auto;
    min-width: 240px;
}

@media (max-width: 760px) {
    .contact-layout {
        grid-template-columns: 1fr;
        max-width: none;
    }

    .contact-direct {
        width: 100%;
        min-width: 0;
    }
}

/* 7. Service cards: use two comfortable columns on desktop/tablet content width. */
.services-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(22px, 3vw, var(--sp-l));
}

@media (max-width: 700px) {
    .services-grid,
    .services-grid--four,
    .repertoire-grid {
        grid-template-columns: 1fr;
    }
}

/* 8-12. Mobile: make piano tappable, align black keys, remove sound row, tighten content. */
@media (max-width: 900px) {
    .piano-sidebar {
        position: sticky;
        top: 0;
    }

    .piano-brand {
        padding: 14px var(--sp-l);
    }

    .piano-keyboard {
        flex: none;
        height: 112px;
        min-height: 112px;
        max-height: 112px;
        padding-top: 0;
        overflow: hidden;
    }

    .piano-keys-wrap {
        height: 112px;
        min-height: 112px;
    }

    .white-keys {
        height: 112px;
        min-height: 112px;
        padding: 12px 10px 10px;
        align-items: stretch;
    }

    .key--white {
        width: 86px;
        height: 90px;
        min-height: 90px;
        padding-bottom: 14px;
        border-radius: 0 0 10px 10px;
    }

    .key--white .key-label {
        font-size: 0.58rem;
        letter-spacing: 0.1em;
        line-height: 1.1;
        max-width: 76px;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .black-keys {
        top: 12px;
        left: 0;
        right: 0;
        bottom: auto;
        height: 56px;
        min-height: 56px;
        z-index: 12;
    }

    .key--black {
        width: 48px;
        height: 56px;
        min-height: 56px;
        border-radius: 0 0 7px 7px;
    }

    /* Black key positions for 86px white keys, 89px slot, 48px BK, 10px left padding
       Formula: padding_left + (N-1)×slot + key_width + 1.5 − half_bk_width
       = 10 + (N-1)×89 + 86 + 1.5 − 24 = (N-1)×89 + 73 */
    .key--black[data-position="1"] { left: 73px;  }
    .key--black[data-position="2"] { left: 162px; }
    .key--black[data-position="4"] { left: 340px; }
    .key--black[data-position="5"] { left: 429px; }
    .key--black[data-position="6"] { left: 518px; }

    .sound-toggle-wrap {
        display: none;
    }

    .content-stage {
        min-height: calc(100vh - 160px);
    }

    .panel-inner {
        padding: 24px 24px var(--sp-xl);
        max-width: none;
    }

    .panel-inner--home {
        padding: 24px;
    }

    .hero {
        padding: 0;
        gap: 0;
    }

    .hero__text {
        min-width: 0;
        max-width: 100%;
    }

    .hero__headline {
        margin-bottom: var(--sp-m);
    }

    .hero__body {
        margin-bottom: var(--sp-l);
        max-width: 100%;
    }

    .about-layout {
        padding: 24px;
        gap: var(--sp-l);
    }

    .contact-layout {
        gap: var(--sp-l);
        margin-top: var(--sp-m);
    }
}

@media (max-width: 480px) {
    .piano-brand {
        padding: 12px 18px;
    }

    .piano-keyboard,
    .piano-keys-wrap {
        height: 106px;
        min-height: 106px;
        max-height: 106px;
    }

    .white-keys {
        height: 106px;
        min-height: 106px;
        padding: 10px 9px 9px;
    }

    .key--white {
        width: 76px;
        height: 87px;
        min-height: 87px;
        padding-bottom: 12px;
    }

    .key--white .key-label {
        font-size: 0.52rem;
        max-width: 68px;
    }

    .black-keys {
        top: 10px;
        left: 0;
        right: 0;
        bottom: auto;
        height: 52px;
        min-height: 52px;
    }

    .key--black {
        width: 42px;
        height: 52px;
        min-height: 52px;
    }

    /* Black key positions for 76px white keys, 79px slot, 42px BK, 9px left padding
       Formula: padding_left + (N-1)×slot + key_width + 1.5 − half_bk_width
       = 9 + (N-1)×79 + 76 + 1.5 − 21 = (N-1)×79 + 65 */
    .key--black[data-position="1"] { left: 65px;  }
    .key--black[data-position="2"] { left: 144px; }
    .key--black[data-position="4"] { left: 302px; }
    .key--black[data-position="5"] { left: 381px; }
    .key--black[data-position="6"] { left: 460px; }

    .panel-inner,
    .panel-inner--home,
    .about-layout {
        padding: 20px 18px var(--sp-xl);
    }

    .service-card,
    .contact-form-card,
    .contact-method {
        padding: 20px;
    }
}
