:root {
    --cream: #fff9f4;
    --surface: #fffdf9;
    --navy: #071b4a;
    --rust: #eb3f1d;
    --rust-dark: #d93617;
    --gold: #ffb33f;
    --gold-soft: #fff0d8;
    --border: #efcdbd;
    --muted: #5f6673;
    --peach: #fff4ed;
    --shadow: 0 22px 60px rgb(88 45 24 / 10%);
    --page-gutter: clamp(1.25rem, 4vw, 2.5rem);
    --content-width: 80rem;
}

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

html {
    scroll-behavior: smooth;
}

body {
    min-width: 20rem;
    margin: 0;
    background: var(--cream);
    color: var(--navy);
    font-family: Nunito, ui-rounded, "SF Pro Rounded", system-ui, sans-serif;
    font-size: 1rem;
    -webkit-font-smoothing: antialiased;
}

button,
input {
    font: inherit;
}

a {
    color: inherit;
}

.skip-link {
    position: fixed;
    z-index: 100;
    top: 0.75rem;
    left: 0.75rem;
    transform: translateY(-160%);
    border-radius: 0.6rem;
    background: var(--navy);
    color: white;
    padding: 0.7rem 1rem;
    font-weight: 800;
}

.skip-link:focus {
    transform: translateY(0);
}

.site-header {
    position: absolute;
    z-index: 20;
    inset: 0 0 auto;
}

.nav {
    width: min(100%, var(--content-width));
    min-height: 6.4rem;
    margin: 0 auto;
    padding: 1.25rem var(--page-gutter);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}

.brand {
    display: inline-flex;
    border-radius: 0.75rem;
}

.brand img {
    display: block;
    width: auto;
    height: clamp(2.7rem, 4vw, 3.25rem);
}

.nav-link {
    padding: 0.7rem 0.25rem;
    font-size: 1rem;
    font-weight: 800;
    text-decoration: none;
    text-underline-offset: 0.35rem;
}

.nav-link:hover {
    color: var(--rust);
    text-decoration: underline;
}

.hero {
    position: relative;
    isolation: isolate;
    min-height: calc(100svh - 4.1rem);
    overflow: hidden;
    background: #fceee3;
}

.hero::after {
    content: "";
    position: absolute;
    z-index: -1;
    inset: 0;
    background: linear-gradient(90deg, rgb(255 249 244 / 17%) 0%, transparent 30%, transparent 72%, rgb(255 249 244 / 12%) 100%);
    pointer-events: none;
}

.hero-scenery,
.hero-scenery img {
    position: absolute;
    z-index: -2;
    inset: 0;
    width: 100%;
    height: 100%;
}

.hero-scenery img {
    object-fit: cover;
    object-position: center 38%;
}

.hero-grid {
    width: min(100%, var(--content-width));
    min-height: calc(100svh - 4.1rem);
    margin: 0 auto;
    padding: clamp(8.5rem, 14vh, 10.5rem) var(--page-gutter) clamp(7.8rem, 16vh, 10rem);
    display: grid;
    grid-template-columns: minmax(0, 0.88fr) minmax(31rem, 1.12fr);
    align-items: center;
    gap: clamp(3rem, 6vw, 5rem);
}

.hero-copy {
    max-width: 36rem;
}

h1,
h2,
p {
    margin-top: 0;
}

h1 {
    max-width: 35rem;
    margin-bottom: 1.5rem;
    font-size: clamp(3.35rem, 5.4vw, 5rem);
    font-weight: 800;
    letter-spacing: -0.047em;
    line-height: 1.025;
    text-wrap: balance;
}

.hero-intro {
    max-width: 35rem;
    margin-bottom: 1.9rem;
    color: var(--muted);
    font-size: clamp(1.08rem, 1.55vw, 1.24rem);
    font-weight: 600;
    line-height: 1.65;
}

.waitlist-form label {
    display: block;
    margin-bottom: 0.55rem;
    font-weight: 800;
}

.form-row {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.65rem;
}

.email-icon {
    position: absolute;
    z-index: 1;
    left: 1rem;
    top: 50%;
    width: 1.35rem;
    height: 1.35rem;
    transform: translateY(-50%);
    color: var(--muted);
    pointer-events: none;
}

.email-icon svg,
.feature-list svg {
    width: 100%;
    height: 100%;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
}

input[type="email"] {
    min-width: 0;
    height: 3.75rem;
    padding: 0 1rem 0 3rem;
    border: 1px solid var(--border);
    border-radius: 0.85rem;
    outline: 0;
    background: rgb(255 255 255 / 91%);
    color: var(--navy);
    font-size: 1rem;
    font-weight: 700;
    box-shadow: 0 8px 25px rgb(88 45 24 / 4%);
}

input[type="email"]::placeholder {
    color: #89909c;
    font-weight: 600;
}

input[type="email"]:focus {
    border-color: var(--rust);
    box-shadow: 0 0 0 3px rgb(235 63 29 / 14%);
}

.form-row button {
    min-height: 3.75rem;
    border: 1px solid var(--rust);
    border-radius: 0.85rem;
    background: var(--rust);
    color: white;
    padding: 0.8rem 1.35rem;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 800;
    box-shadow: 0 10px 24px rgb(235 63 29 / 20%);
    transition: transform 150ms ease, background-color 150ms ease, box-shadow 150ms ease;
}

