:root {
    --ink: #17212b;
    --ink-soft: #33424d;
    --paper: #f6f4ed;
    --white: #ffffff;
    --acid: #caff63;
    --blue: #2446c8;
    --coral: #ff7557;
    --line: rgba(23, 33, 43, 0.16);
    --muted: #66727b;
    --radius-lg: 28px;
    --radius-md: 18px;
    --shadow: 0 28px 80px rgba(23, 33, 43, 0.13);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--ink);
    background: var(--paper);
    font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 16px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}

button,
input,
textarea {
    font: inherit;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

a {
    color: inherit;
}

.skip-link {
    position: fixed;
    z-index: 100;
    top: 12px;
    left: 12px;
    padding: 10px 16px;
    color: var(--white);
    background: var(--ink);
    border-radius: 8px;
    transform: translateY(-180%);
}

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

.site-header {
    position: relative;
    z-index: 10;
    display: flex;
    width: min(1180px, calc(100% - 48px));
    min-height: 96px;
    margin: 0 auto;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--line);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    color: var(--ink);
    font-size: 0.86rem;
    font-weight: 850;
    letter-spacing: 0.18em;
    text-decoration: none;
}

.brand-mark {
    position: relative;
    display: grid;
    width: 34px;
    height: 34px;
    grid-template-columns: 1fr 1fr;
    gap: 3px;
    padding: 5px;
    overflow: hidden;
    background: var(--ink);
    border-radius: 50%;
}

.brand-mark span {
    background: var(--acid);
    border-radius: 10px 10px 2px 10px;
}

.brand-mark span:last-child {
    transform: translateY(6px);
    border-radius: 2px 10px 10px 10px;
}

.site-header nav {
    display: flex;
    align-items: center;
    gap: 34px;
}

.site-header nav a {
    position: relative;
    font-size: 0.82rem;
    font-weight: 750;
    text-decoration: none;
}

.site-header nav a::after {
    position: absolute;
    right: 0;
    bottom: -6px;
    left: 0;
    height: 2px;
    background: var(--ink);
    content: "";
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 180ms ease;
}

.site-header nav a:hover::after,
.site-header nav a:focus-visible::after {
    transform: scaleX(1);
    transform-origin: left;
}

.hero {
    position: relative;
    display: grid;
    width: min(1180px, calc(100% - 48px));
    min-height: 660px;
    margin: 0 auto;
    grid-template-columns: minmax(0, 1.02fr) minmax(420px, 0.98fr);
    align-items: center;
    gap: 60px;
    overflow: hidden;
}

.hero-copy {
    position: relative;
    z-index: 2;
    padding: 72px 0 84px;
}

