/* Home.razor scoped styles - wireframe-faithful marketing page. */

/* ── Animations ── */


/* ── HERO ── */
.hero {
    min-height: 100vh;
    overflow: hidden;
}

.hero-left {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 6rem 3rem;
    position: relative;
    background: var(--deepdrft-page-surface);
    height: 100%;
}

@media (max-width: 960px) {
    .hero { min-height: auto; }
    .hero-left { padding: 4rem 1.5rem 3rem; }
}

/* ── DIVIDER ── */
.section-divider {
    display: flex;
    align-items: center;
    gap: 2rem;
    padding: 2rem 3rem;
    background: var(--deepdrft-page-surface);
}

.divider-line {
    flex: 1;
    height: 1px;
    background: var(--deepdrft-border);
}

.divider-tag {
    font-family: var(--deepdrft-font-mono);
    font-size: 0.6rem;
    letter-spacing: 0.25em;
    color: var(--deepdrft-page-text-muted);
    text-transform: uppercase;
    white-space: nowrap;
}

/* ── SECTION (sound) ── */
.section {
    padding: 7rem 3rem;
    background: var(--deepdrft-page-surface);
}

@media (min-width: 960px) {
    .section-header-grid {
        align-items: end;
    }
}

.section-label {
    font-family: var(--deepdrft-font-mono);
    font-size: 0.62rem;
    letter-spacing: 0.28em;
    color: var(--deepdrft-green);
    text-transform: uppercase;
    margin-bottom: 1.2rem;
}

.section-title {
    font-family: var(--deepdrft-font-display);
    font-size: clamp(2.8rem, 5vw, 4.5rem);
    font-weight: 300;
    line-height: 1;
    color: var(--deepdrft-page-text);
}

.section-title em {
    font-style: italic;
    color: var(--deepdrft-green-accent);
}

/* The body column is already full height; make it a flex container that
   centers its child vertically, so .section-body (with margin: auto for
   horizontal centering) sits centered against the taller title column
   instead of anchored at the top. ::deep is required because the class is
   on the MudItem-rendered div, which doesn't carry this component's scope
   attribute. */
.section-header-grid ::deep .section-body-item {
    display: flex;
    align-items: center;
}

.section-body {
    display: flex;
    max-width: 560px;
    margin: auto;
    align-content: center;
    justify-content: center;
}

.section-body p {
    display: flex;
    font-family: var(--deepdrft-font-body);
    font-size: 0.9rem;
    line-height: 1.8;
    color: var(--deepdrft-page-text);
    opacity: 0.65;
    max-width: 52ch;
}

/* ── MEDIUM GRID (Music through Every Medium) ── */
.medium-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 56px;
    margin-bottom: 4rem;
}

@media (max-width: 959px) {
    .medium-grid { grid-template-columns: repeat(2, 1fr); }
    .medium-card:last-child { grid-column: 1 / -1; }
}

@media (max-width: 599px) {
    .medium-grid { grid-template-columns: 1fr; }
    .medium-card:last-child { grid-column: auto; }
}

.medium-card {
    background: var(--deepdrft-page-surface);
    border: 1px solid var(--deepdrft-border);
    cursor: pointer;
    overflow: hidden;
    text-decoration: none;
    display: block;
    position: relative;
    max-width: 380px;
    margin: 0 auto;
}

.medium-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--deepdrft-green-accent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s;
    z-index: 1;
}

.medium-card:hover::after { transform: scaleX(1); }

.medium-image {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 3;
    background-size: cover;
    background-position: center;
    transition: transform 0.5s ease;
}

.medium-card:hover .medium-image { transform: scale(1.05); }

.medium-scrim {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom,
        rgba(17, 35, 56, 0.0) 40%,
        rgba(17, 35, 56, 0.35) 100%);
    transition: opacity 0.3s;
    opacity: 0.7;
}

.medium-card:hover .medium-scrim { opacity: 1; }

.medium-body {
    padding: 2rem 1.5rem;
    position: relative;
}

.medium-type {
    font-family: var(--deepdrft-font-mono);
    font-size: 0.58rem;
    letter-spacing: 0.2em;
    color: var(--deepdrft-page-text-muted);
    text-transform: uppercase;
    margin-bottom: 0.6rem;
}

.medium-name {
    font-family: var(--deepdrft-font-display);
    font-size: 1.6rem;
    font-weight: 400;
    color: var(--deepdrft-page-text);
    margin-bottom: 0.75rem;
    line-height: 1.1;
}

