/* Pico handles most styling. --accent and --on-accent (readable text on the accent) are set per hotel in _Layout.
   Look: "Luxury Minimal" (warm paper, serif voice, hairlines instead of shadows). Light only for now:
   _Layout sets data-theme="light", and a dark palette hasn't been designed yet. */

/* Design tokens. :root[data-theme] matches Pico's own light-theme selector and comes later, so it wins. */
:root[data-theme="light"] {
    --paper: #f6f3ee;
    --paper-raised: #fffdf9;
    --ink: #1b1a17;
    --ink-soft: #3a3732;
    --muted: #5e5950;
    --hairline: #d8d2c7;
    --hairline-soft: #e6e1d8;
    --field-border: #cfc8bc;
    --font-serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
    --font-sans: "Hanken Grotesk", system-ui, "Segoe UI", sans-serif;
    --ease-arrive: cubic-bezier(0.22, 1, 0.36, 1);
    --duration-arrive: 700ms;
    --duration-respond: 120ms;

    --pico-font-family-sans-serif: var(--font-sans);
    --pico-background-color: var(--paper);
    --pico-color: var(--ink);
    --pico-muted-color: var(--muted);
    --pico-muted-border-color: var(--hairline);
    --pico-h1-color: var(--ink);
    --pico-h2-color: var(--ink);
    --pico-h3-color: var(--ink);
    --pico-h4-color: var(--ink);
    --pico-h5-color: var(--ink-soft);
    --pico-h6-color: var(--muted);
    --pico-box-shadow: none;
    --pico-card-background-color: var(--paper-raised);
    --pico-card-sectioning-background-color: var(--paper);
    --pico-card-box-shadow: none;
    --pico-dropdown-background-color: var(--paper-raised);
    --pico-dropdown-border-color: var(--hairline);
    --pico-table-border-color: var(--hairline-soft);
    --pico-code-background-color: var(--hairline-soft);
    --pico-mark-background-color: var(--hairline-soft);
    --pico-mark-color: var(--ink);
    --pico-form-element-background-color: var(--paper-raised);
    --pico-form-element-active-background-color: var(--paper-raised);
    --pico-form-element-selected-background-color: var(--hairline-soft);
    --pico-form-element-border-color: var(--field-border);
    --pico-form-element-color: var(--ink);
    --pico-secondary: var(--muted);
    --pico-secondary-background: var(--ink-soft);
    --pico-secondary-border: var(--field-border);
    --pico-secondary-underline: rgba(94, 89, 80, 0.4);
    --pico-secondary-hover: var(--ink);
    --pico-secondary-hover-background: var(--ink);
    --pico-secondary-hover-border: var(--ink);
    --pico-secondary-focus: rgba(94, 89, 80, 0.25);
    --pico-contrast: var(--ink);
    --pico-contrast-background: var(--ink);
    --pico-contrast-hover-background: #000;
    --pico-border-radius: 0.5rem;
    --pico-transition: var(--duration-respond) ease-out;
}

/* Pico defines its colors on :root with more specific selectors, so the accent overrides go on body. */
body {
    --pico-primary: var(--accent);
    --pico-primary-background: var(--accent);
    --pico-primary-border: var(--accent);
    --pico-primary-inverse: var(--on-accent);
    --pico-primary-underline: color-mix(in srgb, var(--accent) 50%, transparent);
    --pico-primary-hover: color-mix(in srgb, var(--accent) 85%, black);
    --pico-primary-hover-background: color-mix(in srgb, var(--accent) 85%, black);
    --pico-primary-focus: color-mix(in srgb, var(--accent) 35%, transparent);
}

/* Typography: the serif is the human voice (names, amounts, headings, guest words), never below 24px.
   The sans does the work. Hierarchy comes from size and space; nothing heavier than 600. */
h1, h2, h3 {
    font-family: var(--font-serif);
    font-weight: 500;
    letter-spacing: -0.005em;
}

h1 {
    --pico-font-size: 2.5rem;
    --pico-line-height: 1.05;
}

h2 {
    --pico-font-size: 1.75rem;
    --pico-line-height: 1.15;
}

h3 {
    --pico-font-size: 1.5rem;
    --pico-line-height: 1.2;
}

h4, h5, h6, th, strong, b {
    font-weight: 600;
}

table {
    font-variant-numeric: tabular-nums;
}

/* Small spaced capitals for section and department labels. */
.label {
    font-family: var(--font-sans);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.16em;
    line-height: 1.4;
    text-transform: uppercase;
    color: var(--muted);
}

/* Hairlines, not boxes. */
article {
    border: 1px solid var(--hairline);
}

/* Buttons are pills; a press answers within 120ms. */
button,
[role="button"],
[type="submit"],
[type="button"],
[type="reset"] {
    border-radius: 999px;
    font-weight: 500;
}

button:active,
[role="button"]:active,
[type="submit"]:active,
[type="button"]:active {
    transform: scale(0.97);
}

/* Motion: content the hotel shows arrives slowly; what the guest does is answered at once.
   Stagger with style="--i: n" (60ms per step). */
