/* Main stylesheet (single entry point) */

/* ==========================
   W4.2 Base Styles
   ========================== */

/* Color tokens */
:root {
  --color-bg: #0e0e0e;        /* near-black background */
  --color-text: #f2f2f2;      /* soft off-white text */
  --color-accent: #d4a373;    /* warm earthy tan */
  --color-accent-deep: #8c5e3c; /* richer brown accent */
  --header-h: 72px;  /* header height for layout offset */  
}

/* Global reset / base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 100%;
}

body {
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  line-height: 1.6;
  background-color: var(--color-bg);
  color: var(--color-text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Headings: editorial style */
h1, h2, h3, h4 {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 0.5em;
}

h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

h2 {
  font-size: 2rem;
  margin-bottom: 0.75rem;
}

h3 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

/* Links */
a {
  color: var(--color-accent);
  text-decoration: none;
}

a:hover {
  color: var(--color-accent-deep);
  text-decoration: underline;
}

/* Basic spacing for sections */
section {
  padding: 3rem 1.5rem;
}

/* Wrap utility (centered max-width) */
.wrap {
  max-width: 72rem;
  margin: 0 auto;
}
/* ================================
   W4.3-A — Apply tokens globally
   ================================ */

html { scroll-behavior: smooth; }

body {
  background-color: var(--color-bg);
  color: var(--color-text);
  font-family: "Inter", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  font-size: 18px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Headings use the editorial serif */
h1, h2, h3, h4 {
  font-family: "Playfair Display", Georgia, "Times New Roman", serif;
  line-height: 1.2;
  color: var(--color-text);
  margin: 0 0 0.5em;
}

p { margin: 0 0 1em; }

/* Links in warm earth tone */
a {
  color: var(--color-accent);
  text-decoration: none;
}
a:hover, a:focus {
  color: var(--color-accent-deep);
  text-decoration: underline;
}

/* Responsive container used throughout */
.wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1rem;
}

/* Images never overflow their container */
img { max-width: 100%; height: auto; display: block; }

/* ================================
   W4.3-C — Typography hierarchy
   ================================ */

h1, h2, h3 {
  font-family: "Playfair Display", serif;
  font-weight: 700;
  color: var(--color-text);
  margin: 1.5rem 0 1rem;
}

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

h2 {
  font-size: 2rem;
  line-height: 1.3;
}

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

/* Nav links */
.site-nav a,
.footer-nav a {
  color: var(--color-accent);
  text-decoration: none;
  margin-right: 1rem;
}

.site-nav a:hover,
.footer-nav a:hover {
  color: var(--color-accent-deep);
  text-decoration: underline;
}

/* ================================
   W4.3-D — Buttons
   ================================ */

.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: 4px;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 0.2s ease, color 0.2s ease;
}

/* Primary button */
.btn-primary {
  background-color: var(--color-accent);
  color: var(--color-bg);
}

.btn-primary:hover {
  background-color: var(--color-accent-deep);
  color: var(--color-bg);
}

/* Ghost button */
.btn-ghost {
  border: 2px solid var(--color-accent);
  color: var(--color-accent);
}

.btn-ghost:hover {
  border-color: var(--color-accent-deep);
  color: var(--color-accent-deep);
}

/* ================================
   W4.3-E — Links + fineprint
   ================================ */

a {
  color: var(--color-accent);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--color-accent-deep);
  text-decoration: underline;
}

.fineprint {
  font-size: 0.875rem;
  color: #aaa; /* subtle gray for footer/legal text */
}

/* ================================
   W4.3-E — Links + fineprint
   ================================ */

a {
  color: var(--color-accent);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--color-accent-deep);
  text-decoration: underline;
}

.fineprint {
  font-size: 0.875rem;
  color: #aaa; /* subtle gray for legal/footer notes */
}

/* ============================
   W4.3-G — Fine-tune typography
   ============================ */

/* Headings use Playfair; body stays Inter (already set above) */
h1, h2, h3, h4, h5, h6 {
  font-family: "Playfair Display", Georgia, "Times New Roman", serif;
  font-weight: 700;
  color: var(--color-text);
  letter-spacing: 0.005em;
  margin: 0 0 0.6em;
}

