/* Cosy Home — shared site styles. Warm neutrals, serif type, soft cards. */

/* Self-hosted Fraunces (OFL) — display serif for headings, wordmark, voice.
   Latin subsets only; system sans handles UI chrome. */
@font-face {
  font-family: 'Fraunces';
  src: url('/assets/fonts/fraunces-latin-400-normal.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Fraunces';
  src: url('/assets/fonts/fraunces-latin-400-italic.woff2') format('woff2');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'Fraunces';
  src: url('/assets/fonts/fraunces-latin-600-normal.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Fraunces';
  src: url('/assets/fonts/fraunces-latin-700-normal.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #faf7f2;
  --card: #ffffff;
  --text: #292524;
  --muted: #78716c;
  --accent: #9a3412;
  --accent-soft: #f5e9dd;
  --border: #e7e0d8;
  --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font-ui: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Georgia, 'Times New Roman', serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
}

/* Roofline texture — a faint row of house outlines across the top of every
   page. Bespoke-touch brand detail, inline SVG so it costs no request. */
body::before {
  content: '';
  display: block;
  height: 22px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='22' viewBox='0 0 160 22'%3E%3Cg fill='none' stroke='%239a3412' stroke-opacity='0.10' stroke-width='1.4' stroke-linejoin='round'%3E%3Cpath d='M14 18 L24 10 L34 18 M17 18 V21 H31 V18'/%3E%3Cpath d='M74 20 L82 14 L90 20 M77 20 V21.6 H87 V20'/%3E%3Cpath d='M130 18.5 L140 10.5 L150 18.5 M133 18.5 V21 H147 V18.5'/%3E%3C/g%3E%3C/svg%3E");
  background-repeat: repeat-x;
  background-position: center 6px;
}

a {
  color: var(--accent);
}

/* ── Chrome ─────────────────────────────────────────── */

.masthead {
  text-align: center;
  padding: 2.2rem 1.25rem 0;
  max-width: 56rem;
  margin: 0 auto;
}

.masthead .brand {
  display: inline-flex;
  align-items: center;
  gap: 0.9rem;
  text-decoration: none;
}

.masthead .mark {
  width: 54px;
  height: 54px;
  border-radius: 14px;
}

.masthead .wordmark {
  font-family: var(--font-display);
  font-size: 2.35rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--text);
}
.masthead .wordmark em {
  color: var(--accent);
  font-style: italic;
  font-weight: 400;
}

.masthead .tagline {
  margin: 0.4rem 0 0;
  color: var(--muted);
  font-family: var(--font-display);
  font-style: italic;
  font-size: 0.95rem;
}

.site-nav {
  display: flex;
  justify-content: center;
  gap: 2.5rem;
  margin-top: 1.5rem;
  padding: 0.65rem 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.site-nav a {
  color: var(--text);
  text-decoration: none;
  font-family: var(--font-ui);
  font-size: 0.78rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.16em;
}

.site-nav a:hover {
  color: var(--accent);
}

main {
  max-width: 56rem;
  margin: 0 auto;
  padding: 0 1.25rem 3rem;
}
main.narrow {
  max-width: 40rem;
}

.site-footer {
  text-align: center;
  padding: 1.5rem;
  font-family: var(--font-ui);
  font-size: 0.82rem;
  color: var(--muted);
  border-top: 1px solid var(--border);
}
.site-footer a {
  color: var(--muted);
  margin: 0 0.5rem;
}

/* ── Hero ───────────────────────────────────────────── */

.hero {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  margin: 1rem 0 2rem;
  min-height: 320px;
  display: flex;
  align-items: flex-end;
}

.hero img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero .overlay {
  position: relative;
  width: 100%;
  padding: 2rem;
  background: linear-gradient(transparent, rgba(28, 20, 14, 0.75));
  color: #fafaf9;
}

.hero h1 {
  margin: 0 0 0.4rem;
  font-size: 2.2rem;
}
.hero p {
  margin: 0;
  max-width: 34rem;
  opacity: 0.92;
}

/* ── Sections & cards ───────────────────────────────── */

h1,
h2,
h3 {
  font-family: var(--font-display);
}

h2 {
  font-size: 1.55rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--accent);
  margin: 2.4rem 0 0.8rem;
}
h3 {
  font-size: 1.08rem;
  font-weight: 600;
  margin: 1.6rem 0 0.4rem;
}

/* Ornamental divider — hairline with a centred house mark between major
   sections. The "made by someone" detail from the site research. */
.divider {
  margin: 2.6rem auto 0;
  max-width: 40rem;
  border-top: 1px solid var(--border);
  position: relative;
}
.divider::after {
  content: '';
  position: absolute;
  left: 50%;
  top: -10px;
  transform: translateX(-50%);
  width: 34px;
  height: 20px;
  background: var(--bg)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='34' height='20' viewBox='0 0 34 20'%3E%3Cg fill='none' stroke='%239a3412' stroke-opacity='0.45' stroke-width='1.5' stroke-linejoin='round'%3E%3Cpath d='M8 12 L17 4 L26 12 M11 12 V18 H23 V12 M20 9.8 V6 H22 V8.2'/%3E%3C/g%3E%3Crect x='15.5' y='14' width='3' height='3' rx='0.5' fill='%23F5C98A'/%3E%3C/svg%3E")
    no-repeat center;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 1.25rem;
  margin-top: 1rem;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  text-decoration: none;
  color: var(--text);
  display: flex;
  flex-direction: column;
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    border-color 0.18s ease;
}

.card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.card .body {
  padding: 0.9rem 1rem 1rem;
}
.card .body strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.04rem;
  font-weight: 600;
}
.card .body span {
  color: var(--muted);
  font-family: var(--font-ui);
  font-size: 0.82rem;
}
.card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(41, 37, 36, 0.08);
}
.card:hover img {
  transform: scale(1.025);
}