@keyframes arrive {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

.arrive {
    animation: arrive var(--duration-arrive) var(--ease-arrive) both;
    animation-delay: calc(var(--i, 0) * 60ms);
}

@keyframes fade-in {
    from {
        opacity: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    .arrive {
        animation: fade-in 200ms ease-out both;
    }

    button:active,
    [role="button"]:active,
    [type="submit"]:active,
    [type="button"]:active,
    a.staff-card:active {
        transform: none;
    }
}

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

/* The header nav wraps on phones instead of overflowing. */
header > nav,
header > nav ul {
    flex-wrap: wrap;
}

form.inline {
    margin: 0;
}

form.inline button {
    width: auto;
    margin: 0 0.25rem 0 0;
    padding: 0.35rem 0.8rem;
}

.staff-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.staff-card {
    text-align: center;
    margin: 0;
    padding: 1rem 0.5rem;
}

.avatar {
    width: 4.5rem;
    height: 4.5rem;
    border-radius: 50%;
    margin: 0 auto 0.5rem;
    display: grid;
    place-items: center;
    object-fit: cover;
    background: var(--accent);
    color: var(--on-accent);
    font-family: var(--font-serif);
    font-weight: 600;
    font-size: 1.6rem;
}

.staff-card small {
    display: block;
    color: var(--pico-muted-color);
}

article.narrow {
    max-width: 28rem;
    margin-inline: auto;
}

.avatar.small {
    width: 2.5rem;
    height: 2.5rem;
    font-size: 0.9rem;
    margin: 0;
}

.staff-table td {
    vertical-align: middle;
}

.photo-field {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    flex-wrap: wrap;
}

.photo-field .avatar {
    margin: 0;
}

.qr-preview {
    max-width: 18rem;
    margin: 0 auto;
    background: #fff;
    padding: 0.5rem;
    border-radius: var(--pico-border-radius);
}

.qr-preview svg {
    display: block;
    width: 100%;
    height: auto;
}

/* Guest landing page: arrival, invitation, search, faces, team tip. */
.guest-hero {
    margin-bottom: 2.5rem;
}

.guest-hero .cover {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    max-height: 22rem;
    object-fit: cover;
    border-radius: var(--pico-border-radius);
    margin-bottom: 2rem;
}

/* On phones the cover runs edge to edge. */
@media (max-width: 575px) {
    .guest-hero .cover {
        width: calc(100% + 2 * var(--pico-spacing));
        max-width: none;
        margin-inline: calc(-1 * var(--pico-spacing));
        border-radius: 0;
    }
}

.guest-hero .logo {
    display: block;
    max-height: 3.5rem;
    max-width: 12rem;
    margin-bottom: 1.25rem;
}

.guest-hero .label {
    margin: 0 0 0.75rem;
}

.guest-hero h1 {
    margin: 0;
    font-size: 2.75rem;
    line-height: 1.02;
}

.invitation {
    max-width: 30rem;
    margin-bottom: 2.5rem;
}

.invitation > p {
    font-size: 1.2rem;
    line-height: 1.5;
}

input[type="search"][data-staff-search] {
    min-height: 3.5rem;
    border-radius: 999px;
    padding-inline: 3rem 1.25rem; /* the start side leaves room for Pico's search icon */
    font-size: 1.05rem;
}

.search-field {
    margin-bottom: 2.5rem;
}

.search-field label {
    font-size: 0.9rem;
    color: var(--muted);
}

[data-department] {
    margin-bottom: 3rem;
}

.department-heading {
    margin: 0 0 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--hairline);
}

.team-tip {
    display: flex;
    justify-content: center;
}

.team-tip [role="button"] {
    margin: 0;
}

/* Faces on paper, no card boxes. The whole portrait is the tap target. */
.guest-staff {
    grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr));
    gap: 1.75rem 1rem;
}

a.staff-card {
    display: block;
    text-align: center;
    padding: 0.5rem 0.25rem;
    border-radius: var(--pico-border-radius);
    color: inherit;
    text-decoration: none;
    transition: transform var(--duration-respond) ease-out;
}

a.staff-card:active {
    transform: scale(0.97);
}

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

a.staff-card .avatar {
    width: 5.5rem;
    height: 5.5rem;
    margin-bottom: 0.75rem;
    font-size: 2rem;
}

a.staff-card strong {
    display: block;
    font-family: var(--font-serif);
    font-size: 1.5rem;
    font-weight: 500;
    line-height: 1.1;
}

a.staff-card small {
    margin-top: 0.25rem;
    font-size: 0.875rem;
}