.form-row button:hover {
    transform: translateY(-2px);
    background: var(--rust-dark);
    box-shadow: 0 13px 27px rgb(235 63 29 / 23%);
}

.form-row button:disabled {
    cursor: wait;
    opacity: 0.72;
    transform: none;
}

.form-note,
.form-status {
    margin: 0.85rem 0 0;
    color: var(--muted);
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.45;
}

.form-note span {
    color: var(--gold);
}

.form-status {
    min-height: 1.3rem;
    margin-top: 0.35rem;
    color: var(--rust);
    font-weight: 800;
}

.form-status.is-success {
    color: #24704a;
}

.honeypot {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    clip: rect(0 0 0 0) !important;
    clip-path: inset(50%) !important;
    white-space: nowrap !important;
}

.preview-card {
    position: relative;
    scroll-margin-top: 2rem;
    padding: clamp(2rem, 4vw, 3rem);
    border: 1px solid rgb(239 205 189 / 94%);
    border-radius: 2rem;
    background: rgb(255 253 249 / 94%);
    box-shadow: var(--shadow);
}

.status-label {
    display: inline-flex;
    margin-bottom: 1rem;
    border: 1px solid var(--gold);
    border-radius: 0.65rem;
    padding: 0.4rem 0.72rem;
    color: #cf7e00;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    line-height: 1;
    text-transform: uppercase;
}

.preview-card h2 {
    max-width: 31rem;
    margin-bottom: 1.5rem;
    font-size: clamp(1.75rem, 2.6vw, 2.35rem);
    font-weight: 800;
    letter-spacing: -0.025em;
    line-height: 1.13;
    text-wrap: balance;
}

.feature-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.feature-list li {
    display: grid;
    grid-template-columns: 1.8rem 1fr;
    align-items: center;
    gap: 0.9rem;
    padding: 0.9rem 0;
    border-top: 1px solid rgb(239 205 189 / 76%);
    font-size: 1rem;
    font-weight: 800;
    line-height: 1.35;
}

.feature-list li:first-child {
    border-top: 0;
    padding-top: 0;
}

.feature-list svg {
    color: #d98a0a;
}

.reading-sample {
    position: relative;
    margin-top: 1.25rem;
    padding: 1.25rem 7.5rem 0 0;
    border-top: 1px solid var(--border);
}

.reading-sample p:first-child {
    margin-bottom: 0.65rem;
    font-family: "Noto Serif TC", "Songti TC", STSong, serif;
    font-size: clamp(1.15rem, 1.9vw, 1.4rem);
    font-weight: 600;
    line-height: 1.85;
}

.reading-sample p:first-child span {
    border-radius: 0.35rem;
    background: var(--gold-soft);
    padding: 0 0.16rem;
    text-decoration: underline;
    text-decoration-color: var(--gold);
    text-decoration-thickness: 2px;
    text-underline-offset: 0.22rem;
}

.translation {
    margin: 0;
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 600;
    line-height: 1.45;
}

.mascot {
    position: absolute;
    z-index: 2;
    right: -1.15rem;
    bottom: -2.75rem;
    width: clamp(7rem, 11vw, 9rem);
    height: auto;
    filter: drop-shadow(0 14px 14px rgb(88 45 24 / 16%));
}

.site-footer {
    min-height: 4.1rem;
    display: grid;
    place-items: center;
    border-top: 1px solid rgb(239 205 189 / 76%);
    background: var(--cream);
    padding: 1rem var(--page-gutter);
    text-align: center;
}

.site-footer p {
    margin: 0;
    color: var(--muted);
    font-size: 0.86rem;
    font-weight: 600;
}

.site-footer span:first-child {
    color: var(--navy);
    font-weight: 800;
}

.site-footer span[aria-hidden] {
    margin: 0 0.6rem;
    color: var(--gold);
}

:focus-visible {
    outline: 2px solid var(--rust);
    outline-offset: 4px;
}

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

@media (max-width: 63.99rem) {
    .hero {
        min-height: auto;
    }

    .hero-grid {
        min-height: auto;
        grid-template-columns: 1fr;
        padding-top: 8.75rem;
        padding-bottom: 10rem;
    }

    .hero-copy {
        max-width: 42rem;
    }

    h1 {
        max-width: 42rem;
    }

    .preview-card {
        width: min(100%, 42rem);
        margin-left: auto;
        margin-right: auto;
    }
}

@media (max-width: 39.99rem) {
    .nav {
        min-height: 5.75rem;
    }

    .brand img {
        height: 2.65rem;
    }

    .nav-link {
        font-size: 0.9rem;
    }

    .hero-grid {
        gap: 3rem;
        padding-top: 7.4rem;
        padding-bottom: 7.5rem;
    }

    h1 {
        font-size: clamp(2.8rem, 13vw, 3.55rem);
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .email-icon {
        top: 1.875rem;
    }

    .form-row button {
        width: 100%;
    }

    .preview-card {
        padding: 1.65rem 1.4rem 2rem;
        border-radius: 1.55rem;
    }

    .reading-sample {
        padding-right: 4.6rem;
    }

    .mascot {
        right: -0.6rem;
        bottom: -3.4rem;
        width: 6.5rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}
