/* Marlew Media — pine, fern and blonde roast on cream. Type: Outfit. */
:root {
  --pine: #17392b;
  --fern: #2f6b4f;
  --blonde: #c99a5b;
  --blonde-lt: #d9ae72;
  --latte: #e6d3b1;
  --cream: #f6eedd;
  --paper: #fffaf0;
  --espresso: #20170f;
  --muted: #5b5240;
  --line: #d8c8a5;
  --danger: #8f2d20;
  --radius: 14px;
  --font: 'Outfit', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--espresso);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
}
img { max-width: 100%; display: block; }
h1, h2, h3 { line-height: 1.15; letter-spacing: -0.015em; margin: 0 0 0.5em; color: var(--pine); font-weight: 600; }
h1 { font-size: clamp(2rem, 4.6vw, 3.25rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }
a { color: var(--fern); text-underline-offset: 3px; }
a:hover { color: var(--pine); }
code { font-size: 0.92em; background: var(--latte); padding: 0.1em 0.35em; border-radius: 6px; }
:focus-visible { outline: 3px solid var(--pine); outline-offset: 3px; border-radius: 4px; }

.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.wrap--narrow { max-width: 760px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--pine); color: var(--cream); padding: 10px 16px; border-radius: 8px; z-index: 10; }
.skip:focus { left: 8px; }
.hp { position: absolute; left: -9999px; height: 0; overflow: hidden; }
.muted { color: var(--muted); }
.hint { color: var(--muted); font-size: 0.95rem; margin: 0.4em 0 0; }

/* ---------- logo ---------- */
.logo { --dot: var(--blonde); --logo-sub: var(--fern); display: inline-flex; align-items: center; gap: 0.38em; color: var(--pine); }
.logo-mark { width: 1.45em; height: 1.45em; flex: none; }
.logo-m { fill: none; stroke: currentColor; stroke-width: 13; stroke-linecap: round; stroke-linejoin: round; }
.logo-dot { fill: var(--dot, var(--blonde)); }
.logo-text { display: flex; flex-direction: column; gap: 0.12em; }
.logo-name { font-weight: 600; line-height: 1; letter-spacing: -0.02em; }
.logo-sub { font-weight: 500; font-size: 0.34em; line-height: 1; letter-spacing: 0.62em; color: var(--logo-sub); }
.logo--header { font-size: 1.6rem; }
.logo--footer { font-size: 1.5rem; }
.logo--login { font-size: 2.2rem; }
.brand { text-decoration: none; display: inline-flex; align-items: center; gap: 12px; }

/* ---------- header / footer ---------- */
.site-header, .admin-header { background: var(--cream); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-top: 14px; padding-bottom: 14px; }
.nav { display: flex; align-items: center; gap: 6px 22px; flex-wrap: wrap; }
.nav a, .link-button { color: var(--pine); text-decoration: none; font-weight: 500; padding: 8px 2px; border-bottom: 2px solid transparent; }
.nav a:hover { border-bottom-color: var(--blonde); }
.nav a[aria-current='page'] { border-bottom-color: var(--pine); }
.nav .btn { color: var(--cream); border-bottom: 0; padding: 10px 18px; }
.nav .btn:hover { color: var(--cream); background: var(--fern); }
.site-footer { background: var(--pine); color: var(--cream); padding: 40px 0; margin-top: 0; }
.site-footer .logo { color: var(--cream); --dot: var(--blonde-lt); --logo-sub: var(--blonde-lt); }
.site-footer :focus-visible { outline-color: var(--blonde-lt); }
.footer-row { display: flex; align-items: center; justify-content: space-between; gap: 20px 32px; flex-wrap: wrap; }
.footer-nav { display: flex; gap: 8px 22px; flex-wrap: wrap; }
.footer-nav a { color: var(--cream); }
.footer-nav a:hover { color: var(--blonde-lt); }
.footer-note { margin: 0; color: var(--latte); font-size: 0.95rem; }