.medium-desc {
    font-family: var(--deepdrft-font-body);
    font-size: 0.82rem;
    line-height: 1.65;
    color: var(--deepdrft-page-text);
    opacity: 0.6;
}

/* ── DARK FEATURE SECTION ── */
.section-dark {
    background: var(--deepdrft-navy);
    padding: 7rem 3rem;
    color: var(--deepdrft-white);
}

.section-label-dark {
    color: var(--deepdrft-green-accent);
}

.section-title-dark {
    color: var(--deepdrft-white);
    margin-top: 0.5rem;
}

.section-title-dark em {
    font-style: italic;
    color: var(--deepdrft-green-accent);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
    border: 1px solid rgba(250, 250, 248, 0.08);
    margin-top: 4rem;
}

.feature-card {
    padding: 2.5rem;
    border-right: 1px solid rgba(250, 250, 248, 0.08);
    transition: background 0.3s;
}

.feature-card:last-child { border-right: none; }

.feature-card:hover { background: rgba(250, 250, 248, 0.04); }

/* Below md: per-card border-right leaves dangling hairlines when columns
   collapse, so switch to border-bottom dividers instead. */
@media (max-width: 960px) {
    .features-grid { grid-template-columns: repeat(2, 1fr); }
    .feature-card { border-right: none; border-bottom: 1px solid rgba(250, 250, 248, 0.08); }
    .feature-card:last-child { border-bottom: none; }
}

@media (max-width: 599px) {
    .features-grid { grid-template-columns: 1fr; }
    .feature-card { border-right: none; border-bottom: 1px solid rgba(250, 250, 248, 0.08); }
    .feature-card:last-child { border-bottom: none; }
}

.feature-icon {
    width: 2.5rem;
    height: 2.5rem;
    border: 1px solid rgba(250, 250, 248, 0.15);
    margin-bottom: 1.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.feature-icon svg {
    width: 1rem;
    height: 1rem;
    stroke: var(--deepdrft-green-accent);
    fill: none;
    stroke-width: 1.5;
}

.feature-title {
    font-family: var(--deepdrft-font-display);
    font-size: 1.3rem;
    font-weight: 400;
    color: var(--deepdrft-white);
    margin-bottom: 0.8rem;
    line-height: 1.2;
}

.feature-desc {
    font-family: var(--deepdrft-font-body);
    font-size: 0.8rem;
    line-height: 1.7;
    color: rgba(250, 250, 248, 0.45);
}

/* ── SPLIT: ORIGIN + CONNECT ── */
.section-split {
    min-height: 60vh;
}

@media (max-width: 960px) {
    .section-split { min-height: auto; }
}

.split-left {
    background: var(--deepdrft-green);
    padding: 6rem 4rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    overflow: hidden;
    height: 100%;
}

.split-left::before {
    content: '';
    position: absolute;
    top: -100px;
    right: -100px;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: rgba(61, 122, 104, 0.3);
}

.split-right {
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: var(--deepdrft-page-surface);
    height: 100%;
}

.split-eyebrow {
    font-family: var(--deepdrft-font-mono);
    font-size: 0.62rem;
    letter-spacing: 0.28em;
    color: rgba(250, 250, 248, 0.6);
    text-transform: uppercase;
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 1;
}

.split-title {
    font-family: var(--deepdrft-font-display);
    font-size: clamp(2.5rem, 4vw, 3.8rem);
    font-weight: 300;
    color: var(--deepdrft-white);
    line-height: 1.05;
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 1;
}

.split-title em {
    font-style: italic;
    opacity: 0.65;
}

.split-body {
    font-family: var(--deepdrft-font-body);
    font-size: 0.88rem;
    line-height: 1.8;
    color: rgba(250, 250, 248, 0.6);
    max-width: 42ch;
    position: relative;
    z-index: 1;
}

.connect-label {
    font-family: var(--deepdrft-font-mono);
    font-size: 0.62rem;
    letter-spacing: 0.28em;
    color: var(--deepdrft-green-accent);
    text-transform: uppercase;
    margin-bottom: 1.5rem;
}

.connect-title {
    font-family: var(--deepdrft-font-display);
    font-size: clamp(2rem, 3.5vw, 3rem);
    font-weight: 300;
    color: var(--deepdrft-page-text);
    line-height: 1.05;
    margin-bottom: 2rem;
}

.connect-title em {
    font-style: italic;
    color: var(--deepdrft-green);
}

.connect-options {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 2.5rem;
}

.connect-option {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    border: 1px solid var(--deepdrft-border);
    cursor: pointer;
    transition: border-color 0.25s, background 0.25s;
    text-decoration: none;
}

.connect-option:hover {
    border-color: var(--deepdrft-green-accent);
    background: color-mix(in srgb, var(--deepdrft-page-surface), var(--deepdrft-green-accent) 8%);
}

.option-icon {
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    /* Inversion pair with the glyph below: a contrast chip against the page surface
       (navy chip / white glyph in light; white chip / navy glyph on the dark ground). */
    background: var(--deepdrft-page-text);
    flex-shrink: 0;
}

.option-icon svg {
    width: 0.9rem;
    height: 0.9rem;
    stroke: var(--deepdrft-page-surface);
    fill: none;
    stroke-width: 1.5;
}

.option-text-label {
    font-family: var(--deepdrft-font-mono);
    font-size: 0.65rem;
    letter-spacing: 0.15em;
    color: var(--deepdrft-page-text);
    text-transform: uppercase;
}

.option-text-sub {
    font-family: var(--deepdrft-font-body);
    font-size: 0.75rem;
    color: var(--deepdrft-page-text-muted);
    margin-top: 0.1rem;
}

.connect-cta {
    align-self: flex-start;
}

/* ── CTA BANNER ── */
.cta-banner {
    background: var(--deepdrft-navy);
    padding: 6rem 3rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 3rem;
    position: relative;
    overflow: hidden;
}

.cta-banner::before {
    content: 'DRFT';
    position: absolute;
    right: -2rem;
    top: 50%;
    transform: translateY(-50%);
    font-family: var(--deepdrft-font-display);
    font-size: 22rem;
    font-weight: 300;
    color: rgba(250, 250, 248, 0.03);
    line-height: 1;
    pointer-events: none;
    user-select: none;
    letter-spacing: -0.05em;
}

.cta-text {
    position: relative;
    z-index: 1;
}

.cta-headline {
    font-family: var(--deepdrft-font-display);
    font-size: clamp(2.5rem, 5vw, 5rem);
    font-weight: 300;
    color: var(--deepdrft-white);
    line-height: 1;
    margin-bottom: 1rem;
}

.cta-headline em {
    font-style: italic;
    color: var(--deepdrft-green-accent);
}

.cta-sub {
    font-family: var(--deepdrft-font-body);
    font-size: 0.88rem;
    color: rgba(250, 250, 248, 0.4);
    letter-spacing: 0.05em;
}

.cta-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
    position: relative;
    z-index: 1;
    flex-shrink: 0;
    flex-wrap: wrap;
}

