/* ===========================================================
   Samsung Kitchen — single-page PWA
   =========================================================== */

:root {
    --samsung-blue: #1428a0;
    --samsung-blue-deep: #0a1469;
    --samsung-blue-bright: #2a3eb1;
    --ink: #000000;
    --ink-soft: #2c2c2c;
    --ink-mute: #6b6b6b;
    --paper: #ffffff;
    --paper-soft: #f5f5f7;
    --line: rgba(0, 0, 0, 0.08);
    --radius-btn: 6px;
    --shadow-lg: 0 30px 80px -20px rgba(0, 0, 0, 0.18);
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    font-family: 'Inter', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    background: var(--paper);
    color: var(--ink);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    scroll-behavior: smooth;
    overflow-x: hidden;
}

h1, h2, h3 { margin: 0; line-height: 1.05; letter-spacing: -0.02em; }
h1:focus, h2:focus, h3:focus { outline: none; }
p { margin: 0; }
img { max-width: 100%; display: block; }

/* ============ SPLASH SCREEN (Samsung minimalist white) ============ */
#splash {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #ffffff;
    transition: opacity 0.7s ease;
    will-change: opacity;
}
#splash.done {
    opacity: 0;
    pointer-events: none;
}
.splash-bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 50% 50%, rgba(20, 40, 160, 0.04) 0%, transparent 60%);
}
.splash-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.2rem;
    text-align: center;
    color: var(--ink);
    padding: 0 1.5rem;
}
.splash-wordmark {
    font-size: clamp(2.4rem, 9vw, 5rem);
    font-weight: 800;
    letter-spacing: 0.04em;
    color: var(--ink);
    animation: splashFade 0.9s cubic-bezier(.2,.8,.2,1) both;
}
.splash-rule {
    width: 0;
    height: 2px;
    background: var(--samsung-blue);
    animation: splashRule 0.8s ease 0.5s forwards;
}
@keyframes splashRule {
    from { width: 0; }
    to   { width: 80px; }
}
.splash-tagline {
    font-size: clamp(0.85rem, 2vw, 1rem);
    font-weight: 400;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--ink-mute);
    opacity: 0;
    animation: splashFade 0.9s ease 0.8s forwards;
}
@keyframes splashFade {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}
.splash-loader {
    width: 180px;
    height: 1px;
    background: rgba(0,0,0,0.08);
    overflow: hidden;
    margin-top: 1.5rem;
    opacity: 0;
    animation: splashFade 0.6s ease 1.1s forwards;
}
.splash-loader span {
    display: block;
    height: 100%;
    background: var(--samsung-blue);
    animation: splashSweep 1.4s ease-in-out infinite;
}
@keyframes splashSweep {
    0%   { transform: translateX(-100%); width: 40%; }
    50%  { width: 70%; }
    100% { transform: translateX(250%); width: 40%; }
}

/* ============ BLAZOR LOADER (small, subtle) ============ */
.loading-progress {
    position: fixed;
    display: block;
    width: 4rem;
    height: 4rem;
    inset: auto auto 1.2rem 1.2rem;
    z-index: 9998;
    opacity: 0.6;
}
.loading-progress circle { fill: none; stroke: rgba(255,255,255,0.25); stroke-width: 0.4rem; transform-origin: 50% 50%; transform: rotate(-90deg); }
.loading-progress circle:last-child {
    stroke: #ffffff;
    stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
    transition: stroke-dasharray 0.05s ease-in-out;
}
.loading-progress-text { display: none; }

