/* Daniel's House — Global Styles */
/* Shared base styles, nav, footer — used by every page */

:root {
  --cream: #FAF6F0;
  --cream-warm: #F2EBDD;
  --ink: #1F1B17;
  --ink-soft: #4A433B;
  --sage: #5D6E5C;
  --gold: #B89968;
  --tan: #E8E1D5;
  --rule: #D4C9B6;
  --night: #1A1714;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
ul { margin: 0; padding: 0; list-style: none; }
img { max-width: 100%; display: block; }

body {
  background: var(--cream);
  color: var(--ink);
  font-family: 'Poppins', sans-serif;
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}

/* ═══ NAVIGATION ═══ */
/* Both shipping-bar + nav are fixed at the top so the header is always visible
   on every page, regardless of any parent's overflow rules. Body gets padding-top
   to compensate for the now out-of-flow header (--header-total). */
:root {
  --shipping-bar-height: 46px;
  --nav-height: 76px;
  --header-total: 122px;
}

body { padding-top: var(--header-total); }

nav {
  background: var(--cream);
  border-bottom: 1px solid var(--rule);
  position: fixed;
  top: var(--shipping-bar-height);
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  transition: box-shadow 0.3s ease, border-color 0.3s ease;
}
nav.scrolled {
  box-shadow: 0 4px 24px rgba(31, 27, 23, 0.07);
  border-bottom-color: var(--gold);
}
.nav-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 48px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 48px;
  width: 100%;
}
.logo {
  font-family: 'Cormorant Garamond', serif;
  font-size: 26px;
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: 0.02em;
  white-space: nowrap;
  line-height: 1;
  padding: 4px 0;
}
.logo .amp {
  color: var(--gold);
  font-style: italic;
  font-weight: 400;
}
.nav-links {
  display: flex;
  gap: 38px;
  align-items: center;
  margin: 0;
  padding: 0;
  list-style: none;
}
.nav-links li { display: inline-flex; }
.nav-links a {
  font-size: 11.5px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
  transition: color 0.3s;
  padding: 6px 0;
  border-bottom: 1px solid transparent;
}
.nav-links a:hover { color: var(--sage); }
.nav-links a.active {
  color: var(--gold);
  border-bottom-color: var(--gold);
}

/* Mobile nav adjustments — collapse nav-links on small screens */
@media (max-width: 980px) {
  .nav-links { gap: 26px; }
  .nav-links a { font-size: 10.5px; letter-spacing: 0.16em; }
  .nav-inner { padding: 0 32px; gap: 32px; }
}
@media (max-width: 760px) {
  :root { --header-total: 178px; --nav-height: 128px; }
  .nav-inner {
    padding: 14px 18px;
    gap: 10px;
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: flex-start;
    justify-content: flex-start;
    height: 100%;
  }
  .logo { font-size: 19px; order: 1; align-self: flex-start; }
  .nav-links {
    order: 2;
    width: 100%;
    gap: 8px 16px;
    justify-content: flex-start;
    flex-wrap: wrap;
    padding: 0;
    overflow: visible;
  }
  .nav-links a { font-size: 10px; letter-spacing: 0.12em; white-space: nowrap; padding: 2px 0; }
  /* Search + Cart wrapper — last child of nav-inner */
  .nav-inner > div:last-child {
    order: 3;
    width: auto;
    margin-top: auto;
    align-self: flex-start;
    gap: 14px !important;
  }
}

/* ═══ FOOTER ═══ */
/* Mathematical 2:1:1:1 column grid (40/20/20/20). 8px vertical rhythm throughout. */
footer {
  background: var(--ink);
  color: var(--cream);
  margin-top: 120px;
  padding: 0;
  position: relative;
}
footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 88px;
  height: 1px;
  background: var(--gold);
}

/* ─── Newsletter ─── */
.footer-newsletter {
  padding: 96px 40px 80px;
  border-bottom: 1px solid rgba(212, 201, 182, 0.1);
}
.footer-newsletter-inner {
  max-width: 540px;
  margin: 0 auto;
  text-align: center;
}
.footer-newsletter-eyebrow {
  font-size: 10px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 500;
  margin-bottom: 24px;
}
.footer-newsletter-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(32px, 3.8vw, 42px);
  font-weight: 400;
  line-height: 1.1;
  margin-bottom: 16px;
  color: var(--cream);
}
.footer-newsletter-title em {
  font-style: italic;
  color: var(--gold);
}
.footer-newsletter-blurb {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 16px;
  color: var(--cream);
  opacity: 0.65;
  margin: 0 auto 32px;
  line-height: 1.55;
  max-width: 460px;
}
.footer-newsletter-form {
  display: flex;
  max-width: 460px;
  margin: 0 auto;
  border: 1px solid rgba(212, 201, 182, 0.25);
  background: transparent;
  transition: border-color 0.3s;
}
.footer-newsletter-form:focus-within { border-color: var(--gold); }
.footer-newsletter-form input {
  flex: 1;
  background: transparent;
  border: none;
  padding: 16px 20px;
  color: var(--cream);
  font-family: 'Poppins', sans-serif;
  font-size: 13px;
  outline: none;
  min-width: 0;
}
.footer-newsletter-form input::placeholder {
  color: rgba(250, 246, 240, 0.4);
  font-style: italic;
  font-family: 'Cormorant Garamond', serif;
  font-size: 15px;
}
.footer-newsletter-form button {
  background: var(--gold);
  color: var(--ink);
  border: none;
  padding: 14px 32px;
  font-family: 'Poppins', sans-serif;
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.3s, color 0.3s;
  white-space: nowrap;
}
.footer-newsletter-form button:hover {
  background: var(--cream);
}

