/*
 * Public landing page. Same design language as the sign-in pages (backend/css/auth.css).
 * Brand colors (--brand-primary, --brand-accent) are set inline from site settings.
 */

:root {
    --paper: #f7f6ef;
    --white: #fffef9;
    --line: #d9ded3;
    --muted: #64746b;
    --ink: var(--brand-primary);
    --brand-hover: color-mix(in srgb, var(--brand-primary) 82%, #000);
    --tint: color-mix(in srgb, var(--paper) 92%, var(--brand-accent));
    --radius: 16px;
    --gutter: clamp(16px, 5vw, 48px);
}

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

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: 'Instrument Sans', Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--ink);
    background: var(--paper);
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
}

h1,
h2,
h3 {
    margin: 0;
    font-weight: 500;
}

/* Marker highlight: readable on the cream background whatever the accent color */
h1 em,
h2 em {
    font-style: normal;
    background: linear-gradient(transparent 62%, color-mix(in srgb, var(--brand-accent) 75%, transparent) 62%);
}

.container {
    width: min(1120px, 100%);
    margin: 0 auto;
    padding: 0 var(--gutter);
}

.eyebrow {
    display: flex;
    align-items: center;
    gap: 9px;
    margin: 0 0 16px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2.1px;
    text-transform: uppercase;
}

.eyebrow::before {
    content: '';
    width: 22px;
    height: 2px;
    background: currentColor;
}

.lead {
    margin: 0;
    font-size: 17px;
    color: var(--muted);
}

/* Buttons */

.button {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 18px;
    padding: 15px 23px;
    border: 1px solid transparent;
    border-radius: 5px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    transition:
        transform 0.2s,
        background 0.2s;
}

.button:hover {
    transform: translateY(-2px);
}

.button-dark {
    background: var(--brand-primary);
    color: #fff;
}

.button-dark:hover {
    background: var(--brand-hover);
}

.button-light {
    background: var(--brand-accent);
    color: var(--on-accent);
}

.button-outline {
    border-color: var(--line);
    background: var(--white);
}

.button-small {
    padding: 10px 16px;
    font-size: 13px;
}

/* Header */

.site-header {
    position: sticky;
    top: 0;
    z-index: 10;
    background: color-mix(in srgb, var(--paper) 92%, transparent);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--line);
}

.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 72px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 21px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--brand-primary);
    color: #fff;
    font-size: 15px;
}

.brand-logo {
    width: 36px;
    height: 36px;
    object-fit: contain;
    border-radius: 50%;
    background: #fff;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 28px;
    font-size: 14px;
    font-weight: 500;
}

.site-nav a:not(.button):hover {
    text-decoration: underline;
}

/* Hero */

.hero {
    padding: clamp(48px, 9vw, 110px) 0 clamp(48px, 8vw, 96px);
}

.hero .container {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    align-items: center;
    gap: clamp(32px, 6vw, 72px);
}

.hero h1 {
    margin-bottom: 22px;
    font-size: clamp(40px, 5.6vw, 72px);
    line-height: 1.04;
    letter-spacing: -2.4px;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 32px;
}

.hero-note {
    margin-top: 18px;
    font-size: 13px;
    color: var(--muted);
}

/* Phone preview in the hero */

.phone {
    position: relative;
    padding: 28px 22px;
    border-radius: 28px;
    background: var(--brand-primary);
    color: #fff;
    box-shadow: 0 30px 80px color-mix(in srgb, var(--brand-primary) 25%, transparent);
}

.phone-top {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 18px;
    margin-bottom: 18px;
    border-bottom: 1px solid color-mix(in srgb, #fff 18%, transparent);
}

.phone-avatar {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--brand-accent);
    color: var(--on-accent);
    font-size: 13px;
    font-weight: 700;
}

.phone-top strong {
    display: block;
    font-size: 15px;
    letter-spacing: 1px;
}

.phone-top small {
    opacity: 0.7;
    font-size: 12px;
}

.bubble {
    max-width: 92%;
    margin-bottom: 14px;
    padding: 12px 14px;
    border-radius: 4px 14px 14px 14px;
    background: var(--white);
    color: #1d2a24;
    font-size: 14px;
    line-height: 1.5;
}

.bubble small {
    display: block;
    margin-top: 6px;
    color: var(--muted);
    font-size: 11px;
}

.phone-status {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 6px;
    font-size: 12px;
    opacity: 0.85;
}

.phone-status::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--brand-accent);
}

/* Sections */

.section {
    padding: clamp(56px, 8vw, 100px) 0;
}

.section-tint {
    background: var(--tint);
}

.section-head {
    max-width: 640px;
    margin-bottom: 44px;
}

.section-head h2 {
    margin-bottom: 14px;
    font-size: clamp(30px, 3.6vw, 46px);
    line-height: 1.12;
    letter-spacing: -1.6px;
}

.grid {
    display: grid;
    gap: 18px;
}

.grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

.grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.card {
    padding: 28px 24px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--white);
}

.card h3 {
    margin: 18px 0 8px;
    font-size: 19px;
    letter-spacing: -0.4px;
}

