/*
 * My Daily Challenge website. One stylesheet, no build step.
 * Colors follow the app theme (lib/system/theme/values/colors_default.dart).
 * Type is fluid between 360px and 1440px viewports: clamp(min rem, rem + vi, max rem),
 * so it follows user zoom and font size settings.
 */

@font-face {
    font-family: "Montserrat";
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url("/site/fonts/montserrat-700.woff2") format("woff2");
    unicode-range: U+0000-017F, U+2013-2014, U+2018-201E, U+2022, U+2026, U+20AC, U+2122;
}

:root {
    color-scheme: dark;

    --bg: #0E1116;
    --surface: #161A21;
    --surface-2: #1E232C;
    --surface-3: #272D38;
    --border: rgba(255, 255, 255, 0.08);
    --border-strong: rgba(255, 255, 255, 0.16);
    --text: #F2F4F7;
    --muted: #A1A9B6;
    --tertiary: #8A93A1;
    --accent: #3CCBF4;
    --accent-hover: #7ADCF8;
    --on-accent: #04222C;
    --accent-soft: rgba(60, 203, 244, 0.16);
    --violet: #8B7CF6;
    --premium: #F5C451;
    --on-premium: #2B1D00;
    --premium-soft: rgba(245, 196, 81, 0.14);
    --premium-border: rgba(245, 196, 81, 0.32);

    --font-head: "Montserrat", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --font-body: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

    /* 14 to 15px */
    --step--1: clamp(0.875rem, 0.854rem + 0.093vi, 0.9375rem);
    /* 16 to 18px */
    --step-0: clamp(1rem, 0.958rem + 0.185vi, 1.125rem);
    /* 18 to 22px */
    --step-1: clamp(1.125rem, 1.042rem + 0.37vi, 1.375rem);
    /* 22 to 32px */
    --step-2: clamp(1.375rem, 1.167rem + 0.926vi, 2rem);
    /* 30 to 44px */
    --step-3: clamp(1.875rem, 1.583rem + 1.296vi, 2.75rem);
    /* 36 to 64px */
    --step-4: clamp(2.25rem, 1.667rem + 2.593vi, 4rem);

    --space-section: clamp(3.5rem, 2.75rem + 3.33vi, 6rem);
    --radius: 1.5rem;
    --radius-small: 0.875rem;
}

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

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    scroll-padding-top: 5rem;
}

@media (prefers-reduced-motion: no-preference) {
    html {
        scroll-behavior: smooth;
    }
}

body {
    margin: 0;
    min-height: 100vh;
    background-color: var(--bg);
    background-image:
        radial-gradient(60rem 36rem at 100% -8rem, rgba(60, 203, 244, 0.10), transparent 65%),
        radial-gradient(44rem 32rem at -12rem 10rem, rgba(139, 124, 246, 0.07), transparent 65%);
    background-repeat: no-repeat;
    color: var(--text);
    font-family: var(--font-body);
    font-size: var(--step-0);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-wrap: break-word;
}

::selection {
    background: rgba(60, 203, 244, 0.32);
}

h1,
h2,
h3,
.h3 {
    font-family: var(--font-head);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.01em;
    margin: 0 0 0.75rem;
    text-wrap: balance;
}

h1 {
    font-size: var(--step-4);
    letter-spacing: -0.02em;
}

h2 {
    font-size: var(--step-3);
}

h3,
.h3 {
    font-size: var(--step-1);
}

p {
    margin: 0 0 1rem;
}

a {
    color: var(--accent);
    text-decoration-thickness: 1px;
    text-underline-offset: 0.2em;
}

a:hover {
    color: var(--accent-hover);
}

a:focus-visible,
summary:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
    border-radius: 0.375rem;
}

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

ul,
ol {
    margin: 0 0 1rem;
    padding-left: 1.25rem;
}

li + li {
    margin-top: 0.375rem;
}

.wrap {
    width: min(100% - 2rem, 72rem);
    margin-inline: auto;
}