/* Fluid, magazine-y sizes */
h1 { font-size: clamp(2.4rem, 4vw + 1rem, 4rem); line-height: 1.12; }
h2 { font-size: clamp(1.75rem, 1.4vw + 1rem, 2.4rem); line-height: 1.2; }
h3 { font-size: clamp(1.25rem, 0.9vw + 1rem, 1.6rem); line-height: 1.3; }

/* Body copy rhythm */
p { margin: 0 0 1.15em; }

/* “Lead” paragraph under hero title */
.lead {
  font-size: clamp(1.1rem, 0.6vw + 1rem, 1.35rem);
  line-height: 1.8;
}

/* Lists read cleanly in long-form sections */
ul, ol { margin: 0 0 1.2em 1.3em; }

/* Links are typographic accents (color already defined) */
a {
  color: var(--color-accent);
  text-underline-offset: 0.18em;
  text-decoration-thickness: 2px;
}

/* Subtle bold/italic tuning */
strong { font-weight: 700; }
em     { font-style: italic; }

/* ===============================
   W4.3-H — Header/nav spacing & states
   =============================== */

.site-header {
  padding: 1.2rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-nav a {
  margin-left: 2rem;
  font-weight: 500;
  text-decoration: none;
  color: var(--color-text);
  transition: color 0.2s ease;
}

.site-nav a:first-child {
  margin-left: 0;
}

.site-nav a:hover,
.site-nav a:focus {
  color: var(--color-accent);
  text-decoration: underline;
}
/* ===============================
   W4.3-I — Footer typography & spacing
   =============================== */

.site-footer {
  margin-top: 4rem;
  padding: 2.5rem 0;
  border-top: 1px solid rgba(255,255,255,0.08);
}

.site-footer .wrap {
  display: grid;
  gap: 1.25rem 2rem;
  align-items: center;
}

/* Brand row */
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  font-weight: 700;
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1.25rem;
}

/* Footer nav */
.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.75rem;
}

.footer-nav a {
  text-decoration: none;
  color: var(--color-text);
  transition: color .2s ease;
  font-weight: 500;
}

.footer-nav a:hover,
.footer-nav a:focus {
  color: var(--color-accent);
  text-decoration: underline;
}

/* Fine print */
.fineprint {
  margin-top: .25rem;
  font-size: .9rem;
  color: rgba(255,255,255,.75);
}

/* Wider screens: put brand | nav | copyright on one line */
@media (min-width: 900px) {
  .site-footer .wrap {
    grid-template-columns: 1fr auto 1fr;
  }
  .fineprint {
    justify-self: end;
    margin-top: 0;
  }
}

/* ===============================
   W4.3-J — Hero image sizing & headline rhythm
   =============================== */

.hero picture img {
  display: block;
  width: 100%;
  max-height: 28rem;
  object-fit: cover;
  border-radius: .5rem;
}

.hero-copy {
  margin-top: 2rem;
  text-align: center;
}

.hero-copy h1 {
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(2.25rem, 5vw, 3.25rem);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1.25rem;
}

.hero-copy .lead {
  font-size: 1.15rem;
  max-width: 45ch;
  margin: 0 auto 2rem auto;
  color: rgba(255,255,255,.85);
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
}
/* ===============================
   W4.3-K — Navigation bar styling
   =============================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(14,14,14,0.85);        /* near-black with slight transparency */
  backdrop-filter: saturate(120%) blur(6px);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  color: var(--color-text);
  text-decoration: none;
  font-weight: 700;
}