.btn-white {
    font-family: var(--deepdrft-font-mono);
    font-size: 0.68rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--deepdrft-navy);
    background: var(--deepdrft-white);
    border: none;
    padding: 1rem 2.2rem;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.25s, color 0.25s;
    display: inline-block;
}

.btn-white:hover {
    background: var(--deepdrft-green-accent);
    color: var(--deepdrft-white);
}

.btn-outline-white {
    font-family: var(--deepdrft-font-mono);
    font-size: 0.68rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--deepdrft-white);
    background: transparent;
    border: 1px solid rgba(250, 250, 248, 0.3);
    padding: 1rem 2.2rem;
    cursor: pointer;
    text-decoration: none;
    transition: border-color 0.25s;
    display: inline-block;
}

.btn-outline-white:hover { border-color: var(--deepdrft-white); }

/* ── DARK-MODE OVERRIDES ── */
/* In dark mode, decorative em accents that use --deepdrft-green (#1A3C34) become
   near-invisible on the navy ground. Switch to --deepdrft-green-accent (#3D7A68). */
:global(.deepdrft-theme-dark) .section-title em,
:global(.deepdrft-theme-dark) .connect-title em {
    color: var(--deepdrft-green-accent);
}

@media (max-width: 599px) {
    .cta-banner {
        flex-direction: column;
        align-items: flex-start;
        gap: 2rem;
        padding: 4rem 1.5rem;
    }

    .cta-actions {
        width: 100%;
    }

    .btn-white,
    .btn-outline-white {
        flex: 1;
        text-align: center;
        min-width: 140px;
    }

    /* At 22rem the "DRFT" watermark forces horizontal scroll on mobile. */
    .cta-banner::before {
        font-size: 8rem;
        right: -0.5rem;
    }
}