.card h3:first-child {
    margin-top: 0;
}

.card p {
    margin: 0;
    font-size: 14px;
    color: var(--muted);
}

.card-icon {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: color-mix(in srgb, var(--brand-primary) 10%, var(--white));
    font-size: 20px;
}

/* Steps */

.step-number {
    font-size: 44px;
    font-weight: 500;
    line-height: 1;
    letter-spacing: -1.5px;
    color: var(--brand-primary);
    opacity: 0.35;
}

/* Pricing */

.pricing {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.price-card {
    position: relative;
    display: flex;
    flex-direction: column;
}

.price-card.is-featured {
    border-color: var(--brand-primary);
    background: var(--brand-primary);
    color: #fff;
}

.price-card.is-featured p,
.price-card.is-featured .price small {
    color: color-mix(in srgb, #fff 75%, transparent);
}

.price-badge {
    position: absolute;
    top: -12px;
    left: 24px;
    padding: 3px 10px;
    border-radius: 99px;
    background: var(--brand-accent);
    color: var(--on-accent);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.price-card h3 {
    margin-top: 0;
}

.price {
    margin: 18px 0 4px;
    font-size: 34px;
    font-weight: 600;
    line-height: 1.1;
    letter-spacing: -1px;
}

.price small {
    display: block;
    margin-top: 4px;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0;
    color: var(--muted);
}

.pricing-note {
    margin: 22px 0 0;
    font-size: 13px;
    color: var(--muted);
}

/* Payment methods */

.pay-methods {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 28px;
}

.pay-methods span {
    padding: 8px 14px;
    border: 1px solid var(--line);
    border-radius: 99px;
    background: var(--white);
    font-size: 13px;
    font-weight: 600;
}

/* Contact band */

.contact-band {
    border-radius: 24px;
    padding: clamp(32px, 6vw, 64px);
    background: var(--brand-primary);
    color: #fff;
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 32px;
    align-items: center;
}

.contact-band h2 {
    margin-bottom: 12px;
    font-size: clamp(30px, 3.6vw, 46px);
    line-height: 1.1;
    letter-spacing: -1.6px;
}

.contact-band h2 em {
    background: none;
    color: var(--brand-accent);
}

.contact-band p {
    margin: 0;
    opacity: 0.85;
}

.contact-list {
    display: grid;
    gap: 12px;
}

.contact-list a,
.contact-list div {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 18px;
    border-radius: 10px;
    background: color-mix(in srgb, #fff 10%, transparent);
    font-size: 14px;
}

.contact-list a:hover {
    background: color-mix(in srgb, #fff 18%, transparent);
}

.contact-list span {
    white-space: nowrap;
    opacity: 0.7;
}

.contact-list strong {
    font-weight: 600;
    text-align: right;
    overflow-wrap: anywhere;
}

/* Footer */

.site-footer {
    padding: 36px 0;
    border-top: 1px solid var(--line);
    font-size: 13px;
    color: var(--muted);
}

.site-footer .container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 12px 24px;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
}

.footer-links a:hover {
    color: var(--ink);
}

/* Responsive */

@media (max-width: 960px) {
    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 860px) {
    .hero .container,
    .contact-band {
        grid-template-columns: 1fr;
    }

    .site-nav .nav-link {
        display: none;
    }
}

@media (max-width: 640px) {
    .grid-4,
    .grid-3 {
        grid-template-columns: 1fr;
    }

    .hero h1 {
        letter-spacing: -1.4px;
    }

    .hero-actions .button {
        flex: 1 1 100%;
    }
}

/* Header sign-in link: stays visible on small screens */

.nav-signin {
    font-weight: 600;
}

.site-nav form {
    margin: 0;
}

.site-nav button {
    font: inherit;
    cursor: pointer;
}

/* Customer account */

.status-banner {
    margin-bottom: 32px;
    padding: 14px 18px;
    border-radius: 10px;
    background: color-mix(in srgb, var(--brand-primary) 10%, var(--white));
    font-size: 14px;
    font-weight: 600;
}

.details {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 8px 16px;
    margin: 16px 0 0;
    font-size: 14px;
}

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

.details dd {
    margin: 0;
    overflow-wrap: anywhere;
}

.tag {
    display: inline-block;
    padding: 1px 8px;
    border-radius: 99px;
    background: color-mix(in srgb, var(--muted) 15%, var(--white));
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    vertical-align: middle;
}

.tag-ok {
    background: color-mix(in srgb, var(--brand-primary) 14%, var(--white));
}

.tag-bad {
    background: #fce8e6;
    color: #9a2020;
}

.sender-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--line);
    font-size: 14px;
}

.sender-row:first-of-type {
    margin-top: 12px;
}

.next-steps-head {
    margin-top: 64px;
}

.card a {
    color: var(--ink);
}

.account-actions {
    margin-top: 32px;
}

/* Maintenance page */

.maintenance {
    min-height: calc(100svh - 170px);
    display: grid;
    place-items: center;
}

.maintenance-card {
    max-width: 620px;
    margin: 0 auto;
    text-align: center;
}

.maintenance-card .card-icon {
    margin: 0 auto 22px;
}

.maintenance-card .eyebrow {
    justify-content: center;
}

.maintenance-card h1 {
    margin-bottom: 18px;
    font-size: clamp(36px, 5vw, 56px);
    line-height: 1.08;
    letter-spacing: -1.8px;
}

.maintenance-contact {
    margin-top: 26px;
    font-size: 14px;
}

/* Terms and privacy */

.legal {
    max-width: 780px;
}

.legal h1 {
    font-size: clamp(34px, 4.4vw, 52px);
    line-height: 1.1;
    letter-spacing: -1.6px;
}

.legal-updated {
    margin: 10px 0 36px;
    font-size: 13px;
    color: var(--muted);
}

.prose {
    font-size: 16px;
    color: #2b3a33;
}

.prose h1,
.prose h2,
.prose h3 {
    margin: 36px 0 12px;
    color: var(--ink);
    line-height: 1.25;
    letter-spacing: -0.4px;
}

.prose h1 {
    font-size: 28px;
}

.prose h2 {
    font-size: 23px;
}

.prose h3 {
    font-size: 19px;
}

.prose p,
.prose ul,
.prose ol {
    margin: 0 0 16px;
}

.prose a {
    color: var(--ink);
    text-decoration: underline;
}

/* Customer account: menu, forms, applications */

.account-link.is-current {
    text-decoration: underline;
    text-underline-offset: 6px;
}

.field {
    flex: 1 1 260px;
}

.field label {
    display: block;
    margin-bottom: 8px;
    font-size: 13px;
    font-weight: 600;
}

.field input {
    width: 100%;
    padding: 12px 13px;
    border: 1px solid var(--line);
    border-radius: 5px;
    background: var(--paper);
    font: inherit;
    color: var(--ink);
}

.field input:focus {
    outline: 2px solid var(--brand-primary);
    outline-offset: 2px;
}

.field input[aria-invalid='true'] {
    border-color: #9a2020;
}

.field input.uppercase {
    text-transform: uppercase;
}

.field-error,
.field-hint {
    margin: 6px 0 0;
    font-size: 13px;
}

.field-error {
    color: #9a2020;
}

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

.inline-form {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 14px;
}

/* Line the button up with the input, not the label */
.inline-form .button {
    margin-top: 29px;
}

.inline-form + .app-card,
.app-card + .app-card,
.inline-form + .app-empty-state {
    margin-top: 18px;
}

.account > .container > .inline-form {
    margin-bottom: 18px;
}

.app-card-head {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
    gap: 14px;
}

.app-card-head h3 {
    margin: 0;
}

.app-meta {
    margin: 4px 0 0;
    font-size: 13px;
    color: var(--muted);
}

.app-card-actions,
.sender-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.app-card-actions form,
.sender-actions form {
    margin: 0;
}

.app-subhead {
    margin: 24px 0 4px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--muted);
}

.sender-row .mono,
.mono {
    font-family: ui-monospace, 'SFMono-Regular', Menlo, monospace;
    letter-spacing: 0.5px;
}

.sender-note {
    display: block;
    font-size: 12px;
    color: var(--muted);
}

.app-empty {
    margin: 10px 0 0;
    font-size: 14px;
    color: var(--muted);
}

.sender-form {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px dashed var(--line);
}

.sender-form .button {
    margin-top: 29px;
}

.app-empty-state {
    text-align: center;
}

.app-empty-state .card-icon {
    margin: 0 auto;
}

.link-button {
    padding: 0;
    border: 0;
    background: none;
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    color: #9a2020;
    cursor: pointer;
}

.link-button:hover {
    text-decoration: underline;
}

.key-reveal {
    margin-bottom: 32px;
    padding: 24px;
    border: 2px solid var(--brand-primary);
    border-radius: var(--radius);
    background: var(--white);
}

.key-reveal h3 {
    margin: 0 0 8px;
}

.key-reveal p {
    margin: 0 0 16px;
    font-size: 14px;
}

.key-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.key-row input {
    flex: 1 1 320px;
    padding: 12px 13px;
    border: 1px solid var(--line);
    border-radius: 5px;
    background: var(--paper);
    font-family: ui-monospace, 'SFMono-Regular', Menlo, monospace;
    font-size: 14px;
    color: var(--ink);
}

@media (max-width: 640px) {
    .inline-form .button,
    .sender-form .button {
        margin-top: 0;
        width: 100%;
    }
}

.card-link {
    float: right;
    font-size: 13px;
    font-weight: 600;
}

.account-link {
    font-weight: 500;
}

/* Typed Sender IDs are upper-cased; the example text stays as written */
.field input.uppercase::placeholder {
    text-transform: none;
}

/* Small screens: let the menu wrap under the brand instead of running off-screen */
@media (max-width: 640px) {
    .site-header .container {
        flex-wrap: wrap;
        row-gap: 4px;
        padding-top: 10px;
        padding-bottom: 10px;
    }

    .site-nav {
        gap: 16px;
    }

    .brand {
        font-size: 18px;
    }
}