.recipient {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.recipient .avatar {
    margin: 0;
    flex-shrink: 0;
}

.recipient h1 {
    margin: 0;
}

.recipient p {
    margin: 0;
    color: var(--pico-muted-color);
}

.amount-presets {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.amount-presets label {
    margin: 0;
    position: relative;
    width: auto; /* Pico shrinks labels with radios to fit-content */
}

.amount-presets input {
    position: absolute;
    opacity: 0;
    inset: 0;
    margin: 0;
}

.amount-presets span {
    display: block;
    text-align: center;
    padding: 0.7rem 0;
    border: 1px solid var(--field-border);
    border-radius: 999px;
    font-weight: 500;
    font-variant-numeric: tabular-nums;
    cursor: pointer;
    transition: background-color var(--duration-respond) ease-out, color var(--duration-respond) ease-out,
        border-color var(--duration-respond) ease-out;
}

.amount-presets input:checked + span {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--on-accent);
}

.amount-presets input:focus-visible + span {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.field-error {
    color: var(--pico-del-color);
}

.thank-you {
    text-align: center;
}

.settings-preview {
    max-height: 6rem;
    max-width: 100%;
    border-radius: var(--pico-border-radius);
    margin-bottom: 0.5rem;
}

.preset-inputs {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
}

.preset-inputs input {
    margin: 0;
}

.negative {
    color: var(--pico-del-color);
}

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

.actions button {
    margin: 0;
}

.big-amount {
    font-family: var(--font-serif);
    font-size: 3rem;
    font-weight: 500;
    line-height: 1.05;
    margin: 0 0 0.5rem;
}

.totals article {
    margin: 0;
    padding: 0.75rem 1rem;
}

.totals header {
    margin: -0.75rem -1rem 0.5rem;
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
}

.filters {
    margin-bottom: 1rem;
}

.lang-switch a {
    font-size: 0.85rem;
    padding: 0.25rem 0.4rem;
}

.lang-switch a[aria-current] {
    font-weight: 700;
    text-decoration: underline;
}

/* Public landing page on the apex: arrival → how it works → what reaches staff → managers → trust → contact. */
.landing {
    max-width: 60rem;
    margin-inline: auto;
}

.landing .lede {
    font-size: 1.15rem;
    line-height: 1.6;
    color: var(--ink-soft);
    max-width: 36rem;
}

.landing h2 {
    --pico-font-size: clamp(1.9rem, 4vw, 2.6rem);
    max-width: 34rem;
}

.landing-hero {
    padding: 3rem 0 4.5rem;
}

.landing-hero h1 {
    --pico-font-size: clamp(2.6rem, 7vw, 4.75rem);
    --pico-line-height: 1.02;
    max-width: 14ch;
    margin-bottom: 1.5rem;
}

.landing-hero [role="button"] {
    margin-top: 0.5rem;
    padding-inline: 2rem;
}

.landing-section {
    padding: 4rem 0;
    border-top: 1px solid var(--hairline);
}

.landing-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
    gap: 2.5rem;
    margin: 2.5rem 0 0;
    padding: 0;
    list-style: none;
    counter-reset: step;
}

.landing-steps li {
    counter-increment: step;
}

.landing-steps li::before {
    content: counter(step, lower-roman) ".";
    display: block;
    margin-bottom: 0.75rem;
    font-family: var(--font-serif);
    font-style: italic;
    font-size: 1.75rem;
    line-height: 1;
    color: var(--accent);
}

.landing-steps h3 {
    margin-bottom: 0.5rem;
}

.landing-steps p {
    margin: 0;
    color: var(--muted);
}

.landing-split,
.landing-contact {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr));
    gap: 3rem;
    align-items: start;
}

/* A thank-you note as staff see it: the emotional peak of the page. */
.landing-note {
    margin: 0;
    padding: 2rem;
    background: var(--paper-raised);
    border: 1px solid var(--hairline);
    border-radius: var(--pico-border-radius);
}

.landing-note-amount {
    margin: 0 0 1rem;
    font-family: var(--font-serif);
    font-size: 2.5rem;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.landing-note blockquote {
    margin: 0 0 1.25rem;
    padding: 0;
    border: 0;
    font-family: var(--font-serif);
    font-style: italic;
    font-size: 1.6rem;
    line-height: 1.3;
}

.landing-note figcaption {
    padding: 0;
    font-size: 0.85rem;
    color: var(--muted);
}

.landing-list,
.landing-trust {
    margin: 2rem 0 0;
    padding: 0;
    list-style: none;
}

.landing-list li {
    padding: 1rem 0;
    border-bottom: 1px solid var(--hairline-soft);
    font-size: 1.1rem;
    list-style: none;
}

.landing-trust {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
    gap: 1rem 2.5rem;
}

.landing-trust li {
    padding-top: 1rem;
    border-top: 1px solid var(--accent);
    font-family: var(--font-serif);
    font-size: 1.5rem;
    line-height: 1.2;
    list-style: none;
}

.landing-details {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.5rem 1.5rem;
    margin: 2rem 0 0;
}

.landing-details dt {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--muted);
    align-self: center;
}

.landing-details dd {
    margin: 0;
}

.landing-form button {
    width: auto;
    padding-inline: 2rem;
}

.landing-sent {
    padding: 2rem;
    border: 1px solid var(--hairline);
    border-radius: var(--pico-border-radius);
    background: var(--paper-raised);
    font-family: var(--font-serif);
    font-size: 1.6rem;
    line-height: 1.3;
}

/* Off-screen rather than display:none, which some bots skip. */
.honeypot {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.landing-footer {
    padding: 2rem 0 1rem;
    border-top: 1px solid var(--hairline);
    font-size: 0.875rem;
    color: var(--muted);
}

.landing-footer p {
    margin: 0;
}
