/* MailMind design system — clean, white, quiet. */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300..800&display=swap');

:root {
    --ink: #1d1d1f;
    --ink-2: #424245;
    --gray: #6e6e73;
    --gray-2: #86868b;
    --line: #e8e8ed;
    --soft: #f5f5f7;
    --paper: #ffffff;
    --accent: #ff6a2b;
    --accent-ink: #d9480f;
    --accent-soft: #fff1ea;
    --danger: #d70015;
    --radius: 22px;
    --shadow: 0 20px 60px rgba(0, 0, 0, .07), 0 2px 8px rgba(0, 0, 0, .04);
    --grad: linear-gradient(120deg, #ff6a2b 0%, #ff2d78 55%, #ff9f0a 100%);
}

html { scroll-behavior: smooth; }
::selection { background: rgba(255, 106, 43, .22); }

* { box-sizing: border-box; }

body {
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, sans-serif;
    line-height: 1.5;
    font-weight: 400;
    font-synthesis: none;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background: var(--paper);
    color: var(--ink);
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow-x: clip;
}
/* film grain — barely there, keeps big white fields from feeling flat */
body::after {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 100;
    opacity: .035;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
/* soft light behind every page's header */
body::before {
    content: '';
    position: absolute;
    inset: 0 0 auto;
    height: 520px;
    z-index: -2;
    pointer-events: none;
    background:
        radial-gradient(600px 300px at 20% 0%, rgba(255, 180, 140, .22), transparent 70%),
        radial-gradient(600px 300px at 85% 0%, rgba(255, 170, 210, .18), transparent 70%);
}

h1, h2, h3 { letter-spacing: -0.03em; line-height: 1.1; }
a { color: inherit; }
.main-content { flex: 1; }

/* ---------- nav: floating glass pill ---------- */
.navbar {
    position: sticky;
    top: 14px;
    z-index: 50;
    width: min(1040px, calc(100% - 28px));
    margin: 14px auto 0;
    height: 58px;
    padding: 0 10px 0 22px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .62);
    -webkit-backdrop-filter: saturate(180%) blur(22px);
    backdrop-filter: saturate(180%) blur(22px);
    border: 1px solid rgba(255, 255, 255, .8);
    box-shadow: 0 10px 40px rgba(0, 0, 0, .06), 0 0 0 1px rgba(0, 0, 0, .04);
    transition: width .5s cubic-bezier(.16, 1, .3, 1), background .3s ease, box-shadow .3s ease;
}
.navbar.scrolled {
    width: min(860px, calc(100% - 28px));
    background: rgba(255, 255, 255, .8);
    box-shadow: 0 16px 50px rgba(0, 0, 0, .1), 0 0 0 1px rgba(0, 0, 0, .05);
}
.navbar > a.home {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--ink);
    font-size: 19px;
    font-weight: 750;
    letter-spacing: -0.035em;
}
.navbar > a.home::before {
    content: '';
    width: 26px;
    height: 26px;
    background: url('imgs/logo.svg') center / contain no-repeat;
    transition: transform .5s cubic-bezier(.34, 1.56, .64, 1);
}
.navbar > a.home:hover::before { transform: rotate(-10deg) scale(1.1); }
.navwrap { display: flex; gap: 6px; }
.navwrap a {
    text-decoration: none;
    color: var(--gray);
    font-size: 14px;
    font-weight: 500;
    padding: 8px 14px;
    border-radius: 999px;
    transition: color .2s ease, background .2s ease;
}
.navwrap a:hover { color: var(--ink); background: rgba(0, 0, 0, .05); }
.navbar .empty { width: 1px; }
.nav-cta {
    display: inline-flex;
    align-items: center;
    height: 40px;
    padding: 0 18px;
    border-radius: 999px;
    background: var(--ink);
    color: #fff;
    font-size: 14px;
    font-weight: 650;
    text-decoration: none;
    box-shadow: 0 6px 18px rgba(255, 106, 43, .3);
    transition: transform .3s cubic-bezier(.16, 1, .3, 1), box-shadow .3s ease;
}
.nav-cta:hover { transform: translateY(-1px); box-shadow: 0 10px 26px rgba(255, 106, 43, .45); }

/* ---------- footer ---------- */
footer {
    margin-top: auto;
    border-top: 1px solid var(--line);
    padding: 34px max(24px, calc((100% - 1080px) / 2));
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    font-size: 14px;
    color: var(--gray-2);
}
footer a { color: var(--gray); text-decoration: none; transition: color .2s ease; }
footer a:hover { color: var(--ink); }
footer:has(> a:only-child) { justify-content: center; }
.foot-brand { display: inline-flex; align-items: center; gap: 8px; font-weight: 750; letter-spacing: -0.03em; color: var(--ink) !important; font-size: 17px; }
.foot-brand::before { content: ""; width: 22px; height: 22px; background: url("imgs/logo.svg") center / contain no-repeat; }
.foot-links { display: flex; gap: 26px; flex-wrap: wrap; }