/* ---------- buttons ---------- */
.btn {
  display: inline-block; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none;
  background: var(--pine); color: var(--cream); border: 2px solid var(--pine);
  padding: 12px 24px; border-radius: 999px; line-height: 1.2;
}
.btn:hover { background: var(--fern); border-color: var(--fern); color: var(--cream); }
.btn--small { padding: 8px 18px; }
.btn--outline { background: transparent; color: var(--pine); }
.btn--outline:hover { background: var(--pine); color: var(--cream); border-color: var(--pine); }
.btn--blonde { background: var(--blonde); border-color: var(--blonde); color: var(--pine); }
.btn--blonde:hover { background: var(--blonde-lt); border-color: var(--blonde-lt); color: var(--pine); }
.btn--ghost { background: transparent; border-color: var(--cream); color: var(--cream); }
.btn--ghost:hover { background: var(--cream); color: var(--pine); border-color: var(--cream); }
.btn--danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn--danger:hover { background: #6f2218; border-color: #6f2218; color: #fff; }
.actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 24px; }
.text-link { font-weight: 500; }

/* ---------- hero ---------- */
.hero { background: var(--pine); color: var(--cream); padding: clamp(48px, 9vw, 104px) 0; }
.hero :focus-visible, .cta :focus-visible { outline-color: var(--blonde-lt); }
.hero h1 { color: var(--cream); max-width: 16em; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 48px; align-items: center; }
.eyebrow { color: var(--blonde-lt); font-weight: 500; letter-spacing: 0.3em; text-transform: uppercase; font-size: 0.85rem; margin-bottom: 1.2em; }
.lead { font-size: 1.25rem; max-width: 36em; color: var(--latte); }
.lead--dark { color: var(--muted); }
.hero-art { color: var(--cream); --dot: var(--blonde-lt); justify-self: center; width: min(100%, 340px); }
.hero-art svg { width: 100%; height: auto; }

/* ---------- sections ---------- */
.section { padding: clamp(40px, 7vw, 80px) 0; }
.section--tight { padding-top: 24px; }
.section--latte { background: var(--latte); }
.section-head, .title-row { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.section-head h2, .title-row h1 { margin: 0; }
.page-head { padding: clamp(36px, 6vw, 72px) 0 16px; }
.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 32px; margin-top: 24px; }
.col { border-top: 3px solid var(--pine); padding-top: 16px; }
.col p { color: var(--muted); }
.cta { background: var(--pine); color: var(--cream); padding: 56px 0; }
.cta h2 { color: var(--cream); margin: 0; }
.cta-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.empty { color: var(--muted); background: var(--paper); border: 1px dashed var(--line); border-radius: var(--radius); padding: 28px; }

/* ---------- cards ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 24px; }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.card-media { display: block; aspect-ratio: 16 / 10; background: var(--latte); }
.card-media img { width: 100%; height: 100%; object-fit: cover; }
.card-placeholder { height: 100%; display: grid; place-items: center; color: var(--pine); --dot: var(--blonde); }
.card-placeholder svg { width: 72px; height: 72px; }
.card-body { padding: 20px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card-title { margin: 0; font-size: 1.25rem; }
.card-title a { color: var(--pine); text-decoration: none; }
.card-title a:hover { text-decoration: underline; }
.card-text { color: var(--muted); margin: 0; }
.tags { list-style: none; margin: 8px 0 0; padding: 0; display: flex; gap: 6px; flex-wrap: wrap; }
.tags li { background: var(--latte); color: var(--pine); font-size: 0.85rem; font-weight: 500; padding: 2px 10px; border-radius: 999px; }
.filters { list-style: none; padding: 0; margin: 20px 0 0; display: flex; gap: 8px; flex-wrap: wrap; }
.filters a { display: inline-block; padding: 6px 16px; border-radius: 999px; border: 1.5px solid var(--line); color: var(--pine); text-decoration: none; font-weight: 500; background: var(--paper); }
.filters a:hover { border-color: var(--pine); }
.filters a[aria-current] { background: var(--pine); border-color: var(--pine); color: var(--cream); }

/* ---------- detail / prose ---------- */
.detail { padding: 32px 0 72px; }
.detail-image { width: 100%; border-radius: var(--radius); border: 1px solid var(--line); margin: 24px 0; }
.prose p { max-width: 42em; }