.eyebrow {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 22px;
    font-size: 0.69rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.eyebrow > span {
    display: inline-block;
    width: 28px;
    height: 2px;
    background: currentColor;
}

.hero h1,
.section-heading h2,
.project-copy h3 {
    margin: 0;
    font-family: Georgia, "Times New Roman", serif;
    font-weight: 400;
    letter-spacing: -0.055em;
}

.hero h1 {
    max-width: 690px;
    font-size: clamp(4.5rem, 8vw, 7.9rem);
    line-height: 0.82;
}

.hero h1 em {
    color: var(--blue);
    font-weight: 400;
}

.hero-intro {
    max-width: 560px;
    margin: 34px 0 32px;
    color: var(--ink-soft);
    font-size: clamp(1.04rem, 1.5vw, 1.22rem);
}

.button {
    display: inline-flex;
    min-height: 54px;
    padding: 0 22px;
    align-items: center;
    justify-content: center;
    gap: 28px;
    border: 0;
    border-radius: 999px;
    cursor: pointer;
    font-size: 0.82rem;
    font-weight: 800;
    text-decoration: none;
    transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.button:hover {
    transform: translateY(-2px);
}

.button:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
a:focus-visible {
    outline: 3px solid var(--coral);
    outline-offset: 3px;
}

.button-dark {
    color: var(--white);
    background: var(--ink);
    box-shadow: 0 10px 24px rgba(23, 33, 43, 0.18);
}

.button-dark:hover {
    box-shadow: 0 16px 30px rgba(23, 33, 43, 0.24);
}

.hero-art {
    position: relative;
    width: min(100%, 520px);
    aspect-ratio: 1;
    justify-self: end;
}

.hero-art::before {
    position: absolute;
    inset: 5%;
    border: 1px solid var(--line);
    border-radius: 50%;
    content: "";
}

.orbit {
    position: absolute;
    border: 1px dashed rgba(23, 33, 43, 0.24);
    border-radius: 50%;
}

.orbit-one {
    inset: 15%;
}

.orbit-two {
    inset: 27%;
}

.hero-qr {
    position: absolute;
    z-index: 2;
    top: 50%;
    left: 50%;
    width: 54%;
    aspect-ratio: 1;
    background: var(--white);
    border: 10px solid var(--white);
    border-radius: 24px;
    box-shadow: var(--shadow);
    object-fit: cover;
    transform: translate(-50%, -50%) rotate(5deg);
}

.hero-art > p {
    position: absolute;
    z-index: 3;
    right: 0;
    bottom: 16%;
    margin: 0;
    padding: 13px 18px;
    color: var(--white);
    background: var(--blue);
    border-radius: 13px;
    font-size: 0.72rem;
    line-height: 1.3;
    transform: rotate(-6deg);
}

.hero-art > p strong {
    color: var(--acid);
    font-size: 1.1rem;
    letter-spacing: 0.08em;
}

.tool-section {
    padding: 92px max(24px, calc((100% - 1180px) / 2)) 104px;
    color: var(--white);
    background: var(--ink);
}

.ad-placement {
    width: 100%;
    min-width: 250px;
    margin: 0 auto 56px;
    overflow: hidden;
    text-align: center;
}

.ad-placement .adsbygoogle {
    width: 100%;
}

.ad-placement-dark {
    color: var(--white);
}

.section-heading {
    display: flex;
    margin-bottom: 48px;
    align-items: end;
    justify-content: space-between;
    gap: 60px;
}

.section-heading h2 {
    font-size: clamp(3.5rem, 6.5vw, 6.4rem);
    line-height: 0.92;
}

.section-heading > p {
    max-width: 440px;
    margin: 0 0 8px;
    color: #bcc5ca;
    font-size: 1rem;
}

.eyebrow-light {
    color: var(--acid);
}

.generator-shell {
    display: grid;
    overflow: hidden;
    color: var(--ink);
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: 0 32px 90px rgba(0, 0, 0, 0.22);
    grid-template-columns: minmax(0, 1.05fr) minmax(380px, 0.95fr);
}

.generator-form,
.preview-panel {
    padding: clamp(28px, 4vw, 54px);
}

.generator-form {
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.field-block,
.color-fieldset {
    margin: 0;
    padding: 0;
    border: 0;
}

.label-row,
.color-fieldset legend {
    font-size: 0.78rem;
    font-weight: 800;
}

.label-row {
    display: flex;
    margin-bottom: 9px;
    align-items: center;
    justify-content: space-between;
}

.label-row output {
    color: var(--muted);
    font-size: 0.69rem;
    font-weight: 650;
}

textarea {
    width: 100%;
    min-height: 126px;
    padding: 17px 18px;
    resize: vertical;
    color: var(--ink);
    background: #f4f3ef;
    border: 1px solid transparent;
    border-radius: 13px;
    line-height: 1.5;
}

textarea::placeholder {
    color: #929ba0;
}

textarea:hover,
textarea:focus {
    background: var(--white);
    border-color: #aab2b6;
}

.text-button {
    margin-top: 8px;
    padding: 0;
    color: var(--blue);
    background: transparent;
    border: 0;
    border-bottom: 1px solid currentColor;
    cursor: pointer;
    font-size: 0.7rem;
    font-weight: 750;
}

.color-fieldset {
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr);
    column-gap: 12px;
}

.color-fieldset legend {
    float: none;
    width: auto;
    margin-bottom: 9px;
    padding: 0;
}

.color-topline {
    display: grid;
    min-width: 0;
    grid-column: 1 / -1;
    grid-template-columns: 52px minmax(0, 1fr);
    align-items: stretch;
    gap: 12px;
}

.native-color {
    position: relative;
    width: 52px;
    flex: 0 0 52px;
    cursor: pointer;
}

.native-color input {
    display: block;
    width: 52px;
    height: 48px;
    padding: 4px;
    appearance: none;
    background: var(--white);
    border: 1px solid rgba(23, 33, 43, 0.13);
    border-radius: 10px;
    cursor: pointer;
}

.native-color input::-webkit-color-swatch-wrapper {
    padding: 0;
}

.native-color input::-webkit-color-swatch {
    border: 0;
    border-radius: 6px;
}

.native-color input::-moz-color-swatch {
    border: 0;
    border-radius: 6px;
}

.hex-field {
    display: flex;
    min-width: 0;
    height: 48px;
    flex: 1;
    align-items: center;
    overflow: hidden;
    background: #f4f3ef;
    border: 1px solid transparent;
    border-radius: 10px;
}

.hex-field:focus-within {
    background: var(--white);
    border-color: #aab2b6;
}

.hex-field span {
    padding: 0 10px 0 13px;
    flex: 0 0 auto;
    color: var(--muted);
    font-size: 0.64rem;
    font-weight: 750;
}

.hex-field input {
    min-width: 0;
    height: 100%;
    padding: 0;
    flex: 1;
    color: var(--ink);
    background: transparent;
    border: 0;
    outline: 0;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 0.86rem;
    font-weight: 750;
    text-transform: uppercase;
}

.rgb-sliders {
    display: grid;
    margin-top: 12px;
    grid-column: 2;
    gap: 8px;
}

.rgb-sliders label {
    display: grid;
    grid-template-columns: 15px 1fr 28px;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    font-size: 0.62rem;
    font-weight: 800;
}

.rgb-sliders output {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

input[type="range"] {
    width: 100%;
    height: 3px;
    margin: 0;
    appearance: none;
    background: #dfe2e3;
    border-radius: 99px;
    cursor: pointer;
}

input[type="range"]::-webkit-slider-thumb {
    width: 15px;
    height: 15px;
    appearance: none;
    background: var(--white);
    border: 4px solid var(--ink);
    border-radius: 50%;
}

input[type="range"]::-moz-range-thumb {
    width: 9px;
    height: 9px;
    background: var(--white);
    border: 3px solid var(--ink);
    border-radius: 50%;
}

.presets {
    display: flex;
    align-items: center;
    gap: 9px;
}

.presets > span {
    margin-right: 5px;
    color: var(--muted);
    font-size: 0.68rem;
    font-weight: 750;
}

.presets button {
    position: relative;
    width: 31px;
    height: 31px;
    padding: 0;
    overflow: hidden;
    background: linear-gradient(135deg, var(--preset-a) 0 50%, var(--preset-b) 50% 100%);
    border: 2px solid var(--white);
    border-radius: 50%;
    box-shadow: 0 0 0 1px rgba(23, 33, 43, 0.2);
    cursor: pointer;
}

.presets button:nth-of-type(1) { --preset-a: #17212b; --preset-b: #ffffff; }
.presets button:nth-of-type(2) { --preset-a: #2446c8; --preset-b: #fff8e7; }
.presets button:nth-of-type(3) { --preset-a: #591d4a; --preset-b: #ffe9e4; }
.presets button:nth-of-type(4) { --preset-a: #123f32; --preset-b: #e5f7cc; }

.contrast-status {
    display: flex;
    min-height: 38px;
    padding: 8px 12px;
    align-items: center;
    gap: 9px;
    color: #29624c;
    background: #eef9e7;
    border-radius: 10px;
    font-size: 0.68rem;
    font-weight: 750;
}

.status-dot {
    width: 8px;
    height: 8px;
    background: #3fa46f;
    border-radius: 50%;
    box-shadow: 0 0 0 4px rgba(63, 164, 111, 0.14);
}

.contrast-status.is-warning {
    color: #8b3d2f;
    background: #fff0eb;
}

.contrast-status.is-warning .status-dot {
    background: var(--coral);
    box-shadow: 0 0 0 4px rgba(255, 117, 87, 0.14);
}

.generate-button {
    width: 100%;
    justify-content: space-between;
}

.button-accent {
    color: var(--ink);
    background: var(--acid);
}

.button-accent:hover {
    background: #d8ff8d;
    box-shadow: 0 12px 28px rgba(117, 169, 28, 0.2);
}

.generate-button:disabled {
    cursor: wait;
    opacity: 0.65;
    transform: none;
}

.form-message {
    min-height: 1.25em;
    margin: -16px 2px 0;
    color: #a23e2c;
    font-size: 0.72rem;
    font-weight: 700;
}

.form-message.is-success {
    color: #246748;
}

.preview-panel {
    display: flex;
    min-width: 0;
    flex-direction: column;
    background: #eeece5;
    border-left: 1px solid #dad8d0;
}

.preview-topline {
    display: flex;
    margin-bottom: 22px;
    align-items: center;
    justify-content: space-between;
    font-size: 0.72rem;
    font-weight: 800;
}

.size-pill {
    padding: 6px 10px;
    color: var(--muted);
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(23, 33, 43, 0.1);
    border-radius: 999px;
    font-size: 0.61rem;
    letter-spacing: 0.04em;
}

.preview-stage {
    position: relative;
    display: grid;
    width: min(100%, 500px);
    aspect-ratio: 1;
    margin: auto;
    place-items: center;
    overflow: hidden;
    background-color: #e3e1d9;
    background-image: linear-gradient(45deg, rgba(255,255,255,.42) 25%, transparent 25%), linear-gradient(-45deg, rgba(255,255,255,.42) 25%, transparent 25%), linear-gradient(45deg, transparent 75%, rgba(255,255,255,.42) 75%), linear-gradient(-45deg, transparent 75%, rgba(255,255,255,.42) 75%);
    background-position: 0 0, 0 10px, 10px -10px, -10px 0;
    background-size: 20px 20px;
    border-radius: 18px;
}

.empty-preview {
    text-align: center;
}

.empty-icon {
    display: grid;
    width: 68px;
    height: 68px;
    margin: 0 auto 15px;
    place-items: center;
    color: var(--muted);
    background: rgba(255, 255, 255, 0.68);
    border: 1px solid rgba(23, 33, 43, 0.1);
    border-radius: 18px;
    font-family: Georgia, serif;
    font-size: 2rem;
}

.empty-preview p {
    margin: 0;
    color: var(--muted);
    font-size: 0.8rem;
    font-weight: 700;
}

#qr-preview {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

#qr-preview[hidden] {
    display: none;
}

.preview-actions {
    display: flex;
    margin-top: 20px;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.preview-actions[hidden] {
    display: none;
}

.preview-actions p {
    margin: 0;
    color: var(--muted);
    font-size: 0.68rem;
}

.preview-actions strong {
    color: var(--ink);
    font-variant-numeric: tabular-nums;
}

.button-light {
    min-height: 48px;
    color: var(--white);
    background: var(--ink);
}

.projects-section {
    width: min(1180px, calc(100% - 48px));
    margin: 0 auto;
    padding: 104px 0 118px;
}

.projects-heading > p {
    color: var(--ink-soft);
}

.projects-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 22px;
}

.project-card {
    display: flex;
    min-width: 0;
    flex-direction: column;
    overflow: hidden;
    color: var(--ink);
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    text-decoration: none;
    transition: transform 220ms ease, box-shadow 220ms ease;
}

.project-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow);
}

.project-visual {
    position: relative;
    min-height: 290px;
    overflow: hidden;
}

.picture-visual {
    background: #b7d8ff;
}

.sun {
    position: absolute;
    top: 44px;
    right: 70px;
    width: 72px;
    height: 72px;
    background: #ffdf67;
    border-radius: 50%;
    box-shadow: 0 0 0 18px rgba(255, 223, 103, 0.25);
}

.mountain {
    position: absolute;
    bottom: -80px;
    width: 420px;
    height: 280px;
    border-radius: 48% 52% 0 0;
    transform: rotate(20deg);
}

.mountain-one {
    left: -80px;
    background: #336759;
}

.mountain-two {
    right: -170px;
    bottom: -130px;
    background: #caff63;
    transform: rotate(-18deg);
}

.picture-count {
    position: absolute;
    top: 34px;
    left: 36px;
    color: var(--ink);
    font-family: Georgia, serif;
    font-size: clamp(3.2rem, 7vw, 5rem);
    letter-spacing: -0.07em;
    line-height: 1;
}

.language-visual {
    background: var(--blue);
}

.speech {
    position: absolute;
    padding: 13px 22px 15px;
    border-radius: 999px 999px 999px 8px;
    font-family: Georgia, serif;
    font-size: 1.4rem;
    font-style: italic;
}

.speech-one {
    top: 38px;
    left: 9%;
    color: var(--ink);
    background: var(--acid);
    transform: rotate(-5deg);
}

.speech-two {
    top: 116px;
    right: 10%;
    color: var(--ink);
    background: var(--white);
    transform: rotate(5deg);
}

.speech-three {
    bottom: 36px;
    left: 28%;
    color: var(--white);
    background: var(--coral);
    transform: rotate(-2deg);
}

.play-dot {
    position: absolute;
    right: 24%;
    bottom: 40px;
    display: grid;
    width: 54px;
    height: 54px;
    place-items: center;
    color: var(--blue);
    background: var(--white);
    border-radius: 50%;
    font-size: 0.8rem;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.18);
}

.project-copy {
    display: grid;
    min-height: 348px;
    padding: 36px;
    grid-template-rows: auto auto 1fr auto;
}

.project-number {
    margin: 0 0 12px;
    color: var(--blue);
    font-size: 0.65rem;
    font-weight: 850;
    letter-spacing: 0.13em;
}

.project-copy h3 {
    font-size: clamp(2.6rem, 4.6vw, 4.2rem);
    line-height: 0.92;
}

.project-copy > p:not(.project-number) {
    max-width: 470px;
    margin: 24px 0 32px;
    color: var(--ink-soft);
    font-size: 0.91rem;
}

.project-link {
    display: flex;
    padding-top: 19px;
    align-items: center;
    justify-content: space-between;
    border-top: 1px solid var(--line);
    font-size: 0.75rem;
    font-weight: 800;
}

.project-link b {
    font-size: 1.1rem;
    transition: transform 180ms ease;
}

.project-card:hover .project-link b {
    transform: translate(3px, -3px);
}

.site-footer {
    display: grid;
    padding: 48px max(24px, calc((100% - 1180px) / 2));
    color: #c6ced2;
    background: #10171d;
    grid-template-columns: 1fr 2fr 1.25fr;
    align-items: center;
    gap: 30px;
}

.footer-brand {
    color: var(--white);
}

.site-footer p {
    margin: 0;
    font-size: 0.66rem;
    line-height: 1.6;
}

.site-footer p:last-child {
    text-align: right;
}

@media (max-width: 960px) {
    .hero {
        min-height: 580px;
        grid-template-columns: 1fr 360px;
        gap: 20px;
    }

    .hero h1 {
        font-size: clamp(4.2rem, 9vw, 6.4rem);
    }

    .generator-shell {
        grid-template-columns: 1fr;
    }

    .preview-panel {
        border-top: 1px solid #dad8d0;
        border-left: 0;
    }

    .preview-stage {
        max-width: 510px;
    }

    .site-footer {
        grid-template-columns: 1fr 2fr;
    }

    .site-footer p:last-child {
        grid-column: 2;
        text-align: left;
    }
}

@media (max-width: 720px) {
    .site-header,
    .hero,
    .projects-section {
        width: min(100% - 32px, 1180px);
    }

    .site-header {
        min-height: 76px;
    }

    .site-header nav {
        gap: 18px;
    }

    .site-header nav a {
        font-size: 0.72rem;
    }

    .hero {
        display: block;
        min-height: 0;
        padding-bottom: 64px;
        overflow: visible;
    }

    .hero-copy {
        padding: 64px 0 34px;
    }

    .hero h1 {
        font-size: clamp(4.05rem, 18vw, 6rem);
    }

    .hero-art {
        width: min(100%, 420px);
        margin: 0 auto;
    }

    .tool-section {
        padding-top: 70px;
        padding-bottom: 72px;
    }

    .ad-placement {
        margin-bottom: 38px;
    }

    .section-heading {
        display: block;
        margin-bottom: 34px;
    }

    .section-heading h2 {
        font-size: clamp(3.4rem, 15vw, 5rem);
    }

    .section-heading > p {
        margin-top: 24px;
    }

    .generator-form,
    .preview-panel {
        padding: 28px 20px;
    }

    .projects-section {
        padding: 76px 0 84px;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }

    .project-visual {
        min-height: 250px;
    }

    .site-footer {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .site-footer p:last-child {
        grid-column: auto;
    }
}

@media (max-width: 480px) {
    .brand > span:last-child {
        display: none;
    }

    .footer-brand > span:last-child {
        display: inline;
    }

    .hero-intro {
        margin-top: 26px;
    }

    .generator-shell,
    .project-card {
        border-radius: 20px;
    }

    .generator-form {
        gap: 25px;
    }

    .preview-actions {
        align-items: stretch;
        flex-direction: column;
        text-align: center;
    }

    .project-copy {
        min-height: 330px;
        padding: 28px;
    }
}

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

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