/* ==========================================================================
   Anton Bondak — splash page
   Three independent layers: photographic asset, CSS geometry, real HTML text.
   ========================================================================== */

:root {
    color-scheme: light;

    --paper:       #F4F1EB;
    --paper-warm:  #FAF8F4;
    --ink:         #222222;
    --ink-soft:    #6B6965;
    --line:        rgba(34, 34, 34, .14);

    --ivory:       rgba(248, 246, 240, .55);
    --bluegray:    rgba(173, 184, 190, .28);
    --sand:        rgba(206, 194, 176, .32);
    --charcoal:    rgba(52, 56, 60, .10);

    --gutter:      clamp(24px, 5vw, 96px);
    --serif:       'Instrument Serif', 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
    --sans:        Inter, ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    overflow-x: hidden;
}

html {
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    background:
        radial-gradient(120% 80% at 82% 12%, rgba(255, 253, 249, .9), rgba(244, 241, 235, 0) 62%),
        radial-gradient(90% 70% at 4% 96%, rgba(214, 206, 193, .34), rgba(244, 241, 235, 0) 58%),
        var(--paper);
    color: var(--ink);
    font-family: var(--sans);
    font-size: 16px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

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

/* --------------------------------------------------------------------------
   Shell
   -------------------------------------------------------------------------- */

.splash {
    display: grid;
    min-height: 100vh;
    min-height: 100svh;
}

.splash__inner {
    display: grid;
    grid-template-rows: auto 1fr auto;
    gap: clamp(28px, 4vh, 56px);
    width: min(100%, 1800px);
    margin: 0 auto;
    padding-block:
        max(clamp(28px, 4vh, 52px), env(safe-area-inset-top))
        max(clamp(24px, 4vh, 48px), env(safe-area-inset-bottom));
    padding-inline:
        max(var(--gutter), env(safe-area-inset-left))
        max(var(--gutter), env(safe-area-inset-right));
}

/* --------------------------------------------------------------------------
   Typography
   -------------------------------------------------------------------------- */

.splash__brand {
    margin: 0;
    color: var(--ink);
    font-size: clamp(.85rem, 1vw, 1rem);
    font-weight: 500;
    letter-spacing: .3em;
    text-transform: uppercase;
}

.splash__title {
    max-width: 650px;
    margin: 0;
    font-family: var(--serif);
    font-size: clamp(3rem, 6vw, 7rem);
    font-weight: 400;
    line-height: 1.0;
    letter-spacing: -.01em;
    text-wrap: balance;
}

.splash__description {
    max-width: 34ch;
    margin: clamp(22px, 2.6vw, 38px) 0 0;
    color: var(--ink-soft);
    font-size: clamp(1rem, 1.3vw, 1.35rem);
    line-height: 1.55;
}

.splash__status {
    margin: clamp(26px, 3vw, 44px) 0 0;
    color: var(--ink);
    font-size: clamp(.8rem, .95vw, .95rem);
    letter-spacing: .22em;
    text-transform: uppercase;
}

.splash__footer {
    align-self: end;
}

.splash__tagline {
    max-width: 44ch;
    margin: 0;
    padding-top: clamp(18px, 2.4vh, 30px);
    border-top: 1px solid var(--line);
    color: var(--ink-soft);
    font-family: var(--serif);
    font-size: clamp(.95rem, 1.15vw, 1.2rem);
    font-style: italic;
    letter-spacing: .01em;
}

/* --------------------------------------------------------------------------
   Hero layout — desktop first, two columns
   -------------------------------------------------------------------------- */

.splash__hero {
    display: grid;
    grid-template-columns: minmax(0, 47fr) minmax(0, 53fr);
    align-items: center;
    gap: clamp(32px, 5vw, 88px);
    min-height: 0;
}

.splash__content {
    max-width: 650px;
}

/* Visual column ------------------------------------------------------------ */

.splash__visual {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    min-height: 0;
}

.splash__frame {
    position: relative;
    z-index: 1;
    width: min(100%, 520px);
    aspect-ratio: 4 / 5;
    max-height: min(72vh, 660px);
    overflow: hidden;
    border-radius: 999px 999px 20px 20px;
    background: var(--paper-warm);
}

.splash__photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 52% 42%;
}