/* ─── Main columns — 2fr 1fr 1fr 1fr (40/20/20/20) ─── */
.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 64px;
  padding: 80px 40px 64px;
  align-items: start;
}

/* Brand column */
.footer-brand {
  font-family: 'Cormorant Garamond', serif;
  font-size: 32px;
  font-weight: 500;
  letter-spacing: 0.01em;
  line-height: 1;
  margin: 0 0 24px;
}
.footer-brand .amp {
  color: var(--gold);
  font-style: italic;
}
.footer-tag {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 16px;
  color: var(--cream);
  opacity: 0.7;
  line-height: 1.55;
  margin: 0 0 32px;
  max-width: 340px;
}
.footer-attr {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--cream);
  opacity: 0.5;
  margin: 0 0 20px;
  line-height: 1;
  align-items: center;
}
.footer-attr span { display: inline-flex; align-items: center; }
.footer-attr span:not(:last-child)::after {
  content: '·';
  margin-left: 16px;
  color: var(--gold);
  opacity: 0.55;
  font-weight: 700;
}
.footer-email {
  display: inline-block;
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 15px;
  color: var(--cream);
  opacity: 0.8;
  text-decoration: none;
  padding-bottom: 2px;
  border-bottom: 1px solid rgba(184, 153, 104, 0.3);
  transition: opacity 0.3s, color 0.3s, border-color 0.3s;
}
.footer-email:hover {
  opacity: 1;
  color: var(--gold);
  border-bottom-color: var(--gold);
}

/* Link columns */
.footer-col h4 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 18px;
  font-weight: 500;
  font-style: italic;
  color: var(--gold);
  margin: 0 0 24px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(184, 153, 104, 0.18);
  letter-spacing: 0.01em;
  line-height: 1;
}
.footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.footer-col li {
  margin-bottom: 14px;
}
.footer-col li:last-child { margin-bottom: 0; }
.footer-col a {
  font-size: 13px;
  color: var(--cream);
  opacity: 0.65;
  text-decoration: none;
  transition: opacity 0.3s, color 0.3s, padding-left 0.3s;
  letter-spacing: 0.03em;
  display: inline-block;
  line-height: 1.3;
}
.footer-col a:hover {
  opacity: 1;
  color: var(--gold);
  padding-left: 4px;
}

/* ─── Credit bar ─── */
.footer-credit {
  border-top: 1px solid rgba(212, 201, 182, 0.1);
  padding: 28px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  flex-wrap: wrap;
  gap: 16px;
}
.footer-credit-left {
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--cream);
  opacity: 0.4;
}
.footer-credit-right {
  display: flex;
  gap: 28px;
}
.footer-credit-right a {
  font-size: 10px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--cream);
  opacity: 0.45;
  text-decoration: none;
  transition: opacity 0.3s, color 0.3s;
}
.footer-credit-right a:hover {
  opacity: 1;
  color: var(--gold);
}

/* ─── Responsive ─── */
@media (max-width: 900px) {
  .footer-inner {
    grid-template-columns: 1fr 1fr 1fr;
    gap: 48px 32px;
    padding: 64px 32px 48px;
  }
  .footer-inner > div:first-child {
    grid-column: 1 / -1;
    text-align: center;
    margin-bottom: 16px;
    padding-bottom: 40px;
    border-bottom: 1px solid rgba(212, 201, 182, 0.1);
  }
  .footer-inner > div:first-child .footer-tag {
    max-width: 460px;
    margin-left: auto;
    margin-right: auto;
  }
  .footer-inner > div:first-child .footer-attr {
    justify-content: center;
  }
}

@media (max-width: 600px) {
  .footer-newsletter { padding: 64px 24px 56px; }
  .footer-newsletter-form { flex-direction: column; }
  .footer-newsletter-form button { padding: 16px 20px; }
  .footer-inner {
    grid-template-columns: 1fr;
    gap: 40px;
    padding: 56px 24px 40px;
  }
  .footer-inner > div:first-child {
    padding-bottom: 32px;
  }
  .footer-credit {
    padding: 24px;
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }
}

/* ═══ MOBILE ═══ */
@media (max-width: 800px) {
  .nav-inner { flex-wrap: wrap; gap: 12px; padding: 14px 20px; }
  .nav-links { order: 3; width: 100%; flex-wrap: wrap; gap: 14px; justify-content: center; }
  .nav-links a { font-size: 10px; letter-spacing: 0.14em; }
  .footer-inner { grid-template-columns: 1fr 1fr; gap: 40px; }
  footer { padding: 60px 24px 30px; }
}
@media (max-width: 540px) {
  .footer-inner { grid-template-columns: 1fr; gap: 30px; }
}
