/* ============================================================
   Cornhill Pets — business-sale microsite
   Mobile-first (QR poster entry), progressively enhanced.
   Palette: warm heritage green + cream, gold accents.
   ============================================================ */

:root {
    --brand: #2d5a45;          /* deep heritage green */
    --brand-dark: #1f4032;
    --brand-darker: #163025;
    --gold: #c9a24b;
    --gold-soft: #f3ead5;
    --cream: #faf7f0;
    --card: #ffffff;
    --ink: #26302c;
    --muted: #5f6b66;
    --line: #e6e0d3;
    --error-bg: #fbeae7;
    --error: #a2372c;
    --ok-bg: #edf6ef;
    --radius: 14px;
    --shadow: 0 1px 2px rgba(22, 48, 37, .06), 0 8px 24px rgba(22, 48, 37, .07);
    --shadow-lift: 0 2px 4px rgba(22, 48, 37, .08), 0 12px 32px rgba(22, 48, 37, .12);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: Georgia, "Times New Roman", serif;
    background: var(--cream);
    color: var(--ink);
    line-height: 1.62;
    font-size: 17px;
}

.wrap { max-width: 920px; margin: 0 auto; padding: 0 20px; }

/* ---------- Top bar ---------- */
.topbar {
    background: var(--brand-darker);
    color: #d8cf9e;
    font-size: .78rem;
    letter-spacing: .12em;
    text-transform: uppercase;
    text-align: center;
    padding: 7px 12px;
    font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
}