/* --------------------------------------------------------------------------
   Decorative geometry — purely CSS, independent of the photograph
   -------------------------------------------------------------------------- */

.shape {
    position: absolute;
    z-index: 2;              /* overlays sit above the photograph */
    display: block;
    pointer-events: none;
}

/* Soft wash that ties the photo into the page background. */
.shape--wash {
    inset: 0;
    background: linear-gradient(190deg, rgba(250, 248, 244, .34) 0%, rgba(250, 248, 244, 0) 46%);
}

/* Large translucent circle, crossing the left edge of the photograph. */
.shape--circle {
    top: 6%;
    right: 62%;
    width: clamp(160px, 21vw, 300px);
    aspect-ratio: 1;
    border: 1px solid rgba(160, 168, 172, .30);
    border-radius: 50%;
    background: rgba(225, 225, 220, .35);
    backdrop-filter: blur(1px);
}

/* Vertical translucent panel over the right part of the composition. */
.shape--panel {
    top: 18%;
    right: 6%;
    width: clamp(52px, 7vw, 104px);
    height: clamp(180px, 40vh, 380px);
    background: var(--bluegray);
    border-radius: 2px;
}

/* Outlined arch echoing the photo frame, set slightly behind and below. */
.shape--arch {
    z-index: 0;              /* this one is tucked behind the photograph */
    left: 0;
    bottom: 4%;
    width: clamp(150px, 19vw, 270px);
    height: clamp(190px, 24vw, 330px);
    border: 1px solid rgba(120, 128, 134, .26);
    border-bottom: 0;
    border-radius: 999px 999px 0 0;
}

/* Thin editorial rule reaching from the text column into the image. */
.shape--rule {
    top: 50%;
    right: 34%;
    width: clamp(90px, 16vw, 260px);
    height: 1px;
    background: linear-gradient(90deg, rgba(34, 34, 34, 0), rgba(34, 34, 34, .22));
}

/* --------------------------------------------------------------------------
   Entrance — quiet, once, on load only
   -------------------------------------------------------------------------- */

html:not(.is-ready) .splash__brand,
html:not(.is-ready) .splash__title,
html:not(.is-ready) .splash__description,
html:not(.is-ready) .splash__status,
html:not(.is-ready) .splash__tagline,
html:not(.is-ready) .splash__visual {
    opacity: 0;
}

.is-ready .splash__brand,
.is-ready .splash__title,
.is-ready .splash__description,
.is-ready .splash__status,
.is-ready .splash__tagline {
    animation: rise 700ms cubic-bezier(.22, .61, .36, 1) both;
}

.is-ready .splash__brand      { animation-delay:  60ms; }
.is-ready .splash__title      { animation-delay: 140ms; }
.is-ready .splash__description{ animation-delay: 260ms; }
.is-ready .splash__status     { animation-delay: 340ms; }
.is-ready .splash__tagline    { animation-delay: 420ms; }

.is-ready .splash__visual {
    animation: settle 1200ms cubic-bezier(.22, .61, .36, 1) 120ms both;
}

@keyframes rise {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: none; }
}

