/* Hand-written styles for what css/tailwind.css (prebuilt, only the classes already in use) does not have:
   a few Tailwind classes the pages use that it lacks, the top bar on narrow phones and the cookie banner link
   (every page), and the sample websites, the website prices and the contact form on the home page. Colours
   follow the brand (sky) and slate scales. */

/* ── Tailwind classes missing from css/tailwind.css ───────────────────────────────────────────── */
/* Without these the headline gradient faded to nothing, the EasyTaxer card took one column of three, and the
   logo did not change on hover. Values are Tailwind's own. */
.to-violet-600 {
    --tw-gradient-to: #7c3aed var(--tw-gradient-to-position);
}

.group:hover .group-hover\:bg-brand-800 {
    background-color: rgb(7 89 133);
}

@media (min-width: 1024px) {
    .lg\:col-span-2 {
        grid-column: span 2 / span 2;
    }
}

/* ── Top bar ──────────────────────────────────────────────────────────────────────────────────── */
/* On phones narrower than 390px the name and "Start a project" each wrapped onto two lines: keep them on one,
   a little smaller, and under 340px leave "Start a project" to the menu and the button below the headline. */
.nav-name,
.nav-cta {
    white-space: nowrap;
}

@media (max-width: 389px) {
    .nav-name {
        font-size: 1.05rem;
    }

    .nav-cta {
        padding-left: 0.9rem;
        padding-right: 0.9rem;
        font-size: 0.8125rem;
    }
}

@media (max-width: 339px) {
    .nav-cta {
        display: none;
    }
}

/* A bigger tap target for the menu button, without moving the icon. */
.nav-menu-button {
    padding: 0.6rem;
    margin: -0.6rem -0.6rem -0.6rem 0;
}

/* ── Cookie banner (js/consent.js) ────────────────────────────────────────────────────────────── */
/* Its link sits in a sentence, so it is underlined, not told apart by colour alone. */
#cookie-banner a {
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* ── Recent work (#websites) ──────────────────────────────────────────────────────────────────── */
/* The projects stack on phones and tablets, and sit side by side from 1024px. */
.recent-work {
    display: grid;
    gap: 2.5rem;
}

@media (min-width: 1024px) {
    .recent-work {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 2rem;
    }
}

/* ── Sample websites ──────────────────────────────────────────────────────────────────────────── */
.samples {
    margin-top: 6rem;
}

/* Two columns on phones (name only), three on tablets, four on desktops. */
.samples-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.875rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

@media (min-width: 640px) {
    .samples-grid {
        gap: 1.5rem;
    }
}

@media (min-width: 768px) {
    .samples-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (min-width: 1024px) {
    .samples-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

.samples-grid li {
    display: flex;
}

/* The whole card is one link, so keyboard users meet each sample once. */
.sample-card {
    display: flex;
    flex-direction: column;
    width: 100%;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    border-radius: 1.25rem;
    background: #fff;
    box-shadow: 0 1px 2px rgb(15 23 42 / 0.05);
    color: inherit;
    transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}

.sample-card:hover {
    border-color: #cbd5e1;
    box-shadow: 0 16px 32px -18px rgb(15 23 42 / 0.4);
    transform: translateY(-2px);
}

.sample-card:focus-visible {
    outline: 3px solid #0284c7;
    outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
    .sample-card {
        transition: none;
    }

    .sample-card:hover {
        transform: none;
    }
}

.sample-card img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 8 / 5;
    border-bottom: 1px solid #f1f5f9;
    background: #f1f5f9;
}

.sample-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 0.75rem 0.85rem 0.9rem;
}

.sample-type {
    color: #64748b;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    line-height: 1.3;
    text-transform: uppercase;
}

.sample-name {
    margin-top: 0.25rem;
    color: #0f172a;
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.3;
}

.sample-text {
    display: none;
    margin-top: 0.5rem;
    color: #475569;
    font-size: 0.9rem;
    line-height: 1.5;
}

.sample-open {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: auto;
    padding-top: 0.75rem;
    color: #0369a1;
    font-size: 0.8rem;
    font-weight: 600;
}

.sample-open i {
    font-size: 0.7rem;
}

.sample-card:hover .sample-open {
    text-decoration: underline;
    text-underline-offset: 2px;
}

@media (min-width: 640px) {
    .sample-body {
        padding: 1.1rem 1.25rem 1.25rem;
    }

    .sample-type {
        font-size: 0.72rem;
    }

    .sample-name {
        font-size: 1.1rem;
    }

    .sample-text {
        display: block;
    }

    .sample-open {
        padding-top: 1rem;
        font-size: 0.875rem;
    }
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

/* ── Website prices ───────────────────────────────────────────────────────────────────────────── */
.prices {
    margin-top: 6rem;
}

.price-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 1.5rem;
    padding: 2rem;
    box-shadow: 0 1px 2px rgb(15 23 42 / 0.05);
}

.price-card.is-featured {
    border: 2px solid #0284c7;
    box-shadow: 0 18px 40px -18px rgb(2 132 199 / 0.45);
}

.price-badge {
    align-self: flex-start;
    margin-bottom: 1rem;
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    background: #e0f2fe;
    color: #075985;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.price-amount {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.25rem 0.4rem;
    margin: 0 0 1.5rem;
}

.price-amount small {
    color: #64748b;
    font-size: 0.875rem;
    font-weight: 600;
}

.price-amount strong {
    color: #0f172a;
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1;
}

.price-list {
    flex: 1;
    margin: 0 0 2rem;
    padding: 0;
    list-style: none;
}

.price-list li {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    margin-top: 0.75rem;
}

.price-list i {
    flex-shrink: 0;
    margin-top: 0.3rem;
    color: #0284c7;
    font-size: 0.8rem;
}

.price-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    border: 1.5px solid #0f172a;
    border-radius: 999px;
    color: #0f172a;
    font-size: 0.9rem;
    font-weight: 600;
    transition: background-color 0.15s, color 0.15s;
}

