/* Manody stylesheet, part 01 — Base: fonts, variables, typography, buttons, header, footer, authentication pages and forms.
   Loaded in order by core/templates/core/includes/stylesheets.html. */

/* ---------- Local fonts ---------- */

@font-face {
    font-family: "Inter";
    src: url("../fonts/inter-variable.c52e6d9e3732.woff2") format("woff2");
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

/* ---------- Variables ---------- */
:root {
    --bg: #ffffff;
    --bg-soft: #fafafa;
    --surface: #ffffff;
    --text: #18181b;
    --text-muted: #71717a;
    --border: #e4e4e7;
    --border-strong: #d4d4d8;
    --accent: #18181b;
    --accent-contrast: #ffffff;
    --danger: #dc2626;
    --danger-soft: #fef2f2;
    --focus: rgba(24, 24, 27, 0.12);

    --radius-sm: 8px;
    --radius: 12px;
    --radius-lg: 20px;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 8px 24px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 2px 4px rgba(0, 0, 0, 0.04), 0 24px 64px rgba(0, 0, 0, 0.10);

    --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --container: 1120px;
    --header-h: 68px;

    /* Brand signature: use sparingly (keywords, glows, recommended plan). */
    --brand-1: #6366f1;
    --brand-2: #a855f7;
    --brand-3: #ec4899;
    --brand-4: #f59e0b;
    --brand-gradient: linear-gradient(100deg, #6366f1 0%, #a855f7 35%, #ec4899 70%, #f59e0b 100%);
    --brand-soft: color-mix(in srgb, #a855f7 10%, var(--bg));
    --ease: cubic-bezier(0.2, 0.8, 0.2, 1);

    color-scheme: light;
}

/* Dark theme: only on explicit choice (light theme by default for everyone). */
html[data-theme="dark"] {
    --bg: #09090b;
    --bg-soft: #0f0f12;
    --surface: #18181b;
    --text: #fafafa;
    --text-muted: #a1a1aa;
    --border: #27272a;
    --border-strong: #3f3f46;
    --accent: #fafafa;
    --accent-contrast: #09090b;
    --danger: #f87171;
    --danger-soft: rgba(248, 113, 113, 0.08);
    --focus: rgba(250, 250, 250, 0.16);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 24px 64px rgba(0, 0, 0, 0.5);

    color-scheme: dark;
}

/* ---------- Base ---------- */
*,
*::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(--bg);
    color: var(--text);
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    /* Inter: sharper alternate digits and letters. */
    font-feature-settings: "cv11", "ss01", "ss03";
}

::selection {
    background: color-mix(in srgb, var(--brand-2) 28%, transparent);
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--header-h) + 16px);
}

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

main {
    flex: 1;
}

h1, h2, h3, p {
    margin: 0;
}

h1, h2, h3 {
    line-height: 1.1;
    letter-spacing: -0.03em;
    font-weight: 700;
}

a {
    color: inherit;
}

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

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

.container {
    width: 100%;
    max-width: var(--container);
    margin-inline: auto;
    padding-inline: 24px;
}

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

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 40px;
    padding: 0 18px;
    border: 1px solid transparent;
    border-radius: 999px;
    font: inherit;
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease,
                color 0.15s ease, transform 0.15s ease, opacity 0.15s ease;
}

.btn:active {
    transform: scale(0.98);
}