/* ============ TOP NAV ============ */
.nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem clamp(1rem, 4vw, 3rem);
    transition: background 0.4s ease, backdrop-filter 0.4s ease, box-shadow 0.4s ease;
}
.nav {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(18px) saturate(180%);
    -webkit-backdrop-filter: blur(18px) saturate(180%);
}
.nav.scrolled {
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06);
}
.nav-logo {
    font-size: 1.15rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    color: var(--ink);
    text-decoration: none;
    line-height: 1;
}
.nav-cta {
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    color: var(--ink);
    border: 1px solid rgba(0,0,0,0.18);
    padding: 0.55rem 1.2rem;
    border-radius: var(--radius-btn);
    transition: all 0.25s ease;
}
.nav-cta:hover { background: var(--ink); color: #fff; border-color: var(--ink); }

.nav-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.nav-install {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    color: #fff;
    background: var(--samsung-blue);
    border: 1px solid var(--samsung-blue);
    padding: 0.55rem 1.1rem;
    border-radius: var(--radius-btn);
    cursor: pointer;
    transition: background 0.25s ease, border-color 0.25s ease, transform 0.2s ease;
}
.nav-install:hover {
    background: var(--samsung-blue-deep);
    border-color: var(--samsung-blue-deep);
    transform: translateY(-1px);
}
@media (max-width: 480px) {
    .nav-install span { display: none; }
    .nav-install { padding: 0.55rem 0.7rem; }
    .nav-cta { padding: 0.55rem 0.9rem; font-size: 0.8rem; }
    .nav-logo { font-size: 1rem; }
}

/* ============ INSTALL MODAL ============ */
.install-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.install-modal.open { opacity: 1; }
.install-modal[hidden] { display: none !important; }
.install-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(11, 15, 31, 0.65);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}
.install-card {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 440px;
    background: #fff;
    color: var(--ink);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 40px 80px -20px rgba(0,0,0,0.4);
    transform: translateY(20px) scale(0.96);
    transition: transform 0.4s cubic-bezier(.2,.8,.2,1);
}
.install-modal.open .install-card { transform: translateY(0) scale(1); }
.install-close {
    position: absolute;
    top: 0.6rem; right: 0.8rem;
    background: transparent;
    border: 0;
    font-size: 1.8rem;
    line-height: 1;
    color: #999;
    cursor: pointer;
    padding: 0.3rem 0.6rem;
    transition: color 0.2s ease;
}
.install-close:hover { color: var(--ink); }
.install-icon {
    text-align: center;
    margin: 0 auto 1rem;
    font-size: 1.4rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    color: var(--ink);
}
.install-card h3 {
    font-size: 1.4rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 1.2rem;
}
.install-body p { color: var(--ink-soft); margin-bottom: 1rem; line-height: 1.5; }
.install-body ol { margin: 0; padding-left: 1.3rem; }
.install-body li {
    margin-bottom: 0.7rem;
    line-height: 1.55;
    color: var(--ink-soft);
}
.install-body strong { color: var(--ink); }

/* ============ HERO ============ */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    color: #fff;
    text-align: center;
    padding: 0 1.5rem;
}
.hero .bg {
    position: absolute; inset: -10%;
    background-image: url('../img/kitchen-hero.jpg');
    background-size: cover;
    background-position: center;
    transform: scale(1.08);
    will-change: transform;
    z-index: 0;
}
.hero::after {
    content: "";
    position: absolute; inset: 0;
    background:
        linear-gradient(180deg, rgba(0,0,0,0.25) 0%, rgba(0,0,0,0.55) 60%, rgba(0,0,0,0.75) 100%);
    z-index: 1;
}
.hero-content { position: relative; z-index: 2; max-width: 1100px; }
.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.95);
    margin-bottom: 1.4rem;
}
.hero-eyebrow::before {
    content: "";
    width: 28px; height: 2px;
    background: var(--samsung-blue);
}
.hero-title {
    font-size: clamp(2.4rem, 9vw, 7rem);
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 0.95;
    margin-bottom: 1.5rem;
}
.hero-title .accent {
    color: #fff;
    position: relative;
}
.hero-title .accent::after {
    content: "";
    position: absolute;
    left: 0; right: 0; bottom: -0.18em;
    height: 4px;
    background: var(--samsung-blue);
    transform: scaleX(0);
    transform-origin: left;
    animation: heroRule 1.2s cubic-bezier(.2,.8,.2,1) 1.4s forwards;
}
@keyframes heroRule {
    to { transform: scaleX(1); }
}
@keyframes shimmer {
    from { background-position: 200% 0; }
    to   { background-position: -200% 0; }
}
.hero-sub {
    font-size: clamp(1rem, 1.8vw, 1.25rem);
    font-weight: 300;
    max-width: 680px;
    margin: 0 auto 2rem;
    opacity: 0.92;
    line-height: 1.6;
}
.hero-scroll-hint {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    color: #fff;
    font-size: 0.7rem;
    letter-spacing: 0.4em;
    text-transform: uppercase;
    opacity: 0.7;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.6rem;
    animation: floatY 2.4s ease-in-out infinite;
}
.hero-scroll-hint::after {
    content: "";
    width: 1px; height: 40px;
    background: linear-gradient(to bottom, rgba(255,255,255,0.7), transparent);
}
@keyframes floatY {
    0%, 100% { transform: translate(-50%, 0); }
    50%      { transform: translate(-50%, 8px); }
}