.muted {
    color: var(--muted);
}

.accent {
    color: var(--accent);
}

.eyebrow {
    margin: 0 0 0.75rem;
    color: var(--muted);
    font-size: var(--step--1);
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.lead {
    color: var(--muted);
    font-size: var(--step-1);
    line-height: 1.55;
    max-width: 38rem;
}

.fine {
    color: var(--tertiary);
    font-size: var(--step--1);
    max-width: 44rem;
}

.skip {
    position: absolute;
    left: -999rem;
    top: 0.75rem;
    z-index: 100;
    padding: 0.5rem 1rem;
    border-radius: 999px;
    background: var(--accent);
    color: var(--on-accent);
    font-weight: 600;
}

.skip:focus {
    left: 1rem;
}

/* Header */

.site-header {
    position: sticky;
    top: 0;
    z-index: 10;
    background: rgba(14, 17, 22, 0.78);
    border-bottom: 1px solid var(--border);
    -webkit-backdrop-filter: saturate(140%) blur(14px);
    backdrop-filter: saturate(140%) blur(14px);
}

.header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: 4rem;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.625rem;
    color: var(--text);
    font-family: var(--font-head);
    font-weight: 700;
    font-size: clamp(1rem, 0.958rem + 0.185vi, 1.125rem);
    text-decoration: none;
    white-space: nowrap;
}

.brand:hover {
    color: var(--text);
}

.brand-ring {
    width: 1.625rem;
    height: 1.625rem;
    flex: none;
}

.header-nav {
    display: flex;
    align-items: center;
    gap: clamp(0.75rem, 0.5rem + 1vi, 1.5rem);
}

.header-nav a:not(.btn) {
    color: var(--muted);
    font-size: var(--step--1);
    font-weight: 600;
    text-decoration: none;
}

.header-nav a:not(.btn):hover,
.header-nav a.is-active {
    color: var(--text);
}

/* On phones the hero and the footer carry the store links, the header keeps the brand and Support. */
@media (max-width: 30rem) {
    .header-nav .btn {
        display: none;
    }
}

/* Buttons */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 3rem;
    padding: 0.75rem 1.375rem;
    border: 1px solid transparent;
    border-radius: 999px;
    font-weight: 600;
    font-size: var(--step-0);
    line-height: 1.2;
    text-decoration: none;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.btn:focus-visible,
.store:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}

.btn-small {
    min-height: 2.5rem;
    padding: 0.5rem 1rem;
    font-size: var(--step--1);
}

.btn-primary {
    background: var(--accent);
    color: var(--on-accent);
}

.btn-primary:hover {
    background: var(--accent-hover);
    color: var(--on-accent);
}

.btn-ghost {
    border-color: var(--border-strong);
    color: var(--text);
}

.btn-ghost:hover {
    background: var(--surface-2);
    color: var(--text);
}

.store-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin: 1.75rem 0 1rem;
}

.store {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 11.5rem;
    min-height: 3.5rem;
    padding: 0.5rem 1.25rem 0.5rem 1rem;
    border-radius: var(--radius-small);
    background: var(--text);
    color: var(--bg);
    text-decoration: none;
    transition: background-color 0.15s ease, transform 0.15s ease;
}

.store:hover {
    background: #FFFFFF;
    color: var(--bg);
}

@media (prefers-reduced-motion: no-preference) {
    .store:hover {
        transform: translateY(-1px);
    }
}

.store-icon {
    width: 1.625rem;
    height: 1.625rem;
    flex: none;
}

.store-text {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}

.store-small {
    font-size: 0.75rem;
    font-weight: 500;
}

.store-big {
    font-family: var(--font-head);
    font-size: 1.1875rem;
    font-weight: 700;
}

/* Hero */

.hero {
    padding-block: clamp(2.5rem, 1.75rem + 3.33vi, 5rem) var(--space-section);
}

.hero-grid {
    display: grid;
    gap: clamp(2.5rem, 2rem + 2.5vi, 4rem);
    align-items: center;
}