.price-cta:hover,
.is-featured .price-cta {
    background: #0f172a;
    color: #fff;
}

.is-featured .price-cta:hover {
    background: #1e293b;
}

.care-plan {
    display: grid;
    gap: 1.5rem;
    margin-top: 2rem;
    padding: 2rem;
    border-radius: 1.5rem;
    background: #0f172a;
    color: #cbd5e1;
}

.care-plan-optional {
    color: #cbd5e1;
    font-weight: 500;
}

.care-plan .price-amount strong {
    color: #fff;
}

.care-plan .price-amount small {
    color: #94a3b8;
}

@media (min-width: 768px) {
    .care-plan {
        grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
        align-items: center;
    }

    .care-plan-price {
        text-align: right;
    }

    .care-plan .price-amount {
        justify-content: flex-end;
    }
}

/* ── Contact form ─────────────────────────────────────────────────────────────────────────────── */
.contact-form {
    margin-top: 3rem;
    padding: 2rem;
    border: 1px solid #f1f5f9;
    border-radius: 1.5rem;
    background: #f8fafc;
    text-align: left;
}

.form-grid {
    display: grid;
    gap: 1.25rem;
}

@media (min-width: 640px) {
    .form-grid {
        grid-template-columns: 1fr 1fr;
    }

    .form-grid .is-wide {
        grid-column: 1 / -1;
    }
}

.field label {
    display: block;
    margin-bottom: 0.4rem;
    color: #0f172a;
    font-size: 0.9rem;
    font-weight: 600;
}

.field label span {
    color: #64748b;
    font-weight: 500;
}

.field input,
.field select,
.field textarea {
    display: block;
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #cbd5e1;
    border-radius: 0.75rem;
    background: #fff;
    color: #0f172a;
    font: inherit;
}

.field textarea {
    min-height: 9rem;
    resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
    border-color: #0284c7;
    outline: 3px solid rgb(14 165 233 / 0.35);
    outline-offset: 0;
}

.field [aria-invalid="true"] {
    border-color: #b91c1c;
}

.field-error {
    margin: 0.4rem 0 0;
    color: #b91c1c;
    font-size: 0.85rem;
    font-weight: 600;
}

/* Links inside the form's small print are underlined, not told apart by colour alone. */
.contact-form p a {
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* The spam trap: people never see or reach it, so only bots fill it in. */
.form-trap {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.form-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem 1.5rem;
    margin-top: 1.5rem;
}

.form-actions button[disabled] {
    opacity: 0.6;
    cursor: progress;
}

.form-status {
    margin: 1.25rem 0 0;
    padding: 0.9rem 1rem;
    border-radius: 0.75rem;
    background: #fef2f2;
    color: #991b1b;
    font-weight: 600;
}

.form-sent {
    margin-top: 3rem;
    padding: 2.5rem 2rem;
    border: 1px solid #bae6fd;
    border-radius: 1.5rem;
    background: #f0f9ff;
    text-align: center;
}

.form-sent h3:focus {
    outline: none;
}