/* ---------- nav extras ---------- */
.navwrap a, .nav-cta { white-space: nowrap; }
.navwrap a[aria-current="page"] { color: var(--ink); background: rgba(0, 0, 0, .05); }
.nav-form { margin: 0; }
button.nav-cta { border: 0; cursor: pointer; font-family: inherit; }
.nav-cta.ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .12); }
.nav-cta.ghost:hover { background: rgba(0, 0, 0, .05); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .18); }

/* ---------- buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 44px;
    padding: 0 20px;
    border-radius: 999px;
    font: inherit;
    font-weight: 650;
    font-size: 15px;
    letter-spacing: -0.01em;
    text-decoration: none;
    white-space: nowrap;
    border: 0;
    cursor: pointer;
    transition: transform .25s cubic-bezier(.16, 1, .3, 1), background .2s ease, box-shadow .25s ease, color .2s ease;
}
.btn:active { transform: scale(.98); }
.btn:focus-visible, .nav-cta:focus-visible, a:focus-visible { outline: 3px solid rgba(255, 106, 43, .45); outline-offset: 2px; }
.btn-primary { background: var(--ink); color: #fff; box-shadow: 0 8px 22px rgba(255, 106, 43, .25); }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 14px 32px rgba(255, 106, 43, .38); }
.btn-secondary { background: #fff; color: var(--ink); box-shadow: inset 0 0 0 1px #d2d2d7; }
.btn-secondary:hover { box-shadow: inset 0 0 0 1px var(--ink); }
.btn-quiet { background: transparent; color: var(--gray); padding: 0 12px; }
.btn-quiet:hover { color: var(--ink); background: rgba(0, 0, 0, .05); }
.btn-danger { background: #fff; color: var(--danger); box-shadow: inset 0 0 0 1px #f2c4c9; }
.btn-danger:hover { background: #fff5f6; box-shadow: inset 0 0 0 1px var(--danger); }
.btn-danger.solid { background: var(--danger); color: #fff; box-shadow: none; }
.btn-danger.solid:hover { background: #b80012; }
.btn-sm { min-height: 36px; padding: 0 14px; font-size: 14px; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .45; pointer-events: none; }

/* ---------- form fields ---------- */
.field { display: flex; flex-direction: column; gap: 8px; }
.field + .field { margin-top: 18px; }
.field label, .label { font-size: 14px; font-weight: 650; color: var(--ink); }
.hint { font-size: 14px; color: var(--gray-2); margin: 0; }
input[type="text"], input[type="email"], textarea, select {
    font: inherit;
    font-size: 16px;
    color: var(--ink);
    background: #fff;
    border: 1px solid #d2d2d7;
    border-radius: 14px;
    padding: 13px 16px;
    outline: none;
    width: 100%;
    transition: border-color .2s ease, box-shadow .2s ease;
}
textarea { min-height: 140px; resize: vertical; }
select {
    appearance: none;
    -webkit-appearance: none;
    padding-right: 44px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%236e6e73' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 18px center;
    cursor: pointer;
}
input[type="text"]:focus, input[type="email"]:focus, textarea:focus, select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(255, 106, 43, .15);
}
::placeholder { color: #a1a1a6; }
input[type="checkbox"] { accent-color: var(--accent); width: 18px; height: 18px; }

/* ---------- toasts ---------- */
.toasts {
    position: fixed;
    top: 86px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 60;
    display: grid;
    gap: 10px;
    width: min(520px, calc(100% - 28px));
}
.toast {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 14px 14px 18px;
    border-radius: 18px;
    background: rgba(255, 255, 255, .88);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    backdrop-filter: blur(20px) saturate(180%);
    box-shadow: 0 18px 50px rgba(0, 0, 0, .12), 0 0 0 1px rgba(0, 0, 0, .05);
    font-size: 15px;
    font-weight: 550;
    animation: toast-in .5s cubic-bezier(.16, 1, .3, 1) both;
    transition: opacity .35s ease, transform .35s ease;
}
.toast > span:nth-child(2) { flex: 1; }
.toast.out { opacity: 0; transform: translateY(-10px); }
.toast-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--grad); flex: none; }
.toast.error .toast-dot { background: var(--danger); }
.toast.error { box-shadow: 0 18px 50px rgba(215, 0, 21, .12), 0 0 0 1px rgba(215, 0, 21, .25); }
.toast-close {
    border: 0; background: transparent; color: var(--gray-2); font-size: 22px; line-height: 1;
    width: 30px; height: 30px; border-radius: 50%; cursor: pointer;
}
.toast-close:hover { background: rgba(0, 0, 0, .05); color: var(--ink); }
@keyframes toast-in { from { opacity: 0; transform: translateY(-14px) scale(.98); } }

@media (max-width: 560px) {
    .navbar { padding: 0 8px 0 16px; gap: 10px; }
    .navwrap { gap: 0; }
    .navwrap a { font-size: 13px; padding: 8px 9px; }
    .nav-cta { padding: 0 14px; font-size: 13px; height: 38px; }
    .nav-optional { display: none; }
}

/* =========================================================
   Shared brand components (landing + app pages)
   ========================================================= */