.note {
  background: var(--accent-soft);
  border-radius: 10px;
  padding: 1rem 1.15rem;
  font-size: 0.95rem;
  margin-top: 1rem;
}

/* ── Voice & curation ───────────────────────────────── */

.headnote {
  font-family: var(--font-display);
  font-size: 1.12rem;
  font-style: italic;
  color: var(--text);
  margin: 0.9rem 0 1.2rem;
  max-width: 34rem;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0.6rem 0 0.4rem;
}

.tag {
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.18rem 0.7rem;
  font-family: var(--font-ui);
  font-size: 0.7rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
}
a.tag {
  text-decoration: none;
}
a.tag:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* Seasonal slot — a rotating "this week's edit" banner on the homepage.
   Swap the content weekly; the frame stays. */
.seasonal {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 1rem 0;
  margin: 0 0 0.5rem;
  display: flex;
  align-items: baseline;
  gap: 1.25rem;
}
.seasonal-label {
  font-family: var(--font-ui);
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--accent);
  white-space: nowrap;
}
.seasonal p {
  margin: 0;
  font-size: 0.95rem;
  color: var(--muted);
}
.seasonal p a {
  text-decoration: none;
}
.seasonal p a:hover {
  text-decoration: underline;
}
@media (max-width: 640px) {
  .seasonal {
    flex-direction: column;
    gap: 0.3rem;
  }
}

/* Seasonal feature — wide image-left card promoting the current seasonal hub. */
.feature {
  display: grid;
  grid-template-columns: 40% 1fr;
  align-items: stretch;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  margin: 1.4rem 0 1.6rem;
  text-decoration: none;
  color: var(--text);
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    border-color 0.18s ease;
}
.feature img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.feature-body {
  padding: 1.5rem 1.6rem;
  align-self: center;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}
.feature-body strong {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.feature-copy {
  color: var(--muted);
  font-size: 0.95rem;
}
.feature:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(41, 37, 36, 0.08);
}
@media (max-width: 620px) {
  .feature {
    grid-template-columns: 1fr;
  }
  .feature img {
    aspect-ratio: 16 / 9;
  }
}

.persona {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 1.4rem 0;
  margin: 2.6rem 0 0;
  font-size: 1.02rem;
  max-width: 40rem;
}
.persona strong {
  color: var(--accent);
}

.related {
  margin-top: 2.2rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--border);
}
.related h3 {
  margin-top: 0;
}
.related ul {
  list-style: none;
  padding: 0;
  margin: 0.5rem 0 0;
}
.related li {
  margin-bottom: 0.45rem;
}
.related a {
  text-decoration: none;
}
.related a:hover {
  text-decoration: underline;
}

/* ── Recipe page ────────────────────────────────────── */

.recipe-hero {
  width: 100%;
  max-height: 420px;
  object-fit: cover;
  border-radius: 14px;
  margin-top: 1rem;
}

.recipe-meta {
  display: flex;
  gap: 1.5rem;
  color: var(--muted);
  font-family: var(--font-ui);
  font-size: 0.85rem;
  margin: 0.8rem 0 0.2rem;
}

.recipe-cols {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 2rem;
}
@media (max-width: 640px) {
  .recipe-cols {
    grid-template-columns: 1fr;
  }
}

.ingredients {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem 1.2rem;
  height: fit-content;
}
.ingredients ul {
  margin: 0.5rem 0 0;
  padding-left: 1.1rem;
}
.ingredients li {
  margin-bottom: 0.35rem;
}

.method ol {
  padding-left: 1.2rem;
}
.method li {
  margin-bottom: 0.8rem;
}

.kit-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-top: 0.8rem;
}
.kit-item {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.7rem;
  display: flex;
  align-items: center;
  gap: 0.9rem;
}
.kit-thumb {
  flex: 0 0 72px;
  width: 72px;
  height: 72px;
  border-radius: 8px;
  overflow: hidden;
  display: block;
}
.kit-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.kit-body {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  flex: 1;
}
.kit-item .why {
  color: var(--muted);
  font-family: var(--font-ui);
  font-size: 0.82rem;
}
@media (max-width: 560px) {
  .kit-body {
    flex-direction: column;
    gap: 0.2rem;
  }
}
