/* =============================================================
   Arithmophone.com — landing page
   Palette & typography mirror the iOS Pentatone app.
   ============================================================= */

:root {
    /* App palette (sourced from Pentatone .xcassets colorsets) */
    --background:   #1A1417;   /* BackgroundColour — warm near-black */
    --highlight:    #8DB35E;   /* HighlightColour  — fresh leafy green */
    --support:      #67413A;   /* SupportColour    — dusty brown */
    --key-1:        #D9CBAE;   /* KeyColour1 — cream */
    --key-2:        #AF4B3B;   /* KeyColour2 — terracotta */
    --key-3:        #7C8381;   /* KeyColour3 — muted gray */
    --key-4:        #C18549;   /* KeyColour4 — ochre */
    --key-5:        #384D64;   /* KeyColour5 — slate blue */

    /* Derived */
    --text:         var(--key-1);                 /* default body text */
    --text-soft:    rgba(217, 203, 174, 0.72);    /* muted body text */
    --text-dim:     rgba(217, 203, 174, 0.50);    /* captions/meta */

    /* Spacing scale */
    --space-1: 0.5rem;
    --space-2: 1rem;
    --space-3: 1.5rem;
    --space-4: 2rem;
    --space-5: 3rem;
    --space-6: 4rem;

    /* Radii */
    --radius-sm: 10px;
    --radius-md: 18px;
    --radius-lg: 28px;

    /* Layout */
    --page-max:  920px;
    --page-pad:  clamp(1.25rem, 4vw, 3rem);

    /* Type */
    --font-body:    'Montserrat Alternates', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    --font-display: 'Lobster Two', Georgia, 'Times New Roman', serif;
}

/* -------------------------------------------------------------
   Reset & base
   ------------------------------------------------------------- */

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

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

body {
    margin: 0;
    background: var(--background);
    color: var(--text);
    font-family: var(--font-body);
    font-weight: 400;
    line-height: 1.55;
    font-size: clamp(15.5px, 0.95rem + 0.25vw, 18px);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

p {
    margin: 0 0 var(--space-3);
}

p:last-child {
    margin-bottom: 0;
}

a {
    color: var(--highlight);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: color 160ms ease, border-color 160ms ease;
}

a:hover,
a:focus-visible {
    color: var(--key-1);
    border-bottom-color: currentColor;
}

a:focus-visible {
    outline: 2px solid var(--highlight);
    outline-offset: 3px;
    border-radius: 4px;
}

::selection {
    background: var(--highlight);
    color: var(--background);
}

/* -------------------------------------------------------------
   Page container
   ------------------------------------------------------------- */

.page {
    max-width: var(--page-max);
    margin: 0 auto;
    padding: var(--page-pad);
    padding-bottom: var(--space-5);
}

.section {
    margin-block: clamp(2.25rem, 4.5vw, 4rem);
}

.section__title {
    font-family: var(--font-body);
    font-weight: 700;
    font-size: clamp(1.15rem, 0.9rem + 1vw, 1.5rem);
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--highlight);
    margin: 0 0 var(--space-3);
}

.section__subtitle {
    font-family: var(--font-body);
    font-weight: 500;
    font-size: clamp(0.95rem, 0.85rem + 0.4vw, 1.05rem);
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--key-1);
    opacity: 0.85;
    margin: var(--space-4) 0 var(--space-3);
}

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

.wordmark {
    font-family: var(--font-display);
    font-style: italic;
    font-weight: 400;
    color: var(--key-1);
    letter-spacing: 0.005em;
}

/* -------------------------------------------------------------
   Hero
   ------------------------------------------------------------- */

.hero {
    text-align: center;
    padding-top: clamp(1.5rem, 4vw, 3rem);
    padding-bottom: clamp(0.5rem, 2vw, 1.5rem);
}

.hero__title {
    margin: var(--space-4) 0 0;
    font-weight: 400;
    line-height: 1.1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35em;
}

.hero__welcome {
    font-family: var(--font-body);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.32em;
    font-size: clamp(0.75rem, 0.6rem + 0.6vw, 0.95rem);
    color: var(--text-soft);
}

.hero__domain {
    /* font / colour come from the .wordmark class on the same element */
    font-size: clamp(2.2rem, 1.4rem + 3.8vw, 3.8rem);
    line-height: 1.1;
}

