/* I Love a Piano — Landing Page Styles */

:root {
    --bg: #0b0b0f;
    --surface: #16161d;
    --surface-2: #1f1f28;
    --text: #f5f5f7;
    --muted: #a0a0ab;
    --accent: #8b5cf6; /* purple */
    --chip: #2a2a36;
    --cta: #2d2d3a;
    --danger: #ef2b2b; /* red frame */
    /* Typography scale */
    --fs-body: 16px;
    --fs-lead: 20px;
    --fs-h1: 48px;
    --fs-h2: 32px;
    --fs-button: 16px;
    --fs-chip: 16px;
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
    font-size: var(--fs-body);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

/* Password Protection */
.password-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.password-container {
    text-align: center;
    max-width: 300px;
    width: 90%;
}

.password-container h2 {
    margin: 0 0 16px 0;
    font-size: var(--fs-body);
    font-weight: normal;
}

.password-container input {
    width: 100%;
    padding: 12px;
    font-size: var(--fs-body);
    background: var(--bg);
    color: var(--text);
    border: 1px solid #3a3a48;
    border-radius: 8px;
    margin-bottom: 12px;
    font-family: inherit;
}

.password-container input:focus {
    outline: none;
    border-color: #555;
}

.password-container button {
    width: 100%;
    padding: 12px;
    font-size: var(--fs-body);
    background: var(--bg);
    color: var(--text);
    border: 1px solid #3a3a48;
    border-radius: 8px;
    cursor: pointer;
    font-family: inherit;
}

.password-container button:hover {
    border-color: #555;
}

.password-error {
    color: #ef2b2b;
    margin: 12px 0 0 0;
    font-size: 14px;
}

.site-content-hidden {
    display: none;
}

.container {
    max-width: 800px;
    padding: 24px 32px;
    margin: 0 auto;
}

@media (max-width: 768px) {
    .container {
        padding: 24px 24px;
    }
}

/* Top Navigation */
.top-nav {
    background: var(--bg);
    padding: 16px 0;
}

.nav-container {
    display: flex;
    align-items: center;
    gap: 0;
    padding: 0 20px;
    background: var(--surface);
    border-radius: 100px;
    width: fit-content;
    margin: 0 auto;
}

.nav-heart {
    font-size: 20px;
    color: var(--text);
    text-decoration: none;
    padding: 10px 16px;
    transition: color 0.2s ease;
}

.nav-heart:hover {
    color: #ef2b2b;
}

.nav-link {
    color: var(--text);
    text-decoration: none;
    font-size: var(--fs-body);
    padding: 10px 16px;
}

/* Hero */
.hero { 
    padding-top: 24px;
    padding-bottom: 24px;
}

@media (max-width: 768px) {
    .hero {
        padding-bottom: 16px;
    }
}

/* Intro */
.intro {
    padding: 48px 0;
}

.intro-text {
    font-size: var(--fs-lead);
    line-height: 1.7;
    margin: 0;
    text-align: left;
}

@media (max-width: 768px) {
    .intro {
        padding: 40px 0;
    }
}

.hero-header {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.app-icon {
    height: 173px;
}

.title-area h1 {
    margin: 0 0 2px 0;
    font-size: 36.48px; /* 76% of 48px */
}

.title-area h1 br {
    display: none;
}

@media (max-width: 400px) {
    .title-area h1 br {
        display: block;
    }
}

.tagline {
    margin: 0;
    color: var(--muted);
    line-height: 1.25;
    font-size: var(--fs-lead);
}

.tagline br {
    display: none;
}

@media (max-width: 400px) {
    .tagline br {
        display: block;
    }
}

.keyboard-graphic {
    padding-top: 10px;
    overflow-x: visible;
    position: relative;
    text-align: center;
}

.keyboard-frame {
    background: var(--danger);
    border-radius: 16px;
    padding: 16px 14px;
    margin: 0 auto;
}

/* Web keybed approximation of app keyboard */
.keybed {
    height: 130px;
    border-radius: 12px;
    /* Approximate app layout ratios using CSS variables */
    --wk: 46px;             /* white key width */
    --gap: 4px;             /* spacing between white keys */
    --bkw: calc(var(--wk) * 0.65); /* black key width ≈ 65% of white */
    --oct: calc(var(--wk) * 7 + var(--gap) * 6); /* octave width */
    /* Midpoints between the white keys for black keys */
    --p1: calc(var(--wk) + 0.5 * var(--gap));
    --p2: calc(var(--wk) * 2 + 1.5 * var(--gap));
    --p3: calc(var(--wk) * 4 + 3.5 * var(--gap));
    --p4: calc(var(--wk) * 5 + 4.5 * var(--gap));
    --p5: calc(var(--wk) * 6 + 5.5 * var(--gap));

    background-image:
        /* Black keys (five per octave), 60% height */
        linear-gradient(to right, transparent 0, black 0, black var(--bkw), transparent var(--bkw)),
        linear-gradient(to right, transparent 0, black 0, black var(--bkw), transparent var(--bkw)),
        linear-gradient(to right, transparent 0, black 0, black var(--bkw), transparent var(--bkw)),
        linear-gradient(to right, transparent 0, black 0, black var(--bkw), transparent var(--bkw)),
        linear-gradient(to right, transparent 0, black 0, black var(--bkw), transparent var(--bkw)),
        /* White key lanes with subtle separators */
        repeating-linear-gradient(to right,
            #ffffff 0 var(--wk), #e9e9ee var(--wk) calc(var(--wk) + var(--gap))
        );
    background-size:
        var(--oct) 60%,
        var(--oct) 60%,
        var(--oct) 60%,
        var(--oct) 60%,
        var(--oct) 60%,
        var(--oct) 100%;
    background-position:
        calc(var(--p1) - 0.5 * var(--bkw)) 0,
        calc(var(--p2) - 0.5 * var(--bkw)) 0,
        calc(var(--p3) - 0.5 * var(--bkw)) 0,
        calc(var(--p4) - 0.5 * var(--bkw)) 0,
        calc(var(--p5) - 0.5 * var(--bkw)) 0,
        0 0;
    background-repeat: repeat-x;
    box-shadow: inset 0 -2px 0 rgba(0,0,0,0.35);
}

.cta { padding-top: 12px; text-align: left; }

/* Features Section */
.features {
    padding: 12px 0 32px 0;
}

.multipiano-image {
    text-align: center;
    margin: 0 0 32px 0;
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    overflow: hidden;
}

.multipiano-image img {
    max-height: 120px;
    width: auto;
}

.features-title {
    margin: 0 0 20px 0;
    font-size: 32px;
    text-align: center;
}

.orientation-section {
    background: var(--surface);
    border-radius: 24px;
    padding: 40px;
    margin: 24px 0;
}

@media (max-width: 768px) {
    .orientation-section {
        padding: 32px 24px;
    }
}

.orientation-title {
    margin: 0 0 12px 0;
    font-size: 32px;
    text-align: left;
}

.feature-description {
    margin: 0 0 20px 0;
    color: var(--muted);
    font-size: var(--fs-lead);
    line-height: 1.6;
}

.inspiration-link {
    margin: 0 0 20px 0;
    font-size: var(--fs-body);
}

.inspiration-link a {
    color: #3b82f6;
    text-decoration: none;
}

.inspiration-link a:hover {
    text-decoration: underline;
}

.scrolling-section {
    background: var(--surface);
    border-radius: 24px;
    padding: 40px;
    margin: 24px 0;
}

@media (max-width: 768px) {
    .scrolling-section {
        padding: 32px 24px;
    }
}

.scrolling-title {
    margin: 0 0 12px 0;
    font-size: 32px;
    text-align: left;
}

.bird-section {
    background: var(--surface);
    border-radius: 24px;
    padding: 40px;
    margin: 24px 0;
}

@media (max-width: 768px) {
    .bird-section {
        padding: 32px 24px;
    }
}

.bird-title {
    margin: 0 0 12px 0;
    font-size: 32px;
    text-align: left;
}

.orientation-images {
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: center;
    justify-content: center;
    margin: 24px 0;
}

.orientation-container {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 320px;
    height: 320px;
    margin: 0 auto;
}

.orientation-images img {
    border-radius: 24px;
    display: block;
    max-width: 320px;
    max-height: 320px;
    width: auto;
    height: auto;
    border: 6px solid #3a3a48;
}

.rotate-button {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: var(--surface);
    color: var(--text);
    border: 1px solid #3a3a48;
    border-radius: 12px;
    font-size: var(--fs-button);
    font-family: inherit;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.1s ease;
}

.rotate-button:hover {
    background: #343446;
}

.rotate-button:active {
    transform: scale(0.98);
}

.rotate-button svg {
    width: 20px;
    height: 20px;
}

.scrolling-gif {
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 512px;
    max-height: 512px;
    width: 100%;
    aspect-ratio: 1;
    margin: 0 auto;
}

.scrolling-gif img {
    border-radius: 36px;
    max-width: 512px;
    width: 100%;
    border: 6px solid #3a3a48;
}

.bird-gif {
    text-align: center;
}

.bird-gif img {
    max-height: 512px;
    max-width: 100%;
    height: auto;
    border-radius: 36px;
    border: 6px solid #3a3a48;
}

.features-container {
    background: var(--surface);
    border-radius: 24px;
    padding: 40px;
    margin: 24px 0;
}

@media (max-width: 768px) {
    .features-container {
        padding: 32px 24px;
    }
}

.features-container-title {
    margin: 0 0 20px 0;
    font-size: 32px;
    text-align: left;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin: 0;
}

.feature-category {
    padding: 0;
}

.category-title {
    margin: 0 0 16px 0;
    font-size: 20px;
    font-weight: 600;
    color: var(--text);
    text-align: left;
}

.category-list {
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: var(--fs-body);
    line-height: 1.8;
}

.category-list li {
    padding-left: 20px;
    position: relative;
}

.category-list li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--text);
    font-weight: bold;
}

