/* What's For Lunch – shared styles for every page */

@font-face {
    font-family: 'Satoshi';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('/fonts/satoshi-regular.woff2') format('woff2');
}

@font-face {
    font-family: 'Satoshi';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url('/fonts/satoshi-medium.woff2') format('woff2');
}

/* Satoshi has no 600; Bold serves both 600 and 700. */
@font-face {
    font-family: 'Satoshi';
    font-style: normal;
    font-weight: 600 700;
    font-display: swap;
    src: url('/fonts/satoshi-bold.woff2') format('woff2');
}

@font-face {
    font-family: 'Gambarino';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('/fonts/gambarino-regular.woff2') format('woff2');
}

:root {
    --basil: #2a7a0b;
    --basil-deep: #1f5a0a;
    --forest: #173012;
    --ink-soft: #46593e;
    --sage: #eef3e7;
    --plate: #ffffff;
    --lime: #cdedb8;
    --tomato: #d63b27;
    --line: rgba(23, 48, 18, 0.1);

    --font-body: 'Satoshi', 'Segoe UI', system-ui, sans-serif;
    --font-display: 'Gambarino', Georgia, serif;
    --wrap: 1080px;
}

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

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

body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--sage);
    color: var(--forest);
    font-family: var(--font-body);
    font-size: 1.0625rem;
    line-height: 1.6;
}

img {
    max-width: 100%;
}

a {
    color: var(--basil);
    text-underline-offset: 0.18em;
}

a:hover {
    color: var(--basil-deep);
}

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

main {
    flex: 1;
}

.wrap {
    max-width: var(--wrap);
    margin: 0 auto;
    padding: 0 1.25rem;
}

/* ---------- Header (header.html) ---------- */

/* Reserve space while the header partial loads, so the page doesn't jump. */
#site-header {
    min-height: 4rem;
    background: var(--basil-deep);
}

header {
    background: var(--basil-deep);
}

.header-inner {
    max-width: var(--wrap);
    min-height: 4rem;
    margin: 0 auto;
    padding: 0 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.site-title {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    color: #ffffff;
    font-family: var(--font-display);
    font-size: 1.45rem;
    text-decoration: none;
    white-space: nowrap;
}

.site-title:hover {
    color: #ffffff;
}

.site-title img {
    width: 2.25rem;
    height: 2.25rem;
    filter: brightness(0) invert(1);
}

header nav {
    display: flex;
    gap: 0.25rem;
}

header nav a {
    white-space: nowrap;
    color: #e3f2d8;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    padding: 0.45rem 0.95rem;
    border-radius: 999px;
}

header nav a:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.12);
}

header nav a.active {
    background: var(--lime);
    color: var(--forest);
}

header nav a.lang-switch {
    margin-left: 0.35rem;
    border: 1px solid rgba(255, 255, 255, 0.35);
    font-size: 0.85rem;
    font-weight: 600;
}

/* ---------- Footer (footer.html) ---------- */

footer {
    background: var(--forest);
    color: #bcd2b1;
    font-size: 0.9rem;
    margin-top: 4rem;
}

.footer-inner {
    max-width: var(--wrap);
    margin: 0 auto;
    padding: 2.25rem 1.25rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 1.25rem 2.5rem;
}

.footer-brand {
    margin: 0;
    font-family: var(--font-display);
    font-size: 1.15rem;
    color: #ffffff;
}

footer ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem 1.4rem;
}

footer a {
    color: #bcd2b1;
    text-decoration: none;
}

footer a:hover {
    color: #ffffff;
    text-decoration: underline;
}

.footer-social a {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-social svg {
    width: 1.2rem;
    height: 1.2rem;
    fill: currentColor;
    flex-shrink: 0;
}

.footer-legal {
    flex-basis: 100%;
    padding-top: 1.25rem;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
}

/* ---------- Home: hero ---------- */

.hero {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    align-items: center;
    gap: 3.5rem;
    padding: 4.5rem 0 4rem;
}

.hero h1 {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: clamp(2.9rem, 6.2vw, 5rem);
    line-height: 1.04;
    letter-spacing: -0.01em;
    margin: 0 0 1.25rem;
}

.hero .lede {
    font-size: 1.2rem;
    color: var(--ink-soft);
    max-width: 32ch;
    margin: 0 0 1.75rem;
}

.playstore-btn {
    display: inline-block;
}

/* Badge images are trimmed to the badge itself, so DE and EN render the same size. */
.playstore-btn img {
    height: 52px;
    width: auto;
    display: block;
}

/* The ranked list: a miniature of the app's main screen */

.ranking {
    margin: 0;
    background: var(--plate);
    border: 1px solid var(--line);
    border-radius: 28px;
    padding: 0.85rem;
    box-shadow: 0 24px 48px -28px rgba(23, 48, 18, 0.35);
}

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

.ranking li {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: baseline;
    gap: 0.15rem 1rem;
    padding: 0.85rem 1rem;
    border-radius: 18px;
}

.ranking li + li {
    margin-top: 0.15rem;
}

.ranking li:first-child {
    background: var(--lime);
}

.dish {
    font-weight: 600;
    font-size: 1.05rem;
}

.since {
    color: var(--ink-soft);
    font-size: 0.92rem;
    font-variant-numeric: tabular-nums;
}

.pick {
    grid-column: 1 / -1;
    justify-self: start;
    order: -1;
    margin-bottom: 0.3rem;
    background: var(--tomato);
    color: #ffffff;
    font-size: 0.78rem;
    font-weight: 600;
    padding: 0.15rem 0.65rem;
    border-radius: 999px;
}

.bar {
    grid-column: 1 / -1;
    height: 6px;
    margin-top: 0.45rem;
    border-radius: 3px;
    background: rgba(23, 48, 18, 0.08);
    overflow: hidden;
}

.bar span {
    display: block;
    height: 100%;
    width: var(--days);
    border-radius: 3px;
    background: var(--basil);
    transform-origin: left;
    animation: fill 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) both;
    animation-delay: calc(0.25s + var(--i) * 0.12s);
}