/* ============ SECTIONS / SCROLL FX ============ */
section { padding: clamp(5rem, 12vh, 10rem) clamp(1.5rem, 5vw, 4rem); }

.section-inner { max-width: 1200px; margin: 0 auto; }

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--samsung-blue);
    margin-bottom: 1.6rem;
}
.eyebrow::before {
    content: "";
    width: 28px; height: 2px;
    background: var(--samsung-blue);
}

h2.heading {
    font-size: clamp(2rem, 5.5vw, 4rem);
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -0.03em;
    max-width: 900px;
}

.lede {
    font-size: clamp(1.05rem, 1.4vw, 1.2rem);
    line-height: 1.7;
    color: var(--ink-soft);
    max-width: 720px;
    margin-top: 1.6rem;
}

/* Animation primitives — start hidden, .in adds the visible state */
.fx { opacity: 0; will-change: opacity, transform, filter; transition: opacity 1.1s ease, transform 1.1s cubic-bezier(.2,.8,.2,1), filter 1.1s ease; }
.fx-up      { transform: translateY(60px); }
.fx-down    { transform: translateY(-60px); }
.fx-left    { transform: translateX(-80px); }
.fx-right   { transform: translateX(80px); }
.fx-zoom    { transform: scale(0.85); }
.fx-blur    { filter: blur(20px); transform: translateY(40px); }
.fx-rotate  { transform: rotate(-6deg) translateY(50px); }
.fx-skew    { transform: skewY(6deg) translateY(60px); transform-origin: left center; }
.fx.in {
    opacity: 1;
    transform: none;
    filter: none;
}

/* Word-by-word animation */
.fx-words .word {
    display: inline-block;
    opacity: 0;
    transform: translateY(0.5em);
    transition: opacity 0.7s ease, transform 0.7s cubic-bezier(.2,.8,.2,1);
    transition-delay: calc(var(--i, 0) * 60ms);
}
.fx-words.in .word { opacity: 1; transform: translateY(0); }

/* Stagger children */
.fx-stagger > * { opacity: 0; transform: translateY(40px); transition: opacity 0.9s ease, transform 0.9s cubic-bezier(.2,.8,.2,1); }
.fx-stagger.in > *:nth-child(1) { transition-delay: 0.05s; opacity: 1; transform: none; }
.fx-stagger.in > *:nth-child(2) { transition-delay: 0.18s; opacity: 1; transform: none; }
.fx-stagger.in > *:nth-child(3) { transition-delay: 0.31s; opacity: 1; transform: none; }
.fx-stagger.in > *:nth-child(4) { transition-delay: 0.44s; opacity: 1; transform: none; }
.fx-stagger.in > *:nth-child(5) { transition-delay: 0.57s; opacity: 1; transform: none; }
.fx-stagger.in > *:nth-child(6) { transition-delay: 0.70s; opacity: 1; transform: none; }

/* ============ SECTION VARIANTS ============ */

/* Intro */
.intro { background: var(--paper); }
.intro .heading, .features .heading { color: var(--ink); }