.category-list ul {
    list-style: none;
    padding: 0;
    margin: 8px 0 0 0;
}

.category-list ul li {
    padding-left: 20px;
    font-size: 15px;
    line-height: 1.6;
}

.category-list ul li::before {
    content: "◦";
    font-size: 14px;
}

.instrument-name {
    font-weight: 600;
}

/* Instagram Link */
.instagram-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    margin: 48px 0 24px 0;
    text-decoration: none;
    color: var(--text);
}

.instagram-gradient {
    width: 180px;
    height: 180px;
    background: linear-gradient(135deg, var(--accent) 0%, #f97316 100%);
    border-radius: 44px;
    transition: transform 0.2s ease;
}

.instagram-link:hover .instagram-gradient {
    transform: scale(1.05);
}

.instagram-link p {
    font-size: var(--fs-lead);
    margin: 0;
    text-align: center;
}

.instagram-link:hover p {
    color: var(--accent);
}
.button.store {
    display: inline-block;
    color: var(--text);
    background: var(--cta);
    padding: 12px 18px;
    border-radius: 12px;
    text-decoration: none;
    border: 1px solid #3a3a48;
    font-size: var(--fs-button);
}
.button.store:hover { background: #343446; }

/* Chip Groups (if needed later) */
.chip-group {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 8px 0 12px 0;
}

.chip {
    display: inline-block;
    background: var(--chip);
    color: var(--text);
    padding: 10px 14px;
    border-radius: 12px;
    font-size: var(--fs-chip);
}

.aside { color: var(--muted); margin: 8px 0 22px 0; }
.feature-copy { font-size: var(--fs-lead); }

/* Feature media placeholder */
.media-placeholder {
    height: 220px;
    background: var(--surface-2);
    border-radius: 16px;
    border: 1px solid #2f2f3a;
    margin: 8px 0 22px 0;
}

/* Gallery */
.gallery { background: var(--bg); }
.gallery-wrap {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 16px;
    align-items: center;
}

.card {
    grid-column: span 3;
    aspect-ratio: 9 / 16; /* iPhone-style portrait video */
    border-radius: 16px;
    background: var(--surface-2);
    overflow: hidden;
    position: relative;
}

/* Subtle top/bottom gradients to suggest video */
.card::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(to top, rgba(0,0,0,0.35), transparent 40%),
        linear-gradient(to bottom, rgba(0,0,0,0.25), transparent 40%);
    pointer-events: none;
}

/* Centered play icon with soft circular backdrop */
.card::after {
    content: "▶";
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 42px;
    text-shadow: 0 2px 6px rgba(0,0,0,0.4);
    background: radial-gradient(circle at center, rgba(0,0,0,0.35) 0 36px, transparent 36px);
    pointer-events: none;
}

.more-links {
    grid-column: span 3;
    justify-self: end;
}

.more-links a { color: var(--accent); text-decoration: none; }
.more-links a:hover { text-decoration: underline; }
.more-links .arrow { padding-left: 6px; }


/* Contact Page */
.contact-section {
    padding: 80px 0;
}

.contact-section h1 {
    font-size: 32px;
    margin: 0 0 12px 0;
}

.contact-section p {
    font-size: var(--fs-body);
    line-height: 1.6;
}

.contact-section a {
    color: #3b82f6;
    text-decoration: none;
}

.contact-section a:hover {
    text-decoration: underline;
}

/* Beloved Melody Page */
.belovedmelody-section {
    padding: 80px 0;
}

.belovedmelody-section h1 {
    font-size: 32px;
    margin: 0 0 16px 0;
    text-align: left;
}

.belovedmelody-section h1 a.heart-link {
    color: #ef2b2b;
    text-decoration: none;
    font-size: 32px;
}

.belovedmelody-tagline {
    text-align: left;
    font-size: var(--fs-body);
    margin: 0 0 24px 0;
}

.belovedmelody-section p {
    font-size: var(--fs-body);
    line-height: 1.6;
    margin: 16px 0;
}

.belovedmelody-section p a {
    color: #3b82f6;
    text-decoration: none;
}

.belovedmelody-section p a:hover {
    text-decoration: underline;
}

.belovedmelody-nav {
    text-align: left;
    margin-top: 32px;
    font-size: var(--fs-body);
}

.belovedmelody-nav a {
    color: var(--text);
    text-decoration: none;
}

.belovedmelody-nav a:hover {
    color: #3b82f6;
}

/* Footer */
.site-footer { text-align: center; background: var(--bg); }
.site-footer p { font-size: var(--fs-body); }
.site-footer a { color: var(--text); }
.heart {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #a8a8b3;
    font-size: 280px; /* ~10x larger */
    line-height: 1;
    margin: 24px 0 8px 0;
}

/* Responsive Size Classes */

/* Mobile (Classic) - up to 767px */
@media (max-width: 767px) {
    .container {
        max-width: 100%;
        padding: 20px 16px;
    }
    
    .hero { padding-top: 16px; }
    
    .hero-header {
        gap: 12px;
    }
    
    .app-icon {
        height: 120px;
    }
    
    .title-area h1 {
        font-size: 28px;
    }
    
    .tagline {
        font-size: 16px;
    }
    
    .cta img {
        height: 36px !important;
    }
    
    .multipiano-image img {
        max-height: 100px;
    }
    
    .orientation-section,
    .scrolling-section,
    .bird-section,
    .features-container {
        padding: 24px 20px;
        border-radius: 16px;
        margin: 16px 0;
    }
    
    .orientation-title,
    .scrolling-title,
    .bird-title,
    .features-container-title {
        font-size: 24px;
    }
    
    .feature-description {
        font-size: 15px;
    }
    
    .orientation-container {
        width: 240px;
        height: 240px;
    }
    
    .orientation-images img {
        max-width: 240px;
        max-height: 240px;
        border-radius: 16px;
        border-width: 4px;
    }
    
    .scrolling-gif {
        max-width: 320px;
        max-height: 320px;
    }
    
    .scrolling-gif img {
        border-radius: 24px;
        border-width: 4px;
    }
    
    .bird-gif img {
        max-height: 320px;
        border-radius: 24px;
        border-width: 4px;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .category-title {
        font-size: 18px;
    }
    
    .instagram-gradient {
        width: 140px;
        height: 140px;
        border-radius: 32px;
    }
}

/* Full Screen (Tablet/Desktop) - 768px to 1279px */
@media (min-width: 768px) and (max-width: 1279px) {
    .container {
        max-width: 720px;
    }
    
    .app-icon {
        height: 150px;
    }
    
    .title-area h1 {
        font-size: 32px;
    }
    
    .multipiano-image img {
        max-height: 110px;
    }
    
    .orientation-section,
    .scrolling-section,
    .bird-section,
    .features-container {
        padding: 32px;
    }
    
    .orientation-title,
    .scrolling-title,
    .bird-title,
    .features-container-title {
        font-size: 28px;
    }
    
    .orientation-container {
        width: 280px;
        height: 280px;
    }
    
    .orientation-images img {
        max-width: 280px;
        max-height: 280px;
        border-radius: 20px;
        border-width: 5px;
    }
    
    .scrolling-gif {
        max-width: 400px;
        max-height: 400px;
    }
    
    .scrolling-gif img,
    .bird-gif img {
        border-radius: 28px;
        border-width: 5px;
    }
    
    .bird-gif img {
        max-height: 400px;
    }
    
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .instagram-gradient {
        width: 160px;
        height: 160px;
        border-radius: 40px;
    }
}

/* Large Screen (Desktop) - 1280px and up */
@media (min-width: 1280px) {
    .container {
        max-width: 1100px;
        padding: 32px 24px;
    }
    
    .hero { padding-top: 32px; }
    
    .hero-header {
        gap: 20px;
    }
    
    .app-icon {
        height: 190px;
    }
    
    .title-area h1 {
        font-size: 42px;
    }
    
    .tagline {
        font-size: 22px;
    }
    
    .cta img {
        height: 44px !important;
    }
    
    .multipiano-image img {
        max-height: 140px;
    }
    
    .orientation-section,
    .scrolling-section,
    .bird-section,
    .features-container {
        padding: 48px;
        border-radius: 28px;
    }
    
    .orientation-title,
    .scrolling-title,
    .bird-title,
    .features-container-title {
        font-size: 36px;
    }
    
    .feature-description {
        font-size: 18px;
        line-height: 1.7;
    }
    
    .orientation-container {
        width: 360px;
        height: 360px;
    }
    
    .orientation-images img {
        max-width: 360px;
        max-height: 360px;
        border-radius: 28px;
        border-width: 7px;
    }
    
    .scrolling-gif {
        max-width: 600px;
        max-height: 600px;
    }
    
    .scrolling-gif img {
        border-radius: 40px;
        border-width: 7px;
    }
    
    .bird-gif img {
        max-height: 600px;
        border-radius: 40px;
        border-width: 7px;
    }
    
    .features-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 24px;
    }
    
    .category-title {
        font-size: 22px;
    }
    
    .category-list {
        font-size: 17px;
    }
    
    .instagram-gradient {
        width: 200px;
        height: 200px;
        border-radius: 48px;
    }
    
    .instagram-link p {
        font-size: 22px;
    }
}