.accent-grad {
    background: var(--grad);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.shimmer {
    background: linear-gradient(100deg, #ff6a2b 0%, #ff2d78 30%, #ff9f0a 55%, #ff6a2b 80%, #ff2d78 100%);
    background-size: 250% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: shimmer 7s ease-in-out infinite alternate;
}
@keyframes shimmer { to { background-position: 100% 0; } }

.kicker {
    font-size: 15px;
    font-weight: 650;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--accent-ink);
    margin: 0 0 18px;
}

/* ---------- aurora light ---------- */
.aurora {
    position: absolute;
    inset: -10% -10% auto;
    height: 900px;
    pointer-events: none;
    z-index: -1;
    filter: blur(70px) saturate(140%);
    opacity: .75;
}
.aurora i {
    position: absolute;
    border-radius: 50%;
    mix-blend-mode: multiply;
    animation: drift 18s ease-in-out infinite alternate;
}
.aurora i:nth-child(1) { width: 560px; height: 560px; left: 8%; top: 60px; background: radial-gradient(circle, #ffc9a8 0%, transparent 65%); }
.aurora i:nth-child(2) { width: 620px; height: 620px; right: 6%; top: 0; background: radial-gradient(circle, #ffd0e4 0%, transparent 65%); animation-duration: 22s; animation-delay: -6s; }
.aurora i:nth-child(3) { width: 520px; height: 520px; left: 38%; top: 260px; background: radial-gradient(circle, #d9d4ff 0%, transparent 65%); animation-duration: 26s; animation-delay: -12s; }
.aurora i:nth-child(4) { width: 420px; height: 420px; left: 60%; top: 380px; background: radial-gradient(circle, #ffe7b3 0%, transparent 65%); animation-duration: 20s; animation-delay: -3s; }
@keyframes drift {
    0%   { transform: translate(0, 0) scale(1); }
    50%  { transform: translate(60px, -40px) scale(1.12); }
    100% { transform: translate(-50px, 50px) scale(.95); }
}
.aurora.small { inset: 10% 0 auto; height: 700px; opacity: .6; }

/* ---------- beta button ---------- */
.hero-cta { margin-top: 44px; display: flex; flex-direction: column; align-items: center; gap: 18px; }
.beta-btn {
    position: relative;
    isolation: isolate;
    display: inline-flex;
    align-items: center;
    gap: 14px;
    padding: 19px 34px 19px 36px;
    border-radius: 999px;
    background: var(--ink);
    color: #fff;
    font-size: 19px;
    font-weight: 650;
    letter-spacing: -0.01em;
    text-decoration: none;
    box-shadow: 0 18px 50px rgba(255, 106, 43, .35), 0 4px 12px rgba(0, 0, 0, .12);
    transition: transform .35s cubic-bezier(.16, 1, .3, 1), box-shadow .35s ease;
}
.beta-btn:hover { transform: translateY(-3px) scale(1.02); box-shadow: 0 26px 70px rgba(255, 106, 43, .5), 0 6px 16px rgba(0, 0, 0, .14); }
.beta-btn:active { transform: scale(.98); }
.beta-ring {
    position: absolute;
    inset: -3px;
    border-radius: inherit;
    z-index: -1;
    background: conic-gradient(from var(--spin, 0deg), #ff6a2b, #ff2d78, #a78bfa, #ffb35c, #ff6a2b);
    animation: spin 4s linear infinite;
}
.beta-ring::after {
    content: '';
    position: absolute;
    inset: 3px;
    border-radius: inherit;
    background: linear-gradient(180deg, #2a2a2d, #111113);
}
.beta-arrow {
    display: inline-flex; align-items: center; justify-content: center;
    width: 30px; height: 30px; border-radius: 50%;
    background: var(--grad); color: #fff; font-size: 16px;
    transition: transform .35s cubic-bezier(.16, 1, .3, 1);
}
.beta-btn:hover .beta-arrow { transform: translateX(5px) rotate(-8deg); }
.beta-btn.big { font-size: 22px; padding: 23px 40px 23px 44px; }
.beta-btn.big .beta-arrow { width: 36px; height: 36px; }

@property --spin { syntax: '<angle>'; inherits: false; initial-value: 0deg; }
@keyframes spin { to { --spin: 360deg; } }

.signin-line { margin: 0; font-size: 15px; color: var(--gray-2); }
.signin-line a { color: var(--ink); font-weight: 600; text-decoration: none; background: linear-gradient(var(--accent), var(--accent)) 0 100% / 0 1.5px no-repeat; transition: background-size .3s ease; }
.signin-line a:hover { background-size: 100% 1.5px; }

/* ---------- entrance ---------- */
.rise { animation: rise 1.1s cubic-bezier(.16, 1, .3, 1) both; }
@keyframes rise {
    from { opacity: 0; transform: translateY(40px) scale(.98); filter: blur(14px); }
    to { opacity: 1; transform: none; filter: blur(0); }
}
@media (prefers-reduced-motion: reduce) {
    .rise { animation: none; }
    .aurora i, .shimmer, .beta-ring { animation: none; }
}