@media (min-width: 60rem) {
    .hero-grid {
        grid-template-columns: 1.15fr 0.85fr;
    }
}

.hero h1 {
    margin-bottom: 1.25rem;
}

/* Drawing of the app home screen */

.phone {
    width: min(100%, 22rem);
    margin-inline: auto;
    padding: 1.5rem 1.125rem 1.25rem;
    border: 1px solid var(--border-strong);
    border-radius: 2.75rem;
    background: linear-gradient(180deg, #121821 0%, var(--bg) 40%);
    box-shadow:
        0 0 0 0.5rem #0A0C10,
        0 0 0 calc(0.5rem + 1px) var(--border),
        0 2.5rem 5rem rgba(0, 0, 0, 0.55),
        0 0 8rem rgba(60, 203, 244, 0.08);
    font-size: 0.875rem;
    line-height: 1.45;
    user-select: none;
}

.phone-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.phone-date {
    color: var(--muted);
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.phone-avatar {
    display: grid;
    place-items: center;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 50%;
    background: var(--surface-3);
    font-weight: 600;
}

.phone-hello {
    margin: 0.25rem 0 0.75rem;
    font-family: var(--font-head);
    font-size: 1.375rem;
    font-weight: 700;
    line-height: 1.2;
}

.chip {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.875rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--surface);
    font-weight: 500;
    line-height: 1.3;
}

.chip-small {
    padding: 0.3125rem 0.75rem;
    border-color: transparent;
    background: var(--surface-2);
    font-size: 0.8125rem;
}

.dot {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    background: var(--dot, var(--accent));
}

.phone-week {
    margin-top: 1rem;
    padding: 0.875rem 0.875rem 1rem;
    border: 1px solid var(--border);
    border-radius: 1.25rem;
    background: var(--surface);
}

.phone-week-head {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.phone-week-head .muted {
    font-weight: 400;
}

.week {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.25rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.week li {
    display: grid;
    place-items: center;
    aspect-ratio: 1;
    margin: 0;
    border: 1.5px solid var(--border-strong);
    border-radius: 50%;
    color: var(--muted);
    font-size: 0.75rem;
}

.week li.done {
    border-color: var(--accent);
    background: var(--accent);
    color: var(--on-accent);
    font-weight: 700;
}

.week li.today {
    border-color: var(--accent);
    color: var(--text);
    font-weight: 700;
}

.phone-card {
    margin-top: 0.875rem;
    padding: 1rem;
    border: 1px solid var(--border);
    border-radius: 1.25rem;
    background: var(--surface);
}

.phone-title {
    margin: 0.75rem 0 0.375rem;
    font-family: var(--font-head);
    font-size: 1.125rem;
    font-weight: 700;
    line-height: 1.25;
}

.phone-text {
    margin: 0 0 0.75rem;
    color: var(--muted);
}

.phone-meta {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.875rem;
}

.phone-meta span {
    padding: 0.25rem 0.625rem;
    border-radius: 999px;
    background: var(--surface-2);
    color: var(--muted);
    font-size: 0.75rem;
}

.phone-btn {
    display: block;
    padding: 0.6875rem;
    border-radius: 999px;
    background: var(--accent);
    color: var(--on-accent);
    font-weight: 600;
    text-align: center;
}

.phone-locked {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 0.875rem;
    padding: 0.875rem 1rem;
    border: 1px solid var(--premium-border);
    border-radius: 1.25rem;
    background: var(--surface);
}

.phone-locked .lock {
    width: 2.25rem;
    height: 2.25rem;
    flex: none;
    padding: 0.5rem;
    border-radius: 50%;
    background: var(--premium-soft);
    color: var(--premium);
}

.phone-locked strong {
    display: block;
    font-weight: 600;
}

.phone-locked small {
    color: var(--muted);
    font-size: 0.75rem;
}

/* Sections */

.section {
    padding-block: var(--space-section) 0;
}

.section-last {
    padding-bottom: var(--space-section);
}

.section > .wrap > h2 {
    max-width: 40rem;
    margin-bottom: 2rem;
}

.grid-3 {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
}

.card {
    padding: clamp(1.25rem, 1rem + 1.11vi, 2rem);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
}

.card h3 {
    margin-top: 1.25rem;
}

.card p:last-child,
.card ul:last-child,
.card ol:last-child {
    margin-bottom: 0;
}

.card > p {
    color: var(--muted);
}

.icon {
    display: grid;
    place-items: center;
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    background: var(--accent-soft);
    color: var(--accent);
}

.icon svg {
    width: 1.5rem;
    height: 1.5rem;
}

.chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.625rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.chips li {
    margin: 0;
}

.tag-premium {
    padding: 0.125rem 0.5rem;
    border-radius: 999px;
    background: var(--premium-soft);
    color: var(--premium);
    font-size: 0.75rem;
    font-weight: 600;
}

.plans {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr));
    margin-bottom: 1.5rem;
}

.plan h3 {
    margin-top: 0;
    font-size: var(--step-2);
}

.plan-premium {
    border-color: var(--premium-border);
    background:
        radial-gradient(28rem 16rem at 100% 0%, rgba(245, 196, 81, 0.10), transparent 70%),
        var(--surface);
}

.plan-premium h3 {
    color: var(--premium);
}

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

.ticks li {
    position: relative;
    padding-left: 1.875rem;
}

.ticks li + li {
    margin-top: 0.625rem;
}

.ticks li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.3em;
    width: 1.125rem;
    height: 1.125rem;
    border-radius: 50%;
    background: var(--accent-soft) center / 0.75rem no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 6.2l2.2 2.2L9.5 3.6' fill='none' stroke='%233CCBF4' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.plan-premium .ticks li::before {
    background-color: var(--premium-soft);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 6.2l2.2 2.2L9.5 3.6' fill='none' stroke='%23F5C451' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.cta {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: clamp(2.5rem, 2rem + 2.22vi, 4rem) clamp(1.25rem, 1rem + 1.11vi, 2rem);
    border: 1px solid var(--border);
    border-radius: 2rem;
    background:
        radial-gradient(36rem 18rem at 50% 0%, rgba(60, 203, 244, 0.12), transparent 70%),
        var(--surface);
    text-align: center;
}

