/* ============================================================
   Marea Surf Stays — mareasurfstays.com
   Minimal editorial system.
   Palette: paper #FBFAF7 · ink #16262C · tide #33636A · sand #E9E2D6 · mist #9AAEB0
   Type: Fraunces (display) · Inter (body/utility)
   ============================================================ */

:root {
  --paper: #FBFAF7;
  --ink: #16262C;
  --tide: #33636A;
  --sand: #E9E2D6;
  --mist: #9AAEB0;
  --rule: rgba(22, 38, 44, 0.14);
  --max: 1120px;
  --pad: clamp(1.25rem, 4vw, 3rem);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

body {
  background: var(--paper);
  color: var(--ink);
  font-family: "Inter", system-ui, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.7;
  font-weight: 380;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--sand); }

img { display: block; max-width: 100%; }

a { color: inherit; }

/* ---------- type ---------- */

h1, h2, h3, .display {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 380;
  line-height: 1.12;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2.4rem, 5.4vw, 4.4rem); }
h2 { font-size: clamp(1.7rem, 3.2vw, 2.5rem); }
h3 { font-size: 1.25rem; font-weight: 480; }

.eyebrow {
  font-family: "Inter", sans-serif;
  font-size: 0.72rem;
  font-weight: 560;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--tide);
}

.lede { font-size: clamp(1.1rem, 1.8vw, 1.3rem); line-height: 1.65; max-width: 34em; }

.muted { color: rgba(22, 38, 44, 0.62); }

/* ---------- layout ---------- */

.wrap { max-width: var(--max); margin: 0 auto; padding-left: var(--pad); padding-right: var(--pad); }

section { padding: clamp(4rem, 9vw, 7.5rem) 0; }

/* tideline — signature divider: a single quiet wave */
.tideline { display: block; width: 100%; height: 14px; color: var(--rule); }

/* ---------- header ---------- */

header {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--rule);
}

.nav {
  display: flex; align-items: baseline; justify-content: space-between;
  padding-top: 1.1rem; padding-bottom: 1.1rem;
}

.wordmark {
  font-family: "Fraunces", serif;
  font-size: 1.18rem;
  font-weight: 480;
  letter-spacing: 0.01em;
  text-decoration: none;
}
.wordmark em { font-style: italic; color: var(--tide); }

.nav ul { display: flex; gap: clamp(1.2rem, 3vw, 2.4rem); list-style: none; }
.nav ul a {
  font-size: 0.8rem; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase;
  text-decoration: none; color: rgba(22, 38, 44, 0.72);
  padding-bottom: 3px; border-bottom: 1px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}
.nav ul a:hover, .nav ul a[aria-current="page"] { color: var(--ink); border-color: var(--tide); }

/* ---------- hero (home) ---------- */

.hero { position: relative; min-height: 86vh; display: flex; align-items: flex-end; padding: 0; }
.hero picture, .hero > img.bg {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
}
.hero::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(12, 22, 26, 0.55) 0%, rgba(12, 22, 26, 0.08) 45%, transparent 70%);
}
.hero .wrap { position: relative; z-index: 2; width: 100%; padding-bottom: clamp(3rem, 7vw, 5.5rem); color: #FDFCF9; }
.hero h1 { max-width: 12.5em; }
.hero .lede { margin-top: 1.4rem; color: rgba(253, 252, 249, 0.88); }
.hero .actions { margin-top: 2.2rem; display: flex; gap: 1rem; flex-wrap: wrap; }

/* page hero (inner pages) */
.page-head { padding-top: clamp(4.5rem, 9vw, 7rem); padding-bottom: clamp(2.5rem, 5vw, 4rem); }
.page-head h1 { max-width: 14em; margin-top: 0.9rem; }
.page-head .lede { margin-top: 1.4rem; }

/* ---------- buttons ---------- */

.btn {
  display: inline-block;
  font-size: 0.8rem; font-weight: 560; letter-spacing: 0.14em; text-transform: uppercase;
  text-decoration: none;
  padding: 0.95rem 1.7rem;
  border: 1px solid currentColor;
  border-radius: 999px;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.btn:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.hero .btn:hover { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.btn.solid { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.btn.solid:hover { background: var(--tide); border-color: var(--tide); color: var(--paper); }

a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--tide); outline-offset: 3px;
}

/* ---------- home sections ---------- */

.pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(2rem, 4vw, 4rem); margin-top: 3.4rem; }
.pillars h3 { margin-bottom: 0.7rem; }
.pillars p { color: rgba(22, 38, 44, 0.72); font-size: 0.98rem; }
@media (max-width: 800px) { .pillars { grid-template-columns: 1fr; } }

.split { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(2.5rem, 6vw, 5.5rem); align-items: center; }
.split.rev { grid-template-columns: 0.95fr 1.05fr; }
@media (max-width: 860px) { .split, .split.rev { grid-template-columns: 1fr; } }

.frame { overflow: hidden; }
.frame img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 4/5; }
.frame.wide img { aspect-ratio: 16/10; }

