/* ———— Strata — foundation, masthead, hero ———— */

:root {
  --paper: #16130f;
  --paper-alt: #1d1915;
  --ink: #f0e9e0;
  --ink-soft: #b3a99c;
  --ink-faint: #8c8277;
  --rule: #2e2821;
  --accent: #e08a4f;
  --accent-soft: #33261c;

  --display: "Palatino", "Palatino Linotype", "Book Antiqua", Georgia, serif;
  --sans: ui-sans-serif, -apple-system, "Segoe UI", "Helvetica Neue", sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  color-scheme: dark;

  --measure: 68rem;
  --gap: clamp(3.5rem, 8vw, 7rem);
}

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

html { scroll-behavior: smooth; }

body {
  overflow-x: hidden;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 400;
  letter-spacing: -0.015em;
  line-height: 1.15;
  overflow-wrap: break-word;
  text-wrap: balance;
}

em { font-style: italic; }

/* ———— shared bits ———— */
.eyebrow {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.btn {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 0.85rem 1.5rem;
  border: 1px solid var(--ink);
  color: var(--ink);
  background: none;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.btn-solid {
  background: var(--ink);
  color: var(--paper);
}

.btn-solid:hover { background: var(--accent); border-color: var(--accent); }

.btn-quiet { border-color: var(--rule); color: var(--ink-soft); }
.btn-quiet:hover { border-color: var(--ink); color: var(--ink); }

/* ———— masthead ———— */
.masthead {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding: 1.1rem clamp(1.25rem, 5vw, 3.5rem);
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--rule);
}

.wordmark {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  min-width: 0;
  text-decoration: none;
  color: var(--ink);
}

.wordmark-mark {
  width: 2.2rem;
  height: 2.2rem;
  flex: none;
  color: var(--accent);
}

.wordmark-text {
  display: flex;
  align-items: baseline;
  gap: 0.4ch;
  flex-wrap: wrap;
  line-height: 1.15;
}

.wordmark-name,
.wordmark-sub {
  font-family: var(--display);
  font-size: clamp(1.05rem, 1.7vw, 1.4rem);
  letter-spacing: 0.01em;
  text-transform: none;
  color: var(--ink);
}

.wordmark-sub { color: var(--accent); }

.masthead-nav {
  display: flex;
  gap: 1.75rem;
  min-width: 0;          /* a flex child must be allowed to shrink */
}

.masthead-nav a {
  font-size: 0.9rem;
  color: var(--ink-soft);
  text-decoration: none;
  position: relative;
  padding-bottom: 2px;
}

.masthead-nav a::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 0; height: 1px;
  background: var(--accent);
  transition: width 0.25s ease;
}

.masthead-nav a:hover { color: var(--ink); }
.masthead-nav a:hover::after { width: 100%; }

/* ———— hero ———— */
.hero {
  position: relative;
  min-height: min(82vh, 46rem);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: clamp(2rem, 6vw, 5rem) clamp(1.25rem, 5vw, 3.5rem) clamp(2rem, 4vw, 3rem);
  overflow: hidden;
  isolation: isolate;
}

.hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
  animation: slow-drift 28s ease-in-out infinite alternate;
}

@keyframes slow-drift {
  from { transform: scale(1.04) translate3d(0, 0, 0); }
  to   { transform: scale(1.12) translate3d(0, -1.5%, 0); }
}

@media (prefers-reduced-motion: reduce) {
  .hero-img { animation: none; transform: scale(1.04); }
}

/* legibility wash, dark at the bottom where the text sits */
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(22,19,15,0.72) 0%, rgba(22,19,15,0.35) 38%,
                    rgba(22,19,15,0.86) 78%, rgba(22,19,15,0.97) 100%);
}

.hero-inner { max-width: var(--measure); width: 100%; margin: 0 auto; }

.hero h1 {
  font-size: clamp(1.95rem, 5.4vw, 4rem);
  margin: 0.8rem 0 1.1rem;
  max-width: 20ch;
  text-shadow: 0 2px 30px rgba(0, 0, 0, 0.5);
}

.lede {
  font-size: clamp(1rem, 1.5vw, 1.18rem);
  color: #ddd3c7;
  max-width: 40ch;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.9rem;
}

.hero-caption {
  max-width: var(--measure);
  width: 100%;
  margin: 2.5rem auto 0;
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(240, 233, 224, 0.45);
}

@media (max-width: 54rem) {
  .hero { min-height: min(76vh, 36rem); }
  .masthead { padding-inline: 1.1rem; gap: 1rem; }
  .masthead-nav {
    gap: 1.1rem;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .masthead-nav::-webkit-scrollbar { display: none; }
  .masthead-nav a { font-size: 0.82rem; white-space: nowrap; }
}

@media (max-width: 30rem) {
  .hero-actions { flex-direction: column; align-items: stretch; }
  .hero-actions .btn { text-align: center; }
}

/* ———— scrollbars ———— */
* { scrollbar-width: thin; scrollbar-color: #3a332b transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: #3a332b;
  border: 2px solid transparent;
  background-clip: content-box;
}
::-webkit-scrollbar-thumb:hover { background: var(--accent); background-clip: content-box; }

/* ———— legibility over photography ———— */
.hero .eyebrow {
  color: rgba(255, 241, 228, 0.82);
  text-shadow: 0 1px 14px rgba(0, 0, 0, 0.75);
}

.hero .lede { text-shadow: 0 1px 16px rgba(0, 0, 0, 0.6); }

.hero .btn-quiet {
  border-color: rgba(240, 233, 224, 0.5);
  color: #f6f1ea;
  background: rgba(22, 19, 15, 0.3);
  backdrop-filter: blur(8px);
}

.hero .btn-quiet:hover {
  border-color: #f6f1ea;
  background: rgba(22, 19, 15, 0.55);
}

.hero-caption { color: rgba(240, 233, 224, 0.6); }