/* ---------- forms ---------- */
.form { display: flex; flex-direction: column; gap: 20px; max-width: 560px; }
.form--wide { max-width: 760px; }
.field { display: flex; flex-direction: column; gap: 6px; border: 0; padding: 0; margin: 0; min-width: 0; }
.field-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; }
label, legend { font-weight: 500; color: var(--pine); padding: 0; }
input[type='text'], input[type='email'], input[type='url'], input[type='password'], input[type='number'], select, textarea {
  font: inherit; color: var(--espresso); background: var(--paper);
  border: 1.5px solid #a89770; border-radius: 10px; padding: 10px 12px; width: 100%;
}
textarea { resize: vertical; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid var(--pine); outline-offset: 1px; }
input[type='file'] { font: inherit; }
.check { display: flex; gap: 8px; align-items: center; font-weight: 400; color: var(--espresso); }
.rating-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.rating-option { position: relative; }
.rating-option input { position: absolute; opacity: 0; }
.rating-option label { display: inline-grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; border: 2px solid var(--pine); color: var(--pine); font-weight: 600; cursor: pointer; background: var(--paper); }
.rating-option input:checked + label { background: var(--pine); color: var(--cream); }
.rating-option input:focus-visible + label { outline: 3px solid var(--blonde); outline-offset: 2px; box-shadow: 0 0 0 2px var(--pine); }
.notice { border-radius: 10px; padding: 14px 16px; margin: 0 0 20px; font-weight: 500; }
.notice--ok { background: #dcebd8; color: #14391f; }
.notice--error { background: #f3d9d2; color: #6f2218; }
.thumb { width: 220px; border-radius: 10px; border: 1px solid var(--line); }

/* ---------- admin ---------- */
.admin-tag { background: var(--blonde); color: var(--pine); font-weight: 600; font-size: 0.75rem; letter-spacing: 0.12em; text-transform: uppercase; padding: 3px 10px; border-radius: 999px; }
.admin-main { padding-top: 32px; padding-bottom: 72px; }
.admin-main h1 { font-size: 2rem; }
.admin-main h2 { margin-top: 1.6em; }
.admin-actions { display: flex; gap: 12px; flex-wrap: wrap; margin: 20px 0; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin: 20px 0; }
.stat { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; display: flex; flex-direction: column; }
.stat-num { font-size: 2.2rem; font-weight: 600; color: var(--pine); line-height: 1.1; }
.stat-label { color: var(--muted); font-size: 0.95rem; }
.badge { background: var(--blonde); color: var(--pine); font-size: 0.78rem; font-weight: 600; padding: 1px 8px; border-radius: 999px; }
.pill { display: inline-block; background: var(--latte); color: var(--pine); font-size: 0.8rem; font-weight: 600; padding: 1px 10px; border-radius: 999px; text-transform: capitalize; }
.pill--published { background: var(--fern); color: var(--cream); }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); }
.table { width: 100%; border-collapse: collapse; font-size: 0.98rem; }
.table th, .table td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table th { color: var(--muted); font-weight: 500; font-size: 0.88rem; }
.table tr:last-child td { border-bottom: 0; }
.actions-cell { display: flex; gap: 14px; }
.msg-list { list-style: none; margin: 16px 0 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.msg { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 20px; }
.msg--unread { border-left: 6px solid var(--blonde); }
.msg-meta { display: flex; gap: 8px 14px; align-items: center; flex-wrap: wrap; }
.msg-email { margin: 4px 0 0; }
.msg-body { margin: 10px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.msg-actions { display: flex; gap: 18px; margin-top: 10px; }
.stars { color: #8a5b1d; letter-spacing: 0.1em; }
.inline { display: inline; margin: 0; }
.link-button { background: none; border: 0; border-bottom: 2px solid transparent; font: inherit; font-weight: 500; cursor: pointer; padding: 8px 2px; }
.msg-actions .link-button { padding: 2px 0; color: var(--fern); text-decoration: underline; border-bottom: 0; }
.link-button--danger { color: var(--danger) !important; }
.danger-zone { margin-top: 56px; padding: 20px 24px; border: 1.5px solid var(--danger); border-radius: var(--radius); max-width: 760px; }
.danger-zone h2 { margin-top: 0; color: var(--danger); font-size: 1.25rem; }
.code { background: var(--pine); color: var(--cream); padding: 16px 20px; border-radius: 10px; overflow-x: auto; font-size: 0.95rem; line-height: 1.5; }
.admin-bare { background: var(--pine); min-height: 100vh; }
.bare-main { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login-card { background: var(--cream); border-radius: 18px; padding: 36px; width: min(100%, 420px); }
.login-logo { margin-bottom: 20px; }
.login-card h1 { font-size: 1.6rem; }

@media (max-width: 820px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-art { width: 160px; justify-self: start; order: -1; }
}
@media (prefers-reduced-motion: no-preference) {
  .btn, .card { transition: background-color 0.15s, border-color 0.15s, transform 0.15s; }
  .card:hover { transform: translateY(-2px); }
}
