/* Alpine Lake Systems — corporate landing site.
 *
 * Brand colors picked from the existing logo:
 *   navy  #0d1a3a  — the wordmark "LAKE SYSTEMS" and mountain silhouette
 *   teal  #66c0ce  — the wordmark "ALPINE" and the lake reflection
 *
 * The layout is mobile-first: small phones get a single-column hero with the
 * background photo full-bleed and a slide-in nav drawer; ≥ 760px we widen
 * the hero, switch the value grid to three columns, and reveal the inline
 * top nav. We deliberately do not use a CSS framework — the page is small
 * enough to stay readable hand-written, and adding Tailwind/Bootstrap would
 * dwarf the rest of the asset budget.
 */

:root {
    --navy: #0d1a3a;
    --navy-2: #1a2956;
    --teal: #66c0ce;
    --teal-2: #4aa9b8;
    --ink: #1a1f2c;
    --ink-soft: #4a526b;
    --paper: #ffffff;
    --paper-2: #f6f8fb;
    --line: rgba(13, 26, 58, 0.10);
    --shadow: 0 6px 24px rgba(13, 26, 58, 0.08), 0 2px 6px rgba(13, 26, 58, 0.05);
    --radius: 12px;
    --header-h: 76px;
    --max-width: 1120px;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html {
    /* iOS Safari notch handling. The header + footer use safe-area padding
       so the layout is fully usable on iPhones with home indicators. */
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: "Montserrat", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
    color: var(--ink);
    background: var(--paper);
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    /* The hero is the first paint; we want it to be the bottom of the page
       too if you scroll *past* it (reveal sections sit underneath). */
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--navy); text-decoration: none; transition: color 0.18s ease; }
a:hover { color: var(--teal-2); }
button { font: inherit; color: inherit; }

::selection { background: var(--teal); color: var(--navy); }

.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    background: var(--navy);
    color: #fff;
    padding: 10px 16px;
    z-index: 10001;
}
.skip-link:focus { left: 12px; top: 12px; }

/* ─── Header ──────────────────────────────────────────────────────────── */

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px clamp(16px, 4vw, 36px);
    padding-left: max(clamp(16px, 4vw, 36px), env(safe-area-inset-left));
    padding-right: max(clamp(16px, 4vw, 36px), env(safe-area-inset-right));
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: saturate(160%) blur(10px);
    -webkit-backdrop-filter: saturate(160%) blur(10px);
    border-bottom: 1px solid var(--line);
    min-height: var(--header-h);
}

.brand {
    display: inline-flex;
    align-items: center;
    line-height: 0;
    /* Anchor focus ring should hug the logo, not the whole header. */
    border-radius: 4px;
}
.brand img {
    height: 48px;
    width: auto;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 28px;
}
.nav-link {
    font-size: 15px;
    font-weight: 500;
    letter-spacing: 0.02em;
    color: var(--navy);
    padding: 8px 4px;
    position: relative;
}
.nav-link::after {
    content: "";
    position: absolute;
    left: 4px; right: 4px; bottom: 4px;
    height: 2px;
    background: var(--teal);
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform 0.25s ease;
}
.nav-link:hover::after,
.nav-link.is-active::after { transform: scaleX(1); }
.nav-link.is-active { color: var(--navy); }