.brand-name {
  font-family: "Playfair Display", Georgia, serif;
  letter-spacing: .3px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.site-nav a {
  display: inline-block;
  padding: .5rem .25rem;                  /* bigger hit area */
  color: var(--color-text);
  text-decoration: none;
  transition: color .2s ease, opacity .2s ease;
  opacity: .9;
}

.site-nav a:hover,
.site-nav a:focus {
  color: var(--color-accent);
  opacity: 1;
}

/* ===============================
   W4.3-K.1 — Fixed header on top
   =============================== */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(14,14,14,0.85);
  backdrop-filter: saturate(120%) blur(6px);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.site-header .wrap {
  min-height: var(--header-h);
  padding-block: 12px; /* comfortable vertical breathing */
}

/* offset the page so content doesn't hide under the fixed header */
body {
  padding-top: calc(var(--header-h) + 8px);
}

/* ===============================
   W4.3-L.1 — Section spacing + card base
   =============================== */

section {
  padding-block: 6rem;            /* big vertical breathing space */
}

.section-head {
  text-align: center;
  margin-bottom: 3rem;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

.card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 2rem;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.card:hover {
  border-color: var(--color-accent);
  transform: translateY(-2px);
}

/* ===============================
   W4.3-L.2 — Card typography polish
   =============================== */

/* Card headings */
.card h3 {
  font-family: "Playfair Display", Georgia, "Times New Roman", serif;
  font-size: 1.35rem;
  line-height: 1.25;
  margin: 0 0 0.5rem;
  letter-spacing: 0.2px;
}

/* Card body copy */
.card p {
  margin: 0;                 /* first paragraph tight to heading */
  color: rgb(228 228 228 / 92%);
  line-height: 1.65;
}

/* Space multiple paragraphs consistently when they occur */
.card p + p {
  margin-top: 0.75rem;
}

/* If a link appears inside a card, keep it warm and subtle */
.card a {
  color: var(--color-accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}
.card a:hover,
.card a:focus {
  color: var(--color-accent-deep);
}

/* ============================================
   W4.3-L.3 — Responsive section spacing
   ============================================ */

/* 1) Comfortable vertical rhythm by default (desktop/tablet) */
section {
  padding-block: clamp(2.5rem, 6vw, 6rem); /* top & bottom only */
}

/* Give the global .wrap a little horizontal breathing room on all screens */
.wrap {
  padding-inline: 1.25rem; /* left & right */
}

/* 2) Phones: tighten vertical spacing a bit more */
@media (max-width: 640px) {
  section {
    padding-block: 2rem;
  }
  .wrap {
    padding-inline: 1rem;
  }
}

/* 3) Very large screens: slightly wider content column */
@media (min-width: 1280px) {
  .wrap {
    max-width: 76rem; /* was 72rem earlier; small, tasteful bump */
  }
}

/* ============================================
   W4.3-L.4 — Nav hover/focus polish + active
   ============================================ */

/* Base: remove default link underline in navs; we’ll control it */
.site-nav a,
.footer-nav a {
  text-decoration: none;
  border-bottom: 2px solid transparent;
  padding-block: .25rem;
  transition: color .18s ease, border-color .18s ease, text-underline-offset .18s ease;
}

/* Hover/Focus: warm accent and subtle underline hint */
.site-nav a:hover,
.site-nav a:focus,
.footer-nav a:hover,
.footer-nav a:focus {
  color: var(--color-accent);
  border-color: color-mix(in srgb, var(--color-accent) 65%, transparent);
  outline: none;                 /* we’ll use :focus-visible below */
  text-decoration: underline;    /* light editorial underline */
  text-underline-offset: .15em;
}

/* Keyboard focus: accessible but refined */
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
  border-radius: .375rem;
}

/* “Current page” treatment (use either attribute or class in HTML later) */
.site-nav a[aria-current="page"],
.footer-nav a[aria-current="page"],
.site-nav a.is-active,
.footer-nav a.is-active {
  color: var(--color-accent);
  border-color: var(--color-accent);
}

/* ============================================
   W4.3-L.5 — Hero image & headline spacing
   ============================================ */

.hero {
  padding-top: 2rem; /* reduce extra gap above image now that header is fixed */
}

.hero picture img {
  max-height: 24rem;          /* trim height a bit for balance */
  border-radius: .5rem;
  object-fit: cover;
}

.hero-copy {
  margin-top: 2.5rem;          /* space between image and text */
  text-align: center;
}

.hero-copy h1 {
  margin-bottom: 1.25rem;      /* headline → lead */
}

.hero-copy .lead {
  margin-bottom: 2rem;         /* lead → button group */
}

.cta-row {
  gap: 1rem;
  justify-content: center;
}