@keyframes settle {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* --------------------------------------------------------------------------
   Tablet — 768px to 1099px
   -------------------------------------------------------------------------- */

@media (max-width: 1099px) {
    .splash__hero {
        grid-template-columns: minmax(0, 44fr) minmax(0, 56fr);
        gap: clamp(24px, 4vw, 48px);
    }

    .splash__title {
        font-size: clamp(2.6rem, 5.6vw, 4.2rem);
    }

    .splash__description {
        max-width: 30ch;
    }

    .splash__frame {
        width: min(100%, 440px);
        max-height: min(64vh, 560px);
    }

    .shape--circle {
        top: 4%;
        right: 68%;
        width: clamp(120px, 18vw, 190px);
    }

    .shape--panel {
        height: clamp(150px, 32vh, 280px);
    }

    .shape--rule {
        display: none;
    }
}

/* --------------------------------------------------------------------------
   Mobile — below 768px. A layout of its own, not a shrunken desktop.
   -------------------------------------------------------------------------- */

@media (max-width: 767px) {
    .splash__inner {
        gap: clamp(20px, 3.4vh, 34px);
    }

    .splash__hero {
        grid-template-columns: 1fr;
        align-content: start;
        gap: clamp(26px, 5vh, 44px);
    }

    .splash__title {
        font-size: clamp(3rem, 14vw, 5rem);
        line-height: .95;
    }

    .splash__description {
        max-width: 26ch;
        margin-top: 18px;
        font-size: 1.05rem;
    }

    .splash__status {
        margin-top: 22px;
    }

    /* Photograph moves below the text; nothing overlaps the type any more. */
    .splash__visual {
        justify-content: center;
    }

    .splash__frame {
        width: min(86vw, 420px);
        max-height: 42vh;
        aspect-ratio: 5 / 6;
    }

    .splash__photo {
        object-position: 50% 46%;
    }

    /* Geometry is re-placed around the image, at a smaller scale. */
    .shape--circle {
        top: -6%;
        right: auto;
        left: 2%;
        width: clamp(96px, 30vw, 150px);
    }

    .shape--panel {
        top: auto;
        bottom: -5%;
        right: 4%;
        width: clamp(40px, 12vw, 64px);
        height: clamp(90px, 18vh, 140px);
    }

    .shape--arch,
    .shape--rule {
        display: none;
    }

    .splash__tagline {
        font-size: 1rem;
    }
}

@media (max-width: 420px) {
    .splash__title {
        font-size: clamp(2.7rem, 13vw, 4rem);
    }

    .splash__frame {
        max-height: 38vh;
    }

    .shape--circle {
        width: clamp(84px, 26vw, 120px);
    }
}

/* Short phones (e.g. 320x568, 375x667): keep everything above the fold. */
@media (max-width: 767px) and (max-height: 700px) {
    .splash__inner {
        gap: 16px;
    }

    .splash__hero {
        gap: 22px;
    }

    .splash__title {
        font-size: clamp(2.2rem, 10.5vw, 3rem);
    }

    .splash__description {
        margin-top: 14px;
        font-size: .98rem;
    }

    .splash__status {
        margin-top: 16px;
    }

    .splash__frame {
        max-height: 34vh;
    }

    .splash__tagline {
        padding-top: 14px;
        font-size: .95rem;
    }

    .shape--circle {
        width: clamp(72px, 22vw, 104px);
    }
}

/* --------------------------------------------------------------------------
   Short viewports — laptops at 768px tall and below
   -------------------------------------------------------------------------- */

@media (max-height: 750px) and (min-width: 900px) {
    .splash__inner {
        gap: clamp(18px, 2.6vh, 32px);
    }

    .splash__title {
        font-size: clamp(2.5rem, 4.4vw, 4rem);
    }

    .splash__description {
        margin-top: 18px;
    }

    .splash__status {
        margin-top: 22px;
    }

    .splash__frame {
        max-height: 58vh;
    }

    .shape--panel {
        height: clamp(140px, 30vh, 240px);
    }
}

@media (max-height: 620px) and (min-width: 900px) {
    .splash__title {
        font-size: clamp(2.1rem, 3.6vw, 3rem);
    }

    .splash__frame {
        max-height: 52vh;
    }
}

/* --------------------------------------------------------------------------
   Accessibility
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
    }

    html:not(.is-ready) .splash__brand,
    html:not(.is-ready) .splash__title,
    html:not(.is-ready) .splash__description,
    html:not(.is-ready) .splash__status,
    html:not(.is-ready) .splash__tagline,
    html:not(.is-ready) .splash__visual {
        opacity: 1;
    }
}

.splash-noscript {
    padding: var(--gutter);
    font-size: 1rem;
    letter-spacing: .18em;
    text-transform: uppercase;
}