.cta h2 {
    margin-top: 1.5rem;
}

.cta .lead {
    margin-bottom: 0;
}

.cta .store-row {
    justify-content: center;
    margin-bottom: 0;
}

.cta-ring {
    width: 4.5rem;
    height: 4.5rem;
    color: var(--text);
}

@media (prefers-reduced-motion: no-preference) {
    .cta-ring circle {
        stroke-dasharray: 100;
        animation: ring-draw 0.7s cubic-bezier(0.33, 1, 0.68, 1) both;
        transform: rotate(-90deg);
        transform-origin: 50% 50%;
    }
}

@keyframes ring-draw {
    from {
        stroke-dashoffset: 100;
    }

    to {
        stroke-dashoffset: 0;
    }
}

.contact {
    display: grid;
    gap: 1.5rem;
    align-items: center;
}

@media (min-width: 52rem) {
    .contact {
        grid-template-columns: 1fr auto;
    }
}

.contact h2 {
    font-size: var(--step-2);
}

.contact p {
    margin-bottom: 0;
    max-width: 34rem;
}

.contact-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

/* Inner pages */

.page {
    padding-block: clamp(2.5rem, 1.75rem + 3.33vi, 5rem) var(--space-section);
}

.page-head {
    max-width: 46rem;
    margin-bottom: 2rem;
}

.page-head h1 {
    font-size: var(--step-3);
}

.page-head .lead {
    margin-bottom: 1rem;
}

.updated {
    display: inline-block;
    margin: 0;
    padding: 0.3125rem 0.875rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--surface);
    color: var(--muted);
    font-size: var(--step--1);
}