/* -------------------------------------------------------------
   Plus icon (the 5-key Pentatone mark, in pure CSS)
   ------------------------------------------------------------- */

.plus-icon {
    --plus-size: clamp(150px, 28vw, 230px);
    width: var(--plus-size);
    aspect-ratio: 1;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(3, 1fr);
    gap: 6%;
}

.key {
    border-radius: 22%;
    display: block;
    /* slight inner sheen so the keys feel tactile, like the iOS keys */
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.06),
        inset 0 -2px 0 rgba(0, 0, 0, 0.18);
    will-change: transform, filter;
}

.key--top    { grid-column: 2; grid-row: 1; background: var(--key-2); }
.key--left   { grid-column: 1; grid-row: 2; background: var(--key-3); }
.key--center { grid-column: 2; grid-row: 2; background: var(--key-1); }
.key--right  { grid-column: 3; grid-row: 2; background: var(--key-4); }
.key--bottom { grid-column: 2; grid-row: 3; background: var(--key-5); }

/* Subtle staggered "playing" pulse on the hero icon — a quiet nod
   to the "numbers into sounds" idea. Disabled for users who prefer
   reduced motion. */
@media (prefers-reduced-motion: no-preference) {
    .hero .plus-icon .key {
        animation: keyPulse 6.5s ease-in-out infinite;
    }
    .hero .plus-icon .key--top    { animation-delay: 0s; }
    .hero .plus-icon .key--right  { animation-delay: 0.45s; }
    .hero .plus-icon .key--bottom { animation-delay: 0.9s; }
    .hero .plus-icon .key--left   { animation-delay: 1.35s; }
    .hero .plus-icon .key--center { animation-delay: 1.8s; }
}

@keyframes keyPulse {
    0%, 100% { transform: scale(1);    filter: brightness(1); }
    6%       { transform: scale(1.04); filter: brightness(1.18); }
    14%      { transform: scale(1);    filter: brightness(1); }
}

/* Footer plus is smaller and static */
.footer__plus {
    --plus-size: 56px;
}

/* -------------------------------------------------------------
   Launch card + CTA
   ------------------------------------------------------------- */

.launch-card {
    background: linear-gradient(160deg,
        rgba(141, 179, 94, 0.10),
        rgba(141, 179, 94, 0.02) 60%);
    border: 1px solid rgba(141, 179, 94, 0.35);
    border-radius: var(--radius-lg);
    padding: clamp(1.5rem, 3vw, 2.25rem) clamp(1.25rem, 3vw, 2.25rem);
    text-align: center;
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.03) inset,
        0 18px 40px -28px rgba(0, 0, 0, 0.7);
}

.launch-card p {
    max-width: 56ch;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: var(--space-4);
    color: var(--key-1);
}

.cta {
    display: inline-block;
    background: var(--highlight);
    color: var(--background);
    font-family: var(--font-body);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    font-size: clamp(0.85rem, 0.75rem + 0.3vw, 0.95rem);
    padding: 0.95rem 1.6rem;
    border-radius: var(--radius-md);
    border: none;
    transition: transform 160ms ease, filter 160ms ease, background 160ms ease;
    box-shadow: 0 6px 18px -10px rgba(141, 179, 94, 0.7);
}

.cta:hover,
.cta:focus-visible {
    color: var(--background);
    background: #9CC56A;            /* slightly brighter green on hover */
    transform: translateY(-1px);
    filter: brightness(1.05);
    border-bottom-color: transparent;
}

.cta:active {
    transform: translateY(0);
}

/* -------------------------------------------------------------
   Pull quote (the "Beautiful, fun and inspiringly expressive" line)
   ------------------------------------------------------------- */

