/* ==========================================================================
   SuddenlySpaces — Shared Styles
   ========================================================================== */

/* Metropolis font — load local files from /fonts if you drop them in;
   fallbacks keep things looking correct until then. */
@font-face {
  font-family: "Metropolis";
  src: local("Metropolis Regular"), local("Metropolis-Regular"),
       url("fonts/Metropolis-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Metropolis";
  src: local("Metropolis Medium"), local("Metropolis-Medium"),
       url("fonts/Metropolis-Medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Metropolis";
  src: local("Metropolis SemiBold"), local("Metropolis-SemiBold"),
       url("fonts/Metropolis-SemiBold.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Metropolis";
  src: local("Metropolis Bold"), local("Metropolis-Bold"),
       url("fonts/Metropolis-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Brand tokens */
  --navy: #111F43;
  --navy-ink: #0b1631;
  --ink: #000000;
  --body: #333333;
  --muted: #666666;
  --line: #9F9F9F;
  --hairline: #ECEBE6;
  --cream: #F4F3F0;
  --white: #FFFFFF;

  /* Radii */
  --r-pill: 999px;
  --r-md: 20px;
  --r-lg: 30px;

  /* Shadows */
  --shadow-card: 0 4px 50px rgba(0, 0, 0, 0.05);

  /* Layout */
  --page-max: 1280px;
  --gutter: clamp(16px, 4vw, 80px);

  /* Typography */
  --font: "Metropolis", "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font);
  color: var(--body);
  background: var(--white);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

/* ---------- Layout shell ---------- */
.shell {
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ---------- Header ---------- */
.site-header {
  padding: clamp(24px, 4vw, 80px) 0 0;
}
.site-header .shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  color: var(--navy);
  font-size: clamp(16px, 1.4vw, 20px);
  letter-spacing: -0.01em;
}
.logo-img {
  height: 28px;
  width: auto;
  display: block;
}
.site-footer .logo-img { height: 24px; }

.nav {
  display: flex;
  align-items: center;
  gap: clamp(20px, 3vw, 40px);
}
.nav a {
  font-size: 16px;
  font-weight: 500;
  color: var(--ink);
  transition: opacity .15s;
}
.nav a:hover { opacity: .6; }
.nav a[aria-current="page"] { font-weight: 700; }

.nav .btn-primary { margin-left: 8px; }

.nav-toggle {
  display: none;
  width: 28px; height: 22px;
  background: none;
  border: 0;
  padding: 0;
  position: relative;
}
.nav-toggle span {
  position: absolute;
  left: 0; right: 0;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
}
.nav-toggle span:nth-child(1) { top: 0; }
.nav-toggle span:nth-child(2) { top: 10px; }
.nav-toggle span:nth-child(3) { top: 20px; }

@media (max-width: 768px) {
  .nav-toggle { display: inline-block; }
  .nav {
    position: fixed;
    inset: 0 0 0 auto;
    width: min(80vw, 320px);
    padding: 80px 28px 28px;
    background: var(--white);
    flex-direction: column;
    align-items: flex-start;
    gap: 24px;
    transform: translateX(100%);
    transition: transform .25s ease;
    box-shadow: -20px 0 60px rgba(0,0,0,.08);
    z-index: 50;
  }
  .nav.is-open { transform: translateX(0); }
  body.nav-open { overflow: hidden; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1px solid transparent;
  border-radius: var(--r-lg);
  padding: 18px 28px;
  font-weight: 700;
  font-size: 16px;
  line-height: 1;
  text-align: center;
  transition: background .15s, color .15s, border-color .15s, transform .1s;
  cursor: pointer;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--navy);
  color: var(--white);
  border-color: var(--navy);
}
.btn-primary:hover { background: var(--navy-ink); }

.btn-secondary {
  background: var(--white);
  color: var(--ink);
  border-color: var(--navy);
}
.btn-secondary:hover { background: var(--cream); }

.btn-ghost {
  background: transparent;
  color: var(--ink);
  padding: 10px 0;
  border-radius: 0;
  border-bottom: 1px solid var(--ink);
  gap: 12px;
}
.btn-ghost svg { transition: transform .2s; }
.btn-ghost:hover svg { transform: translateX(4px); }

.btn-block { width: 100%; padding: 18px 24px; font-size: 16px; border-radius: var(--r-pill); }

/* ---------- Typography ---------- */
.display {
  font-size: clamp(36px, 5.2vw, 56px);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.015em;
  color: var(--ink);
  margin: 0;
}
.headline {
  font-size: clamp(32px, 4vw, 48px);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin: 0;
}
.subheadline {
  font-size: clamp(20px, 2.2vw, 24px);
  line-height: 1.4;
  color: var(--body);
  margin: 0;
}
.eyebrow {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 12px;
}
.p { font-size: 18px; line-height: 1.7; color: var(--body); margin: 0; }

/* ---------- Hero / Coming Soon ---------- */
.hero {
  padding: clamp(48px, 8vw, 128px) 0 clamp(64px, 8vw, 96px);
}
.hero .shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: clamp(32px, 6vw, 82px);
  align-items: center;
}
.hero-copy { max-width: 574px; display: flex; flex-direction: column; gap: 32px; }
.hero-image {
  aspect-ratio: 704 / 557;
  border-radius: var(--r-md);
  background: var(--cream) url("assets/hero.png") center / cover no-repeat;
  width: 100%;
}
@media (max-width: 900px) {
  .hero .shell { grid-template-columns: 1fr; }
  .hero-copy { order: 1; }
  .hero-image { order: 2; }
}

/* ---------- Callout ---------- */
.callout {
  padding: clamp(32px, 6vw, 64px) 0 clamp(80px, 10vw, 160px);
  text-align: center;
}
.callout .inner {
  max-width: 730px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
}
.callout .inner .p { max-width: 560px; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--hairline);
  padding: 56px 0 40px;
  margin-top: 80px;
}
.footer-top {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 40px;
  align-items: flex-start;
  padding-bottom: 40px;
}
.footer-about { max-width: 240px; display: flex; flex-direction: column; gap: 16px; }
.footer-about p { font-size: 14px; color: var(--body); line-height: 1.5; margin: 0; }
.footer-nav {
  display: flex;
  gap: 40px;
  align-items: center;
  justify-self: center;
}
.footer-nav a { font-size: 16px; font-weight: 500; color: var(--ink); }
.footer-nav a:hover { opacity: .6; }
.footer-social { display: flex; gap: 16px; justify-self: flex-end; }
.social-icon {
  width: 36px; height: 36px;
  border-radius: 8px;
  background: var(--navy);
  color: var(--white);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background .15s;
}
.social-icon:hover { background: var(--navy-ink); }
.footer-copy {
  padding-top: 32px;
  border-top: 1px solid var(--hairline);
  text-align: center;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.1px;
  color: var(--body);
}
.footer-verse {
  text-align: center;
  font-size: 13px;
  font-style: italic;
  color: var(--muted);
  margin-top: 12px;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.6;
}
.footer-verse:empty { display: none; }
@media (max-width: 768px) {
  .footer-top {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 32px;
  }
  .footer-about { margin: 0 auto; align-items: center; text-align: center; }
  .footer-nav { justify-self: center; gap: 28px; flex-wrap: wrap; justify-content: center; }
  .footer-social { justify-self: center; }
}

/* ---------- Forms ---------- */
.form { display: flex; flex-direction: column; gap: 24px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label {
  font-size: 13px; font-weight: 600; color: var(--ink);
  padding-left: 4px;
}
.input {
  height: 50px;
  padding: 0 24px;
  border-radius: var(--r-pill);
  background: var(--cream);
  border: 1px solid var(--line);
  font-family: inherit;
  font-size: 16px;
  color: var(--ink);
  transition: border-color .15s, box-shadow .15s;
  width: 100%;
}
.input::placeholder { color: var(--line); }
.input:focus {
  outline: none;
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(17,31,67,.1);
}

.checkbox-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 0 4px;
  font-size: 12px;
  letter-spacing: 0.4px;
  line-height: 1.4;
  color: var(--body);
}
.checkbox-row input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 16px; height: 16px;
  min-width: 16px;
  margin-top: 2px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--white);
  cursor: pointer;
  position: relative;
  transition: background .15s, border-color .15s;
}
.checkbox-row input[type="checkbox"]:checked {
  background: var(--navy);
  border-color: var(--navy);
}
.checkbox-row input[type="checkbox"]:checked::after {
  content: "";
  position: absolute;
  left: 4px; top: 1px;
  width: 5px; height: 9px;
  border: solid var(--white);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

/* ---------- Signup / Multi-address layout ---------- */
.signup-grid {
  padding: clamp(40px, 6vw, 92px) 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: clamp(32px, 4vw, 28px);
  align-items: center;
}
.signup-grid .image {
  aspect-ratio: 736 / 711;
  width: 100%;
  border-radius: var(--r-md);
  background: var(--cream) url("assets/hero.png") center / cover no-repeat;
}
.signup-copy { max-width: 503px; display: flex; flex-direction: column; gap: 40px; }
.signup-copy .intro { display: flex; flex-direction: column; gap: 16px; }
.signup-copy .actions { display: flex; flex-direction: column; gap: 16px; align-items: center; width: 100%; }
@media (max-width: 900px) {
  .signup-grid { grid-template-columns: 1fr; }
  .signup-grid .image { order: -1; max-height: 360px; }
}

.inline-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  font-weight: 500;
  color: var(--ink);
  border-bottom: 1px solid var(--line);
  padding: 6px 0;
  transition: border-color .15s, color .15s;
}
.inline-link:hover { border-color: var(--ink); }
.inline-link svg { transition: transform .2s; }
.inline-link:hover svg { transform: translateX(3px); }

/* ---------- Multi-address card ---------- */
.card-wrap { padding: clamp(40px, 6vw, 80px) 0; display: flex; justify-content: center; }
.address-card {
  width: 100%;
  max-width: 890px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 15px;
  box-shadow: var(--shadow-card);
  padding: clamp(28px, 5vw, 60px);
}
.address-card .head { text-align: center; display: flex; flex-direction: column; gap: 16px; max-width: 676px; margin: 0 auto; }
.address-card .divider { height: 1px; background: var(--line); margin: 40px 0; border: 0; }

.address-group {
  background: var(--cream);
  border: 1px solid var(--hairline);
  border-radius: 12px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
}
.address-group + .address-group { margin-top: 16px; }
.address-group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.address-group-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.address-group-row .input.full { grid-column: 1 / -1; }
.remove-loc {
  background: transparent;
  border: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: 6px;
  transition: background .15s, color .15s;
}
.remove-loc:hover { background: var(--white); color: var(--ink); }
@media (max-width: 600px) {
  .address-group-row { grid-template-columns: 1fr; }
}

.add-more {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--white);
  border: 1px dashed var(--line);
  border-radius: var(--r-lg);
  padding: 14px 22px;
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
  transition: border-color .15s, background .15s;
}
.add-more:hover { border-color: var(--navy); background: var(--cream); }
.add-more:disabled { opacity: .4; cursor: not-allowed; }