.nav-toggle {
    display: none;
    background: transparent;
    border: 0;
    padding: 8px;
    cursor: pointer;
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
}
.nav-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--navy);
    border-radius: 2px;
    position: relative;
    transition: transform 0.25s ease, opacity 0.2s ease;
}
.nav-toggle span + span { margin-top: 5px; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

@media (max-width: 760px) {
    .nav-toggle { display: inline-flex; }
    .site-nav {
        position: fixed;
        top: var(--header-h);
        right: 0;
        left: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: saturate(160%) blur(10px);
        -webkit-backdrop-filter: saturate(160%) blur(10px);
        padding: 8px 0 24px;
        border-bottom: 1px solid var(--line);
        transform: translateY(-12px);
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.2s ease, transform 0.22s ease;
    }
    .site-nav.is-open {
        transform: translateY(0);
        opacity: 1;
        pointer-events: auto;
    }
    .nav-link {
        padding: 16px clamp(16px, 5vw, 32px);
        font-size: 18px;
        border-bottom: 1px solid var(--line);
    }
    .nav-link::after { display: none; }
    .nav-link.is-active { color: var(--teal-2); }
    .brand img { height: 40px; }
}

/* ─── Hero ────────────────────────────────────────────────────────────── */

.hero {
    position: relative;
    min-height: calc(100svh - var(--header-h));
    /* dvh would be ideal but svh is more broadly supported and avoids
       reflow when iOS Safari hides the URL bar. */
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    color: #fff;
    isolation: isolate;
    padding: 56px clamp(20px, 5vw, 48px) 96px;
}
.hero-bg {
    position: absolute;
    inset: -6%;
    background-image: url('/img/hero.jpg');
    background-size: cover;
    background-position: center 38%;
    z-index: -2;
    animation: heroPan 24s ease-in-out infinite alternate;
    will-change: transform;
}
.hero-tint {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(13, 26, 58, 0.42) 0%, rgba(13, 26, 58, 0.18) 35%, rgba(13, 26, 58, 0.58) 100%),
        linear-gradient(45deg, rgba(13, 26, 58, 0.25) 0%, transparent 60%);
    z-index: -1;
}

@keyframes heroPan {
    0%   { transform: scale(1.05) translate3d(0, 0, 0); }
    100% { transform: scale(1.12) translate3d(-1.5%, -1%, 0); }
}
@media (prefers-reduced-motion: reduce) {
    .hero-bg { animation: none; }
}

.hero-inner {
    max-width: 880px;
    text-align: center;
    padding: 0 4px;
}
.hero-title {
    font-size: clamp(34px, 6.5vw, 76px);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.05;
    margin: 0 0 18px;
    text-shadow: 0 2px 18px rgba(0, 0, 0, 0.35);
}
.hero-sub {
    font-size: clamp(16px, 2.2vw, 22px);
    font-weight: 400;
    letter-spacing: 0.06em;
    margin: 0 0 32px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.92);
    text-shadow: 0 1px 10px rgba(0, 0, 0, 0.3);
}
.hero-cta-row { margin: 0; }

.btn {
    display: inline-block;
    background: var(--teal);
    color: var(--navy);
    padding: 14px 36px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 15px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    box-shadow: 0 6px 22px rgba(102, 192, 206, 0.45);
    transition: transform 0.18s ease, box-shadow 0.22s ease, background 0.18s ease;
}
.btn:hover {
    background: #7fd0dd;
    color: var(--navy);
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(102, 192, 206, 0.55);
}
.btn:active { transform: translateY(0); }
.btn:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }

.hero-scroll {
    position: absolute;
    bottom: max(20px, env(safe-area-inset-bottom));
    left: 50%;
    transform: translateX(-50%);
    width: 22px;
    height: 36px;
    border: 2px solid rgba(255, 255, 255, 0.7);
    border-radius: 12px;
    display: block;
    opacity: 0.85;
    transition: opacity 0.2s ease, transform 0.2s ease;
}
.hero-scroll:hover { opacity: 1; transform: translateX(-50%) translateY(2px); }
.hero-scroll-dot {
    display: block;
    width: 3px;
    height: 7px;
    background: rgba(255, 255, 255, 0.85);
    border-radius: 2px;
    margin: 6px auto 0;
    animation: scrollDot 1.8s ease-in-out infinite;
}
@keyframes scrollDot {
    0%, 100% { opacity: 0; transform: translateY(0); }
    50%      { opacity: 1; transform: translateY(8px); }
}
@media (prefers-reduced-motion: reduce) {
    .hero-scroll-dot { animation: none; opacity: 1; }
}

/* ─── Reveal-on-scroll animation ──────────────────────────────────────── */

.reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}
.reveal-delay-1 { transition-delay: 0.12s; }
.reveal-delay-2 { transition-delay: 0.24s; }
.reveal-delay-3 { transition-delay: 0.36s; }