.pull-quote {
    margin: var(--space-4) 0 var(--space-4);
    padding: var(--space-3) var(--space-4);
    font-family: var(--font-display);
    font-style: italic;
    font-size: clamp(1.25rem, 0.9rem + 1.6vw, 1.85rem);
    line-height: 1.3;
    color: var(--key-1);
    border-left: 4px solid var(--highlight);
    background: linear-gradient(90deg,
        rgba(141, 179, 94, 0.08),
        transparent 70%);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

/* -------------------------------------------------------------
   Feature list (5 dots, one per key colour)
   ------------------------------------------------------------- */

.feature-list {
    list-style: none;
    padding: 0;
    margin: var(--space-3) 0 0;
    display: grid;
    gap: var(--space-2);
}

.feature-list li {
    display: grid;
    grid-template-columns: 1.2rem 1fr;
    align-items: start;
    gap: 0.9rem;
    padding: 0.55rem 0;
}

.dot {
    width: 0.9rem;
    height: 0.9rem;
    border-radius: 22%;
    margin-top: 0.45rem;
    flex-shrink: 0;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.08),
        inset 0 -1px 0 rgba(0, 0, 0, 0.18);
}

.dot--1 { background: var(--key-1); }
.dot--2 { background: var(--key-2); }
.dot--3 { background: var(--key-3); }
.dot--4 { background: var(--key-4); }
.dot--5 { background: var(--key-5); }

/* -------------------------------------------------------------
   Beta quotes grid
   ------------------------------------------------------------- */

.quote-grid {
    display: grid;
    gap: var(--space-2);
    grid-template-columns: 1fr;
    margin-top: var(--space-3);
}

@media (min-width: 880px) {
    .quote-grid {
        grid-template-columns: 1fr 1fr 1fr;
    }
}

.quote {
    margin: 0;
    padding: var(--space-3);
    font-size: 0.97rem;
    line-height: 1.5;
    color: var(--key-1);
    background: rgba(255, 255, 255, 0.02);
    border-radius: var(--radius-md);
    border-left: 3px solid var(--key-3);
    position: relative;
}

.quote--1 { border-left-color: var(--key-1); }
.quote--2 { border-left-color: var(--key-2); }
.quote--3 { border-left-color: var(--key-3); }
.quote--4 { border-left-color: var(--key-4); }
.quote--5 { border-left-color: var(--key-5); }

/* -------------------------------------------------------------
   Roadmap
   ------------------------------------------------------------- */

.roadmap-list {
    list-style: none;
    padding: 0;
    margin: var(--space-3) 0 var(--space-4);
    display: grid;
    gap: var(--space-2);
}

.roadmap-list li {
    padding: var(--space-3);
    background: rgba(141, 179, 94, 0.04);
    border: 1px solid rgba(217, 203, 174, 0.08);
    border-radius: var(--radius-md);
    line-height: 1.5;
}

.follow {
    color: var(--text-soft);
    margin-top: var(--space-3);
}

/* -------------------------------------------------------------
   Link chips (Reddit / YouTube / Background)
   ------------------------------------------------------------- */

.link-row {
    display: grid;
    gap: var(--space-2);
    grid-template-columns: 1fr;
    margin-top: var(--space-2);
}

@media (min-width: 620px) {
    .link-row {
        grid-template-columns: 1fr 1fr 1fr;
    }
}

.link-chip {
    display: block;
    padding: var(--space-3);
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(217, 203, 174, 0.12);
    border-radius: var(--radius-md);
    color: var(--key-1);
    transition: border-color 160ms ease, transform 160ms ease, background 160ms ease;
}

.link-chip:hover,
.link-chip:focus-visible {
    border-color: var(--highlight);
    background: rgba(141, 179, 94, 0.06);
    transform: translateY(-1px);
    color: var(--key-1);
    border-bottom-color: var(--highlight);
}

.link-chip__label {
    display: block;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--highlight);
    margin-bottom: 0.35rem;
}

.link-chip__value {
    display: block;
    font-weight: 500;
    word-break: break-word;
}

/* -------------------------------------------------------------
   Footer
   ------------------------------------------------------------- */

.footer {
    margin-top: clamp(3rem, 6vw, 5rem);
    padding-top: var(--space-4);
    border-top: 1px solid rgba(217, 203, 174, 0.08);
    text-align: center;
}

.footer__credit {
    color: var(--text-dim);
    font-size: 0.85rem;
    letter-spacing: 0.04em;
    margin-top: var(--space-3);
}

/* -------------------------------------------------------------
   Small-screen polish
   ------------------------------------------------------------- */

@media (max-width: 480px) {
    .hero__domain { line-height: 1.05; }
    .pull-quote {
        padding: var(--space-3);
        border-radius: var(--radius-md);
        border-left-width: 3px;
    }
    .quote { padding: var(--space-3) var(--space-2); }
}