.location-count {
  font-size: 16px;
  color: var(--line);
  margin-top: 12px;
}

.note-box {
  background: var(--cream);
  border: 1px solid var(--hairline);
  border-radius: 12px;
  padding: 20px 28px;
  margin: 32px 0 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.note-box h3 { margin: 0; font-size: clamp(20px, 2.4vw, 24px); font-weight: 700; color: var(--ink); }
.note-box p { margin: 0; font-size: 16px; line-height: 1.5; color: var(--ink); }
.note-box a { color: var(--navy); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Success state ---------- */
.success {
  padding: clamp(60px, 10vw, 140px) 0;
  text-align: center;
  max-width: 680px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}
.success .mark {
  width: 72px; height: 72px;
  border-radius: 50%;
  background: var(--navy);
  color: var(--white);
  display: flex; align-items: center; justify-content: center;
}
.success h1 { margin: 0; font-size: clamp(32px, 4vw, 48px); font-weight: 700; color: var(--navy); }
.success p { font-size: 18px; line-height: 1.6; color: var(--body); margin: 0; }
.success-rule { width: 280px; max-width: 60%; height: 1px; background: var(--line); margin: 8px 0 16px; border: 0; }

/* ---------- Blog index ---------- */
.blog-wrap { padding: clamp(40px, 6vw, 80px) 0; }
.blog-head { text-align: center; max-width: 760px; margin: 0 auto clamp(32px, 5vw, 48px); display: flex; flex-direction: column; gap: 16px; }

.featured-post {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(24px, 6vw, 93px);
  align-items: center;
  margin-bottom: clamp(48px, 8vw, 96px);
}
.featured-post .img {
  aspect-ratio: 656 / 330;
  width: 100%;
  border-radius: var(--r-md);
  background: var(--cream) center / cover no-repeat;
  background-image: url("assets/blog-hero.png");
}
.featured-post .body { display: flex; flex-direction: column; gap: 24px; }
.featured-post h2 { margin: 0; font-size: clamp(22px, 2.2vw, 24px); font-weight: 700; line-height: 1.42; color: var(--ink); }
.featured-post p { margin: 0; font-size: 18px; line-height: 1.7; color: var(--body); }
@media (max-width: 820px) {
  .featured-post { grid-template-columns: 1fr; gap: 24px; }
}

.post-list { display: flex; flex-direction: column; gap: 33px; }
.post-row {
  display: grid;
  grid-template-columns: 380px 1fr auto;
  gap: clamp(20px, 4vw, 48px);
  align-items: center;
  padding: 24px 0;
  border-top: 1px solid var(--hairline);
}
.post-row:first-child { border-top: 0; padding-top: 0; }
.post-row .thumb {
  aspect-ratio: 380 / 220;
  width: 100%;
  border-radius: 12px;
  background: var(--cream) center / cover no-repeat;
  background-image: url("assets/blog-hero.png");
}
.post-row .body { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.post-row .meta { font-size: 13px; color: var(--muted); letter-spacing: 0.04em; text-transform: uppercase; }
.post-row h3 { margin: 0; font-size: clamp(20px, 2vw, 24px); font-weight: 700; line-height: 1.3; color: var(--ink); }
.post-row p { margin: 0; color: var(--body); }
.post-row .btn { justify-self: end; }
@media (max-width: 820px) {
  .post-row { grid-template-columns: 1fr; }
  .post-row .btn { justify-self: start; }
}

/* ---------- Blog post ---------- */
.post-wrap { padding: clamp(40px, 6vw, 80px) 0; max-width: 1063px; margin: 0 auto; }
.post-header { text-align: center; display: flex; flex-direction: column; gap: 32px; margin-bottom: 48px; }
.post-image {
  aspect-ratio: 1063 / 539;
  width: 100%;
  border-radius: var(--r-md);
  background: var(--cream) url("assets/blog-hero.png") center / cover no-repeat;
  margin-bottom: 48px;
}
.post-body { display: flex; flex-direction: column; gap: 40px; }
.post-body h2 { font-size: clamp(24px, 2.6vw, 32px); font-weight: 700; margin: 0; color: var(--ink); }
.post-body p { font-size: 16px; line-height: 2; color: var(--body); margin: 0; }
.post-body section { display: flex; flex-direction: column; gap: 16px; }

.recent-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: clamp(48px, 8vw, 96px) 0 24px;
  gap: 16px;
  flex-wrap: wrap;
}
.recent-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(24px, 4vw, 58px);
}
.recent-card { display: flex; flex-direction: column; gap: 16px; }
.recent-card .thumb {
  aspect-ratio: 16 / 10;
  width: 100%;
  border-radius: 12px;
  background: var(--cream) url("assets/blog-hero.png") center / cover no-repeat;
}
.recent-card h4 { margin: 0; font-size: 18px; font-weight: 700; color: var(--ink); line-height: 1.35; }
.recent-card p { margin: 0; font-size: 14px; color: var(--body); line-height: 1.55; }
@media (max-width: 820px) {
  .recent-grid { grid-template-columns: 1fr; }
}

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translate(-50%, 20px);
  background: var(--navy);
  color: var(--white);
  padding: 14px 24px;
  border-radius: var(--r-pill);
  font-size: 14px;
  font-weight: 500;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s, transform .2s;
  z-index: 100;
}
.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ---------- Utility ---------- */
.only-mobile { display: none; }
@media (max-width: 600px) { .only-mobile { display: initial; } .only-desktop { display: none; } }

.center { text-align: center; }
.mt-16 { margin-top: 16px; }
.mt-32 { margin-top: 32px; }