.quiet-band { background: var(--sand); }
.quiet-band .wrap { max-width: 880px; text-align: center; }
.quiet-band h2 { max-width: 18em; margin: 0.9rem auto 0; }
.quiet-band p { margin-top: 1.4rem; }

/* ---------- services page ---------- */

.svc { border-top: 1px solid var(--rule); padding: clamp(2.4rem, 5vw, 3.6rem) 0; display: grid; grid-template-columns: minmax(180px, 300px) 1fr; gap: clamp(1.5rem, 5vw, 5rem); }
.svc:last-of-type { border-bottom: 1px solid var(--rule); }
.svc h3 { font-size: 1.45rem; }
.svc p { max-width: 40em; color: rgba(22, 38, 44, 0.78); }
@media (max-width: 720px) { .svc { grid-template-columns: 1fr; gap: 0.6rem; } }

/* ---------- about ---------- */

.principles { list-style: none; margin-top: 2.2rem; }
.principles li { border-top: 1px solid var(--rule); padding: 1.4rem 0; display: grid; grid-template-columns: minmax(140px, 220px) 1fr; gap: 1.5rem; }
.principles li:last-child { border-bottom: 1px solid var(--rule); }
.principles strong { font-weight: 560; }
@media (max-width: 640px) { .principles li { grid-template-columns: 1fr; gap: 0.3rem; } }

/* ---------- contact ---------- */

.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2.5rem, 6vw, 6rem); }
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } }

form label { display: block; font-size: 0.78rem; font-weight: 560; letter-spacing: 0.14em; text-transform: uppercase; color: rgba(22,38,44,0.6); margin: 1.4rem 0 0.45rem; }
form input, form textarea {
  width: 100%; font: inherit; color: var(--ink);
  background: transparent; border: none; border-bottom: 1px solid var(--rule);
  padding: 0.55rem 0.1rem;
}
form input:focus, form textarea:focus { border-bottom-color: var(--tide); outline: none; }
form button { margin-top: 2rem; cursor: pointer; font-family: inherit; background: var(--ink); color: var(--paper); border: 1px solid var(--ink); }
.form-note { font-size: 0.85rem; margin-top: 1rem; }

.detail-list { list-style: none; }
.detail-list li { padding: 1.1rem 0; border-top: 1px solid var(--rule); }
.detail-list li:last-child { border-bottom: 1px solid var(--rule); }
.detail-list .eyebrow { display: block; margin-bottom: 0.3rem; }

/* ---------- legal pages ---------- */

.legal { max-width: 720px; }
.legal h2 { font-size: 1.3rem; margin: 2.6rem 0 0.8rem; }
.legal p, .legal li { color: rgba(22, 38, 44, 0.8); font-size: 0.99rem; }
.legal ul { padding-left: 1.2rem; margin-top: 0.5rem; }

/* ---------- footer ---------- */

footer { border-top: 1px solid var(--rule); padding: 2.6rem 0 3rem; }
.foot { display: flex; flex-wrap: wrap; gap: 1.2rem 3rem; justify-content: space-between; align-items: baseline; font-size: 0.85rem; color: rgba(22, 38, 44, 0.62); }
.foot a { text-decoration: none; border-bottom: 1px solid transparent; }
.foot a:hover { color: var(--ink); border-color: var(--tide); }
.foot .legal-links { display: flex; gap: 1.6rem; }

/* ---------- reveal on scroll (subtle, single effect) ---------- */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; } }