/* ---------- Header ---------- */
.site-header {
    background: linear-gradient(135deg, var(--brand-dark) 0%, var(--brand) 100%);
    color: #fff;
    padding: 18px 0 20px;
    box-shadow: var(--shadow);
}
.site-header .wrap { display: flex; flex-direction: column; gap: 14px; }
.brand {
    display: flex; align-items: baseline; gap: 10px;
    color: #fff; text-decoration: none;
}
.brand .brand-name {
    font-size: 1.45rem; font-weight: 700; letter-spacing: .02em;
}
.brand .brand-tag {
    color: var(--gold); font-style: italic; font-size: .95rem;
    font-family: Georgia, serif;
}
.nav { display: flex; flex-wrap: wrap; gap: 6px 4px; }
.nav a {
    color: #cfe3d6; text-decoration: none; font-size: .92rem;
    padding: 7px 12px; border-radius: 999px;
    font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
    transition: background .15s, color .15s;
}
.nav a:hover { background: rgba(255, 255, 255, .12); color: #fff; }
.nav a.active { background: var(--gold); color: var(--brand-darker); font-weight: 600; }
.nav a.nav-logout { color: #9fb5a9; }
.nav a.nav-logout:hover { background: rgba(255,255,255,.08); color: #fff; }

/* ---------- User greeting (discreet, header right) ---------- */
.user-greeting {
    display: flex; flex-direction: column; align-items: flex-end; gap: 0;
    font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
    line-height: 1.25;
}
.user-greeting .user-label {
    font-size: .7rem; text-transform: uppercase; letter-spacing: .14em;
    color: #a8c3b2;
}
.user-greeting .user-name {
    font-size: .95rem; color: var(--gold); font-weight: 600;
    max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* ---------- Hero (welcome) ---------- */
.hero {
    text-align: center;
    padding: 52px 20px 44px;
    background:
        radial-gradient(1200px 500px at 50% -80px, rgba(201, 162, 75, .16), transparent 70%),
        var(--cream);
    border-bottom: 1px solid var(--line);
}
.hero h1 {
    font-size: clamp(1.7rem, 5vw, 2.5rem);
    font-weight: 700;
    margin: 0 auto 16px;
    max-width: 18ch;
    line-height: 1.25;
    color: var(--brand-darker);
}
.hero .lead {
    font-size: 1.08rem;
    color: var(--muted);
    max-width: 52ch;
    margin: 0 auto 28px;
}
.hero .btn-primary { font-size: 1.05rem; padding: 15px 34px; }

/* ---------- Sections + cards ---------- */
main { padding: 36px 0 56px; }
section { margin-bottom: 36px; }
.card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 28px 24px;
    max-width: 680px;
    margin: 0 auto 28px;
}

h1 {
    font-size: 1.65rem; margin: 0 0 14px; color: var(--brand-darker);
    line-height: 1.3;
}
h2 { font-size: 1.3rem; margin: 26px 0 10px; color: var(--brand-dark); }
h3 { font-size: 1.08rem; margin: 18px 0 8px; color: var(--brand-dark); }

.lead { font-size: 1.02rem; color: var(--muted); }

/* ---------- Buttons ---------- */
.btn {
    display: inline-block;
    padding: 13px 24px;
    border-radius: 10px;
    border: 1px solid var(--brand);
    color: var(--brand);
    background: #fff;
    font-size: .98rem;
    font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
    text-decoration: none;
    cursor: pointer;
    transition: transform .12s, box-shadow .12s, background .15s;
    box-shadow: var(--shadow);
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-lift); }
.btn-primary {
    background: linear-gradient(135deg, var(--brand) 0%, var(--brand-dark) 100%);
    color: #fff; border-color: var(--brand-dark);
}
.btn-primary:hover { background: linear-gradient(135deg, var(--brand-dark) 0%, var(--brand-darker) 100%); }

/* ---------- Forms ---------- */
form { display: flex; flex-direction: column; gap: 16px; margin-top: 16px; }
label { font-weight: 600; font-size: .88rem; color: var(--brand-dark);
        font-family: system-ui, -apple-system, "Segoe UI", sans-serif; }
input {
    padding: 14px 16px; font-size: 1.02rem; border: 1px solid var(--line);
    border-radius: 10px; background: #fffefb; width: 100%;
    font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
    transition: border-color .15s, box-shadow .15s;
}
input:focus {
    outline: none; border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(45, 90, 69, .15);
}

.error {
    background: var(--error-bg); color: var(--error);
    border: 1px solid #ecc7c0; border-radius: 10px; padding: 12px 16px;
    font-size: .95rem;
}

.callout {
    background: var(--gold-soft);
    border-left: 4px solid var(--gold);
    padding: 16px 18px; border-radius: 0 12px 12px 0;
    font-weight: 500; font-size: 1.02rem;
    box-shadow: var(--shadow);
}

/* ---------- Photos ---------- */
.photo-grid {
    display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin-top: 16px;
}
.photo-grid img {
    width: 100%; height: auto; border-radius: 12px; border: 1px solid var(--line);
    background: #efeadf; min-height: 140px; object-fit: cover;
    box-shadow: var(--shadow);
}
figure { margin: 0; }
figcaption { font-size: .82rem; color: var(--muted); margin-top: 6px;
             font-family: system-ui, -apple-system, "Segoe UI", sans-serif; }

/* ---------- Disclaimer block ---------- */
.disclaimer {
    background: #fbf8ef;
    border: 1px solid var(--gold);
    border-radius: 12px;
    padding: 18px 20px;
    font-size: .96rem;
}
.disclaimer p { margin: 0 0 10px; }
.disclaimer p:last-child { margin-bottom: 0; }

/* ---------- Accounts table ---------- */
.year-block {
    background: var(--card); border: 1px solid var(--line);
    border-radius: var(--radius); box-shadow: var(--shadow);
    padding: 22px 20px; margin-bottom: 24px;
    overflow-x: auto;
}
table.accounts { width: 100%; border-collapse: collapse; font-size: .93rem; }
table.accounts th, table.accounts td {
    text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line);
    vertical-align: top;
}
table.accounts th {
    background: var(--brand-darker); color: var(--gold-soft);
    font-size: .78rem; text-transform: uppercase; letter-spacing: .09em;
    font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
}
table.accounts tbody tr:last-child td { border-bottom: none; }
table.accounts tr:nth-child(even) td { background: #faf8f2; }
td.amount { white-space: nowrap; font-variant-numeric: tabular-nums; font-weight: 600; }
.explanation {
    background: #f7f4ea; border-radius: 10px; padding: 14px 16px;
    font-size: .93rem; color: #4a544f;
}

.downloads ul { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 12px; }

/* ---------- Footer ---------- */
.site-footer {
    background: var(--brand-darker);
    color: #93a89b; padding: 22px 0; font-size: .82rem;
    font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
}
.site-footer .wrap { display: flex; flex-direction: column; gap: 4px; }
.site-footer .gold-rule {
    width: 56px; height: 2px; background: var(--gold);
    margin-bottom: 10px; border-radius: 2px;
}

/* ---------- Misc ---------- */
.small { color: var(--muted); font-size: .85rem;
         font-family: system-ui, -apple-system, "Segoe UI", sans-serif; }
code { background: var(--gold-soft); padding: 1px 6px; border-radius: 6px;
       font-size: .88em; }
hr.sep { border: none; height: 1px; background: var(--line); margin: 28px 0; }

@media (min-width: 640px) {
    .site-header .wrap { flex-direction: row; justify-content: space-between; align-items: center; }
    .photo-grid { grid-template-columns: repeat(3, 1fr); }
    .hero { padding: 72px 20px 60px; }
    .card { padding: 34px 32px; }
}

img { color: var(--muted); }