@media (prefers-reduced-motion: reduce) {
    .reveal { opacity: 1; transform: none; transition: none; }
}

/* ─── Values section ──────────────────────────────────────────────────── */

.values {
    background: var(--paper-2);
    padding: clamp(56px, 9vw, 96px) clamp(20px, 5vw, 48px);
}
.values-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: clamp(20px, 3vw, 32px);
}
@media (max-width: 760px) {
    .values-inner { grid-template-columns: 1fr; }
}
.value-card {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 32px 28px;
    box-shadow: var(--shadow);
    text-align: left;
}
.value-icon {
    display: inline-flex;
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: rgba(102, 192, 206, 0.18);
    color: var(--teal-2);
    font-size: 20px;
    margin-bottom: 18px;
}
.value-card h2 {
    margin: 0 0 8px;
    font-size: 20px;
    font-weight: 600;
    color: var(--navy);
    letter-spacing: -0.01em;
}
.value-card p {
    margin: 0;
    color: var(--ink-soft);
    font-size: 15px;
    line-height: 1.65;
}

/* ─── About page ──────────────────────────────────────────────────────── */

.about {
    padding: clamp(56px, 9vw, 112px) clamp(20px, 5vw, 48px) clamp(40px, 6vw, 80px);
    background:
        radial-gradient(ellipse at 70% -10%, rgba(102, 192, 206, 0.18) 0%, transparent 55%),
        var(--paper);
}
.about-inner {
    max-width: 760px;
    margin: 0 auto;
}
.about-title {
    font-size: clamp(36px, 6vw, 64px);
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--navy);
    margin: 0 0 32px;
    line-height: 1.05;
}
.about-lead {
    font-size: clamp(17px, 2vw, 20px);
    color: var(--ink);
    margin: 0 0 22px;
    line-height: 1.65;
}
.about-properties {
    list-style: none;
    padding: 0;
    margin: 56px 0 0;
    border-top: 1px solid var(--line);
}
.about-properties li {
    display: flex;
    align-items: baseline;
    gap: 14px;
    padding: 18px 0;
    border-bottom: 1px solid var(--line);
    flex-wrap: wrap;
}
.about-properties a {
    font-weight: 600;
    color: var(--navy);
    min-width: 12ch;
    border-bottom: 1px solid transparent;
}
.about-properties a:hover {
    color: var(--teal-2);
    border-bottom-color: var(--teal-2);
}
.about-properties span {
    color: var(--ink-soft);
    font-size: 15px;
    flex: 1 1 280px;
}

/* ─── Legal / privacy page ────────────────────────────────────────────── */

.legal {
    padding: clamp(48px, 7vw, 96px) clamp(20px, 5vw, 48px);
    background: var(--paper);
}
.legal-inner { max-width: 720px; margin: 0 auto; }
.legal h1 {
    font-size: clamp(28px, 4.5vw, 44px);
    font-weight: 700;
    color: var(--navy);
    margin: 0 0 12px;
    letter-spacing: -0.01em;
}
.legal h2 {
    font-size: 18px;
    font-weight: 600;
    color: var(--navy);
    margin: 32px 0 8px;
}
.legal p { color: var(--ink-soft); margin: 0 0 14px; line-height: 1.65; }
.legal em { color: var(--ink-soft); }
.legal a { border-bottom: 1px solid currentColor; }

/* ─── Footer ──────────────────────────────────────────────────────────── */

.site-footer {
    border-top: 1px solid var(--line);
    background: var(--navy);
    color: rgba(255, 255, 255, 0.78);
    padding: 22px clamp(16px, 4vw, 36px);
    padding-bottom: max(22px, env(safe-area-inset-bottom));
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    letter-spacing: 0.02em;
}
.site-footer .sep { color: rgba(255, 255, 255, 0.35); }
.site-footer a {
    color: var(--teal);
    text-decoration: none;
    border-bottom: 1px solid rgba(102, 192, 206, 0.4);
}
.site-footer a:hover { color: #fff; border-bottom-color: #fff; }