/* Showcase: full-bleed image with parallax-ish feel */
.showcase {
    position: relative;
    min-height: 90vh;
    padding: 0;
    color: #fff;
    display: flex;
    align-items: center;
    overflow: hidden;
}
.showcase .bg {
    position: absolute; inset: -10%;
    background-size: cover;
    background-position: center;
    z-index: 0;
    transform: scale(1.05) translateY(0);
    will-change: transform;
}
.showcase::after {
    content: "";
    position: absolute; inset: 0;
    background: linear-gradient(110deg, rgba(10,20,105,0.7) 0%, rgba(10,20,105,0.25) 60%, transparent 100%);
    z-index: 1;
}
.showcase .section-inner { position: relative; z-index: 2; padding: 8rem 0; }
.showcase .eyebrow { color: #fff; }
.showcase .eyebrow::before { background: #fff; }
.showcase h2.heading { color: #fff; }
.showcase .lede { color: rgba(255,255,255,0.9); }

/* Two-column features */
.features { background: var(--paper-soft); }
.feature-grid {
    margin-top: 4rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
}
.feature {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 2rem;
    transition: transform 0.4s cubic-bezier(.2,.8,.2,1), box-shadow 0.4s ease, border-color 0.4s ease;
}
.feature:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 50px -20px rgba(0,0,0,0.18);
    border-color: rgba(0,0,0,0.2);
}
.feature .num {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    color: var(--samsung-blue);
    margin-bottom: 1.2rem;
}
.feature h3 {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 0.8rem;
}
.feature p {
    color: var(--ink-soft);
    line-height: 1.6;
    font-size: 0.97rem;
}

/* Split: image + text */
.split {
    background: var(--paper);
}
.split-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(2rem, 5vw, 5rem);
    align-items: center;
}
@media (max-width: 800px) {
    .split-grid { grid-template-columns: 1fr; }
}
.split-img {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    aspect-ratio: 4/5;
    box-shadow: 0 30px 60px -25px rgba(0,0,0,0.18);
}
.split-img img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform 1.6s ease;
}
.split:hover .split-img img { transform: scale(1.06); }

/* Quote / pull quote — light Samsung-style */
.quote {
    background: var(--paper-soft);
    color: var(--ink);
    text-align: center;
}
.quote blockquote {
    font-size: clamp(1.5rem, 4vw, 2.6rem);
    font-weight: 400;
    line-height: 1.35;
    letter-spacing: -0.02em;
    max-width: 1000px;
    margin: 0 auto;
    color: var(--ink);
}
.quote .cite {
    margin-top: 2rem;
    font-size: 0.8rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--samsung-blue);
    font-weight: 600;
}

/* Final CTA */
.final {
    background: var(--paper);
    color: var(--ink);
    text-align: center;
    border-top: 1px solid var(--line);
}
.final h2 { color: var(--ink); max-width: 1000px; margin: 0 auto; }
.final .btn {
    display: inline-block;
    margin-top: 2.5rem;
    padding: 0.95rem 2.2rem;
    background: var(--samsung-blue);
    color: #fff;
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    border-radius: var(--radius-btn);
    transition: background 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}
.final .btn:hover {
    background: var(--samsung-blue-deep);
    transform: translateY(-2px);
    box-shadow: 0 14px 30px -10px rgba(20, 40, 160, 0.45);
}

/* Footer — Samsung-style light */
footer {
    padding: 3rem 1.5rem;
    text-align: center;
    background: var(--paper-soft);
    color: var(--ink-mute);
    font-size: 0.85rem;
    border-top: 1px solid var(--line);
}
footer .footer-logo {
    font-size: 1.05rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    color: var(--ink);
    margin-bottom: 0.8rem;
}

/* ============ ERROR UI (kept) ============ */
#blazor-error-ui {
    color-scheme: light only;
    background: lightyellow;
    bottom: 0; left: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    box-sizing: border-box;
    display: none;
    padding: 0.6rem 1.25rem 0.7rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}
#blazor-error-ui .dismiss { cursor: pointer; position: absolute; right: 0.75rem; top: 0.5rem; }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    .fx { opacity: 1 !important; transform: none !important; filter: none !important; }
    .fx-words .word { opacity: 1 !important; transform: none !important; }
    .fx-stagger > * { opacity: 1 !important; transform: none !important; }
}