.ranking li:first-child .bar {
    background: rgba(23, 48, 18, 0.12);
}

.ranking li:first-child .bar span {
    background: var(--tomato);
}

.ranking figcaption {
    padding: 0.85rem 1rem 0.4rem;
    font-size: 0.88rem;
    color: var(--ink-soft);
}

@keyframes fill {
    from { transform: scaleX(0); }
    to { transform: scaleX(1); }
}

@media (prefers-reduced-motion: reduce) {
    .bar span {
        animation: none;
    }
}

/* ---------- Home: sections ---------- */

.section {
    padding: 3.5rem 0;
    border-top: 1px solid var(--line);
}

.section h2 {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: clamp(1.8rem, 3.4vw, 2.4rem);
    line-height: 1.15;
    margin: 0 0 2rem;
}

.steps {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem 2.5rem;
}

.step-no {
    display: block;
    font-weight: 700;
    font-size: 2.5rem;
    line-height: 1;
    color: var(--basil);
    margin-bottom: 0.75rem;
}

.steps h3 {
    font-size: 1.15rem;
    font-weight: 600;
    margin: 0 0 0.4rem;
}

.steps p {
    margin: 0;
    color: var(--ink-soft);
    max-width: 34ch;
}

.showcase {
    display: grid;
    grid-template-columns: 1fr 1.1fr;
    align-items: center;
    gap: 3rem;
}

.showcase p {
    color: var(--ink-soft);
    max-width: 40ch;
    margin: 0 0 1.5rem;
}

.screens {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
}

.screens img {
    width: min(220px, 44%);
    height: auto;
    border-radius: 26px;
    border: 1px solid var(--line);
    box-shadow: 0 24px 40px -24px rgba(23, 48, 18, 0.45);
}

.screens img:nth-child(2) {
    margin-top: 3rem;
}

/* ---------- Text pages (Über uns, legal pages) ---------- */

.container {
    max-width: 46rem;
    margin: 0 auto;
    padding: 3.5rem 1.25rem 0;
}

.section-card {
    background: var(--plate);
    border: 1px solid var(--line);
    border-radius: 24px;
    padding: clamp(1.5rem, 5vw, 3rem);
}

.section-card h1 {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: clamp(2rem, 4.5vw, 2.75rem);
    line-height: 1.12;
    margin: 0 0 1.5rem;
}

.section-card h2 {
    font-size: 1.2rem;
    font-weight: 600;
    margin: 2rem 0 0.6rem;
}

.section-card p,
.section-card address,
.section-card ol {
    line-height: 1.7;
    margin: 0 0 1rem;
}

.section-card address {
    font-style: normal;
}

.section-card ol {
    padding-left: 1.4rem;
}

.section-card li {
    margin-bottom: 0.4rem;
    padding-left: 0.25rem;
}

.section-card li::marker {
    color: var(--basil);
    font-weight: 700;
}

.policy-link {
    display: inline-block;
    margin: 0.25rem 0 0.5rem;
    background: var(--basil);
    color: #ffffff;
    font-weight: 600;
    text-decoration: none;
    padding: 0.7rem 1.3rem;
    border-radius: 999px;
}

.policy-link:hover {
    background: var(--basil-deep);
    color: #ffffff;
}

.warning-box,
.error-box {
    margin-top: 1.25rem;
    padding: 1rem 1.25rem;
    background: #fce9e5;
    border-left: 4px solid var(--tomato);
    border-radius: 0 12px 12px 0;
    color: #7f2112;
    font-weight: 500;
    line-height: 1.65;
    text-align: left;
}

/* ---------- Centered card (invite.html, 404.html) ---------- */

.center-card {
    max-width: 36rem;
    margin: 0 auto;
    text-align: center;
}

.center-card p {
    max-width: 40ch;
    margin-left: auto;
    margin-right: auto;
}

.invite-icon {
    font-size: 3rem;
    line-height: 1;
    margin-bottom: 1rem;
}

.invite-icon img {
    display: block;
    width: 80px;
    height: 80px;
    margin: 0 auto;
    border-radius: 18px;
}

.center-card .playstore-btn {
    margin: 0.75rem 0 0;
}

/* ---------- Small screens ---------- */

@media (max-width: 820px) {
    .hero,
    .showcase {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }

    .hero {
        padding: 3rem 0 3rem;
    }

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

@media (max-width: 480px) {
    .header-inner {
        gap: 0.5rem;
    }

    .site-title {
        font-size: 1.05rem;
    }

    .site-title img {
        width: 1.9rem;
        height: 1.9rem;
    }

    header nav a {
        padding: 0.4rem 0.65rem;
        font-size: 0.9rem;
    }
}

/* Very narrow phones: keep only the icon in the header so the nav fits. */
@media (max-width: 400px) {
    .site-name {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
        white-space: nowrap;
    }
}