.btn-primary {
    background: var(--accent);
    color: var(--accent-contrast);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.btn-primary:hover {
    opacity: 0.9;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

/* Brand button: reserved for major calls to action (home page, recommended plan). */
.btn-brand {
    position: relative;
    background: var(--brand-gradient);
    background-size: 160% 100%;
    color: #ffffff;
    box-shadow: 0 6px 20px color-mix(in srgb, var(--brand-2) 35%, transparent), inset 0 1px 0 rgba(255, 255, 255, 0.25);
    transition: background-position 0.5s var(--ease), transform 0.15s ease, box-shadow 0.2s ease;
}

.btn-brand:hover {
    background-position: 100% 0;
    transform: translateY(-1px);
    box-shadow: 0 10px 28px color-mix(in srgb, var(--brand-3) 40%, transparent), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.text-gradient {
    background: var(--brand-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

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

.btn-ghost:hover {
    border-color: var(--border-strong);
    background: var(--bg-soft);
}

.btn-lg {
    height: 48px;
    padding: 0 26px;
    font-size: 1rem;
}

.btn-block {
    width: 100%;
    height: 46px;
}

/* ---------- Header ---------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 10;
    background: color-mix(in srgb, var(--bg) 80%, transparent);
    backdrop-filter: saturate(180%) blur(12px);
    -webkit-backdrop-filter: saturate(180%) blur(12px);
    border-bottom: 1px solid var(--border);
}

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--header-h);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 1.05rem;
    letter-spacing: -0.02em;
    text-decoration: none;
}

.brand-mark {
    width: 28px;
    height: 28px;
    color: var(--accent);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.nav-user {
    margin-right: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-muted);
}

.nav-form {
    margin: 0;
}

/* ---------- Shared elements: eyebrow, lead paragraph, address reservation ---------- */
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 16px;
    padding: 4px 12px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--surface);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: var(--text-muted);
}

.lead {
    max-width: 36rem;
    font-size: 1.125rem;
    line-height: 1.65;
    color: var(--text-muted);
}

.claim {
    display: flex;
    align-items: center;
    gap: 6px;
    max-width: 32rem;
    padding: 6px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 999px;
    box-shadow: var(--shadow);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.claim:focus-within {
    border-color: color-mix(in srgb, var(--brand-2) 55%, var(--border));
    box-shadow: var(--shadow), 0 0 0 4px color-mix(in srgb, var(--brand-2) 16%, transparent);
}

.claim-field {
    display: flex;
    align-items: center;
    flex: 1;
    min-width: 0;
    padding-left: 16px;
    cursor: text;
}

.claim-prefix { color: var(--text-muted); font-weight: 500; }

.claim-field input {
    flex: 1;
    min-width: 0;
    padding: 10px 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--text);
    font: inherit;
    font-weight: 600;
}

.claim .btn { height: 46px; padding: 0 22px; }

.claim-status {
    min-height: 1.4em;
    margin-top: 10px;
    padding-left: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-muted);
}

.claim-status[data-state="ok"] { color: #059669; }
.claim-status[data-state="taken"] { color: var(--danger); }

.hint {
    margin-top: 12px;
    padding-left: 20px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* ---------- Home page: phone preview ---------- */
.hero-preview {
    display: flex;
    justify-content: center;
}

.phone {
    width: 100%;
    max-width: 300px;
    padding: 36px 20px 20px;
    background: var(--bg-soft);
    border: 1px solid var(--border);
    border-radius: 36px;
    box-shadow: var(--shadow-lg);
    transform: rotate(2deg);
}

.profile {
    text-align: center;
    margin-bottom: 24px;
}

.avatar {
    display: grid;
    place-items: center;
    width: 64px;
    height: 64px;
    margin: 0 auto 12px;
    border-radius: 50%;
    background: var(--accent);
    color: var(--accent-contrast);
    font-size: 1.5rem;
    font-weight: 600;
}

.profile-name {
    font-weight: 600;
}

.profile-bio {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.profile-links {
    display: grid;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.profile-links li {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.9rem;
    font-weight: 500;
}

.profile-links li.is-featured {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--accent-contrast);
}

.profile-links em {
    position: absolute;
    right: 10px;
    padding: 2px 8px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--accent-contrast) 18%, transparent);
    font-size: 0.7rem;
    font-style: normal;
}

.phone-url {
    margin-top: 24px;
    text-align: center;
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* ---------- Footer ---------- */
.site-footer {
    margin-top: 48px;
    border-top: 1px solid var(--border);
    background: var(--bg-soft);
    font-size: 0.88rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.6fr repeat(3, 1fr);
    gap: 40px;
    padding-block: 56px 40px;
}

.footer-brand { display: grid; gap: 14px; align-content: start; max-width: 300px; }

.footer-badge {
    justify-self: start;
    padding: 4px 12px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--surface);
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--text-muted);
}

.footer-col { display: grid; gap: 10px; align-content: start; }

.footer-col h2 {
    margin-bottom: 4px;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text);
}

.footer-col a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.15s ease;
}

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