.toc {
    max-width: 46rem;
    margin-bottom: 2.5rem;
    padding: 1.25rem 1.5rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
}

.toc-title {
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.toc ol {
    margin: 0;
    padding-left: 1.5rem;
    color: var(--tertiary);
    font-size: var(--step--1);
}

@media (min-width: 44rem) {
    .toc ol {
        columns: 2;
        column-gap: 2.5rem;
    }
}

.toc li {
    margin: 0 0 0.375rem;
    break-inside: avoid;
}

.toc a {
    color: var(--text);
    text-decoration: none;
}

.toc a:hover {
    color: var(--accent);
    text-decoration: underline;
}

.prose {
    max-width: 46rem;
}

.prose h2 {
    margin-top: 2.75rem;
    font-size: var(--step-2);
}

.prose h3 {
    margin-top: 1.75rem;
    margin-bottom: 0.5rem;
    font-size: var(--step-1);
}

.prose p,
.prose li {
    color: #D5DAE1;
}

.prose strong {
    color: var(--text);
}

.steps {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr));
    margin: 2rem 0;
}

.step-card h2 {
    margin-top: 0;
    font-size: var(--step-2);
}

.step-card ol {
    margin-bottom: 0;
}

.step-label {
    margin-bottom: 0.5rem;
    color: var(--accent);
    font-size: var(--step--1);
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.notice {
    margin: 0 0 1rem;
    padding: 1rem 1.25rem;
    border: 1px solid var(--premium-border);
    border-radius: var(--radius-small);
    background: var(--premium-soft);
    color: var(--text);
}

.notice strong {
    color: var(--premium);
}

.support-contact {
    display: grid;
    gap: 1.25rem;
    align-items: center;
    max-width: 46rem;
    margin-bottom: 3rem;
}

@media (min-width: 44rem) {
    .support-contact {
        grid-template-columns: 1fr auto;
    }
}

.support-contact .h3 {
    margin-bottom: 0.375rem;
}

.support-contact p {
    margin: 0;
}

.faq {
    max-width: 46rem;
    margin-bottom: 2rem;
}

.faq h2 {
    font-size: var(--step-2);
    margin-bottom: 1.25rem;
}

.faq details {
    border-bottom: 1px solid var(--border);
}

.faq details:first-of-type {
    border-top: 1px solid var(--border);
}

.faq summary {
    position: relative;
    padding: 1.125rem 2.5rem 1.125rem 0;
    cursor: pointer;
    font-weight: 600;
    list-style: none;
}

.faq summary::-webkit-details-marker {
    display: none;
}

.faq summary::after {
    content: "";
    position: absolute;
    right: 0.375rem;
    top: 50%;
    width: 0.625rem;
    height: 0.625rem;
    border-right: 2px solid var(--muted);
    border-bottom: 2px solid var(--muted);
    transform: translateY(-70%) rotate(45deg);
    transition: transform 0.15s ease;
}

.faq details[open] summary::after {
    transform: translateY(-30%) rotate(225deg);
}

.faq details p {
    margin: 0 0 1.25rem;
    color: #D5DAE1;
}

/* Footer */

.site-footer {
    padding-block: 3rem 2.5rem;
    border-top: 1px solid var(--border);
    background: #0B0D11;
    font-size: var(--step--1);
}

.footer-grid {
    display: grid;
    gap: 2rem;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 10rem), 1fr));
    margin-bottom: 2rem;
}

.footer-brand p {
    margin: 0.75rem 0 0;
    color: var(--muted);
}

.footer-title {
    margin-bottom: 0.75rem;
    color: var(--text);
    font-family: var(--font-body);
    font-size: var(--step--1);
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.site-footer ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.site-footer li + li {
    margin-top: 0.5rem;
}

.site-footer nav a {
    color: var(--muted);
    text-decoration: none;
}

.site-footer nav a:hover {
    color: var(--text);
}

.footer-legal {
    margin: 0 0 0.375rem;
    color: var(--tertiary);
}