.footer-bottom {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 8px 24px;
    padding-block: 20px 28px;
    border-top: 1px solid var(--border);
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Skip link (keyboard) and main content focus */
.skip-link {
    position: absolute;
    top: -48px;
    left: 16px;
    z-index: 50;
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    background: var(--accent);
    color: var(--accent-contrast);
    font-weight: 500;
    text-decoration: none;
    transition: top 0.15s ease;
}

.skip-link:focus { top: 12px; }
main:focus { outline: none; }

/* ---------- Header: central menu and mobile menu ---------- */
.nav-menu {
    display: flex;
    align-items: center;
    gap: 2px;
    margin: 0 auto;
    padding: 0;
    list-style: none;
}

.nav-menu .nav-link {
    display: inline-block;
    padding: 8px 12px;
    border-radius: 999px;
    transition: color 0.15s ease, background-color 0.15s ease;
}

.nav-menu .nav-link:hover { background: var(--bg-soft); }

.show-sm { display: none; }

.nav-mobile { position: relative; }

.nav-mobile summary {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border: 1px solid var(--border);
    border-radius: 999px;
    cursor: pointer;
    list-style: none;
}

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

.nav-mobile svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
}

.nav-mobile .nav-mobile-close { display: none; }
.nav-mobile[open] .nav-mobile-open { display: none; }
.nav-mobile[open] .nav-mobile-close { display: inline; }

.nav-sheet {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    z-index: 30;
    display: grid;
    gap: 2px;
    width: min(300px, calc(100vw - 32px));
    padding: 10px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    animation: sheet-in 0.18s var(--ease);
}

.nav-sheet a,
.nav-sheet button {
    padding: 10px 12px;
    border: 0;
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--text);
    font: inherit;
    font-weight: 500;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
}

.nav-sheet a:hover,
.nav-sheet button:hover { background: var(--bg-soft); }
.nav-sheet .btn { margin-top: 6px; justify-content: center; color: var(--accent-contrast); }
.nav-sheet .btn:hover { background: var(--accent); }
.nav-sheet hr { width: 100%; margin: 6px 0; border: 0; border-top: 1px solid var(--border); }
.nav-sheet form { margin: 0; display: grid; }

@keyframes sheet-in {
    from { opacity: 0; transform: translateY(-6px) scale(0.98); }
    to   { opacity: 1; transform: none; }
}

/* ---------- Authentication pages ---------- */
.page-auth {
    background: var(--bg-soft);
}

.page-auth .site-header {
    background: color-mix(in srgb, var(--bg-soft) 80%, transparent);
}

.auth {
    display: flex;
    justify-content: center;
    padding: 64px 24px 96px;
}

.auth-card {
    width: 100%;
    max-width: 420px;
    padding: 40px 36px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

.auth-header {
    margin-bottom: 28px;
    text-align: center;
}

.auth-header h1 {
    margin-bottom: 8px;
    font-size: 1.75rem;
}

.auth-header p {
    font-size: 0.95rem;
}

.auth-switch {
    margin-top: 24px;
    text-align: center;
    font-size: 0.9rem;
}

.auth-switch a {
    color: var(--text);
    font-weight: 500;
    text-underline-offset: 3px;
}

/* ---------- Forms ---------- */
.form {
    display: grid;
    gap: 18px;
}

.form .btn-block {
    margin-top: 6px;
}

.field {
    display: grid;
    gap: 6px;
}

.field label {
    font-size: 0.875rem;
    font-weight: 500;
}

.field input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
.field textarea,
.input-prefixed {
    width: 100%;
    height: 44px;
    padding: 0 14px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font: inherit;
    font-size: 0.95rem;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.field input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):hover,
.field textarea:hover,
.input-prefixed:hover {
    border-color: var(--border-strong);
}

.field input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):focus,
.field textarea:focus,
.input-prefixed:focus-within {
    outline: 0;
    border-color: var(--accent);
    box-shadow: 0 0 0 4px var(--focus);
}

.input-prefixed {
    display: flex;
    align-items: center;
    cursor: text;
}

.input-prefixed span {
    color: var(--text-muted);
    font-size: 0.95rem;
    user-select: none;
}

.input-prefixed input {
    flex: 1;
    min-width: 0;
    height: 100%;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
}

.input-prefixed input:focus {
    box-shadow: none;
}

.field textarea {
    height: auto;
    min-height: 88px;
    padding: 10px 14px;
    line-height: 1.5;
    resize: vertical;
}

.field-help {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.field-error {
    font-size: 0.8rem;
    color: var(--danger);
}

.alert {
    margin-bottom: 20px;
    padding: 12px 14px;
    background: var(--danger-soft);
    border: 1px solid color-mix(in srgb, var(--danger) 30%, transparent);
    border-radius: var(--radius-sm);
    color: var(--danger);
    font-size: 0.875rem;
}
