/* ============================================================
   THE MALLARD GROUP
   Design system — dark editorial, restrained, premium
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,300;9..144,400;9..144,500;9..144,600&family=Manrope:wght@300;400;500;600&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  /* Palette — dark warm neutrals + forest green + bronze */
  --bg:           #0E0D0B;
  --bg-2:         #15130F;
  --surface:      #1B1814;
  --line:         #2A2620;
  --line-soft:    #1F1C17;
  --ink:          #ECE5D5;
  --ink-2:        #C5BDAC;
  --ink-3:        #8B8478;
  --ink-4:        #5C574E;
  --forest:       #2E4232;
  --forest-deep:  #1F2D23;
  --bronze:       #B08D57;
  --bronze-soft:  #8A6E44;

  /* Type */
  --serif:  'Fraunces', 'Cormorant Garamond', Georgia, serif;
  --sans:   'Manrope', -apple-system, BlinkMacSystemFont, sans-serif;
  --mono:   'JetBrains Mono', 'IBM Plex Mono', monospace;

  /* Layout */
  --maxw:   1320px;
  --pad-x:  clamp(24px, 5vw, 80px);
  --pad-y:  clamp(80px, 12vw, 160px);

  /* Motion */
  --ease:   cubic-bezier(0.2, 0.7, 0.2, 1);
  --slow:   900ms;
  --med:    600ms;
}

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

html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 300;
  font-size: 16px;
  line-height: 1.6;
  letter-spacing: 0.005em;
  overflow-x: hidden;
  min-height: 100vh;
  position: relative;
}

/* Grain overlay — atmosphere */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.055;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.9 0 0 0 0 0.85 0 0 0 0 0.75 0 0 0 0.6 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

/* Faint vignette */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background: radial-gradient(ellipse at center, transparent 40%, rgba(0,0,0,0.45) 100%);
}

/* ----- Typography ----- */
h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 300;
  letter-spacing: -0.02em;
  color: var(--ink);
  font-feature-settings: "ss01", "ss02";
}

h1 {
  font-size: clamp(2.75rem, 7vw, 6rem);
  line-height: 0.98;
  letter-spacing: -0.035em;
}

h2 {
  font-size: clamp(2rem, 4.5vw, 3.75rem);
  line-height: 1.02;
  letter-spacing: -0.028em;
}

h3 {
  font-size: clamp(1.4rem, 2vw, 1.75rem);
  line-height: 1.15;
  font-weight: 400;
  letter-spacing: -0.018em;
}

p { color: var(--ink-2); max-width: 62ch; }

a { color: inherit; text-decoration: none; transition: color 220ms var(--ease), opacity 220ms var(--ease); }

::selection { background: var(--bronze); color: var(--bg); }

/* ----- Eyebrow / index labels ----- */
.eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-3);
  display: inline-flex;
  align-items: center;
  gap: 14px;
}

.eyebrow::before {
  content: '';
  width: 28px;
  height: 1px;
  background: var(--bronze-soft);
}

.eyebrow.no-bar::before { display: none; }

.index {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--bronze);
}

/* ----- Layout helpers ----- */
.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding-left: var(--pad-x);
  padding-right: var(--pad-x);
  position: relative;
  z-index: 2;
}

section { position: relative; z-index: 2; }

.section-pad { padding-top: var(--pad-y); padding-bottom: var(--pad-y); }

.hairline { height: 1px; background: var(--line); border: 0; width: 100%; }

/* ============================================================
   NAVIGATION
   ============================================================ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 22px var(--pad-x);
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: background 400ms var(--ease), backdrop-filter 400ms var(--ease), padding 400ms var(--ease), border-color 400ms var(--ease);
  border-bottom: 1px solid transparent;
}

.nav.scrolled {
  background: rgba(14, 13, 11, 0.78);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  padding-top: 16px;
  padding-bottom: 16px;
  border-bottom-color: var(--line-soft);
}

.nav-mark {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  color: var(--ink);
}

.nav-mark svg { display: block; }

.nav-mark-text {
  font-family: var(--serif);
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--ink);
}

@media (max-width: 640px) {
  .nav-mark-text { display: none; }
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 36px;
  list-style: none;
}

.nav-links a {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-2);
  position: relative;
  padding: 6px 0;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--ink);
}

.nav-links a.active::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 1px;
  background: var(--bronze);
}

.nav-cta {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  padding: 10px 18px;
  border: 1px solid var(--line);
  color: var(--ink);
  transition: border-color 220ms var(--ease), color 220ms var(--ease);
}

.nav-cta:hover { border-color: var(--bronze); color: var(--bronze); }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line);
  color: var(--ink);
  padding: 8px 12px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  cursor: pointer;
}

@media (max-width: 860px) {
  .nav-links, .nav-cta { display: none; }
  .nav-toggle { display: inline-flex; }
  .nav.open .nav-mobile { display: flex; }
}

.nav-mobile {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 99;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 28px;
  padding: var(--pad-x);
}

.nav-mobile a {
  font-family: var(--serif);
  font-size: 28px;
  color: var(--ink);
  letter-spacing: -0.01em;
}

.nav-mobile .close {
  position: absolute;
  top: 22px;
  right: var(--pad-x);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  background: none;
  border: 1px solid var(--line);
  color: var(--ink);
  padding: 10px 16px;
  cursor: pointer;
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: flex-end;
  padding-top: 140px;
  padding-bottom: clamp(60px, 10vw, 110px);
  position: relative;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(circle at 80% 20%, rgba(46, 66, 50, 0.22), transparent 55%),
    radial-gradient(circle at 15% 90%, rgba(176, 141, 87, 0.08), transparent 50%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%);
}

.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(90deg, rgba(236, 229, 213, 0.025) 1px, transparent 1px);
  background-size: calc(100% / 12) 100%;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 60px;
  width: 100%;
  align-items: end;
}

@media (min-width: 1000px) {
  .hero-grid { grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 80px; }
}

.hero-meta {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-bottom: 28px;
}

.hero h1 {
  margin-bottom: 36px;
}

.hero h1 .italic {
  font-style: italic;
  font-weight: 300;
  color: var(--ink-2);
}

.hero-sub {
  font-size: clamp(1rem, 1.3vw, 1.15rem);
  color: var(--ink-2);
  max-width: 52ch;
  line-height: 1.55;
  font-weight: 300;
}

.hero-side {
  display: flex;
  flex-direction: column;
  gap: 32px;
  padding-left: clamp(0px, 2vw, 24px);
  border-left: 1px solid var(--line);
}

@media (max-width: 999px) {
  .hero-side { border-left: 0; padding-left: 0; padding-top: 32px; border-top: 1px solid var(--line); }
}

.hero-side-block {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.hero-side-label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.hero-side-value {
  font-family: var(--serif);
  font-size: 18px;
  color: var(--ink);
  font-weight: 400;
  letter-spacing: -0.01em;
}

.hero-ctas {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 16px 26px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  border: 1px solid var(--line);
  color: var(--ink);
  transition: all 320ms var(--ease);
  cursor: pointer;
  background: transparent;
}

.btn .arrow {
  display: inline-block;
  width: 14px;
  height: 1px;
  background: currentColor;
  position: relative;
  transition: width 320ms var(--ease);
}

.btn .arrow::after {
  content: '';
  position: absolute;
  right: 0;
  top: -3px;
  width: 6px;
  height: 6px;
  border-top: 1px solid currentColor;
  border-right: 1px solid currentColor;
  transform: rotate(45deg);
}

.btn:hover { color: var(--bronze); border-color: var(--bronze); }
.btn:hover .arrow { width: 24px; }

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

.btn-ghost { border-color: transparent; padding-left: 0; padding-right: 0; }
.btn-ghost:hover { border-color: transparent; }

/* ============================================================
   PAGE HEADER (subpages)
   ============================================================ */
.page-header {
  padding-top: 200px;
  padding-bottom: clamp(60px, 8vw, 100px);
  position: relative;
  overflow: hidden;
}

.page-header-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(circle at 70% 30%, rgba(46, 66, 50, 0.18), transparent 60%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%);
}

.page-header h1 {
  font-size: clamp(2.5rem, 6vw, 4.75rem);
  max-width: 18ch;
  margin-top: 28px;
  margin-bottom: 28px;
}

.page-header .lede {
  font-size: clamp(1.05rem, 1.4vw, 1.2rem);
  color: var(--ink-2);
  max-width: 58ch;
  line-height: 1.55;
}

/* ============================================================
   PHILOSOPHY / TEXT SECTION
   ============================================================ */
.split {
  display: grid;
  grid-template-columns: 1fr;
  gap: 50px;
}

@media (min-width: 900px) {
  .split { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 80px; }
}

.split-head h2 { margin-top: 24px; }

.split-body p + p { margin-top: 22px; }

.pull-quote {
  font-family: var(--serif);
  font-size: clamp(1.5rem, 2.8vw, 2.1rem);
  font-style: italic;
  font-weight: 300;
  line-height: 1.25;
  letter-spacing: -0.015em;
  color: var(--ink);
  padding: 40px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin: 60px 0;
  max-width: 36ch;
}

/* ============================================================
   FOCUS GRID
   ============================================================ */
.focus-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  margin-top: 60px;
  border-top: 1px solid var(--line);
}

@media (min-width: 720px) {
  .focus-grid { grid-template-columns: 1fr 1fr; }
}

.focus-item {
  padding: 48px 40px 56px;
  border-bottom: 1px solid var(--line);
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-height: 320px;
  transition: background 400ms var(--ease);
}

@media (min-width: 720px) {
  .focus-item:nth-child(odd) { border-right: 1px solid var(--line); }
}

.focus-item:hover { background: rgba(176, 141, 87, 0.025); }

.focus-item .index { margin-bottom: 8px; }

.focus-item h3 {
  font-size: clamp(1.5rem, 2.2vw, 1.9rem);
  letter-spacing: -0.02em;
}

.focus-item p {
  color: var(--ink-2);
  font-size: 15px;
  line-height: 1.6;
  max-width: 36ch;
}

.focus-item .glyph {
  position: absolute;
  top: 40px;
  right: 40px;
  color: var(--bronze-soft);
  opacity: 0.65;
}

/* ============================================================
   FUTURE SECTION
   ============================================================ */
.future {
  padding-top: var(--pad-y);
  padding-bottom: var(--pad-y);
  position: relative;
  overflow: hidden;
}

.future-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    linear-gradient(180deg, var(--bg) 0%, var(--forest-deep) 50%, var(--bg) 100%);
  opacity: 0.55;
}

.future .container { text-align: left; }

.future h2 {
  max-width: 18ch;
  margin-top: 28px;
  margin-bottom: 36px;
}

.future p {
  max-width: 54ch;
  font-size: clamp(1rem, 1.2vw, 1.1rem);
}

/* ============================================================
   FOUNDER / VISION TEASER
   ============================================================ */
.founder {
  display: grid;
  grid-template-columns: 1fr;
  gap: 50px;
  align-items: start;
}

@media (min-width: 900px) {
  .founder { grid-template-columns: minmax(0, 0.45fr) minmax(0, 1fr); gap: 80px; }
}

.founder-meta {
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-left: 1px solid var(--bronze-soft);
  padding-left: 24px;
}

.founder-name {
  font-family: var(--serif);
  font-size: 22px;
  color: var(--ink);
  font-weight: 400;
  letter-spacing: -0.01em;
}

.founder-role {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.founder-body p + p { margin-top: 22px; }

/* ============================================================
   VALUES LIST (about / vision)
   ============================================================ */
.values {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  margin-top: 50px;
  border-top: 1px solid var(--line);
}

.values li {
  display: grid;
  grid-template-columns: 60px 1fr;
  gap: 24px;
  padding: 32px 0;
  border-bottom: 1px solid var(--line);
  align-items: baseline;
}

@media (min-width: 720px) {
  .values li { grid-template-columns: 80px 220px 1fr; gap: 40px; }
}

.values .num {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  color: var(--bronze);
}

.values .label {
  font-family: var(--serif);
  font-size: clamp(1.3rem, 1.8vw, 1.6rem);
  color: var(--ink);
  font-weight: 400;
  letter-spacing: -0.015em;
}

.values .desc {
  color: var(--ink-2);
  font-size: 15px;
  line-height: 1.6;
  max-width: 48ch;
}

@media (max-width: 719px) {
  .values li > .desc { grid-column: 2; }
}

/* ============================================================
   CONTACT
   ============================================================ */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 60px;
  align-items: start;
}

@media (min-width: 900px) {
  .contact-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 80px; }
}

.contact-info { display: flex; flex-direction: column; gap: 32px; }

.contact-block {
  border-top: 1px solid var(--line);
  padding-top: 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.contact-block .label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.contact-block .value {
  font-family: var(--serif);
  font-size: 20px;
  color: var(--ink);
  font-weight: 400;
  letter-spacing: -0.01em;
}

.contact-block a.value:hover { color: var(--bronze); }

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 10px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 14px;
  transition: border-color 220ms var(--ease);
}

.field:focus-within { border-bottom-color: var(--bronze); }

.field label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.field input,
.field textarea {
  background: transparent;
  border: none;
  outline: none;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 300;
  padding: 4px 0;
  resize: none;
  width: 100%;
}

.field input::placeholder,
.field textarea::placeholder {
  color: var(--ink-4);
  font-weight: 300;
}

.field textarea { min-height: 100px; }

.contact-form .btn { align-self: flex-start; margin-top: 12px; }

.form-note {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--ink-3);
  margin-top: 18px;
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  border-top: 1px solid var(--line);
  padding: 80px var(--pad-x) 50px;
  margin-top: 100px;
  position: relative;
  z-index: 2;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 50px;
  max-width: var(--maxw);
  margin: 0 auto;
}

@media (min-width: 800px) {
  .footer-grid { grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 40px; }
}

.footer-brand { display: flex; flex-direction: column; gap: 20px; max-width: 360px; }

.footer-brand .wordmark {
  font-family: var(--serif);
  font-size: 28px;
  letter-spacing: -0.01em;
  font-weight: 300;
  line-height: 1;
}

.footer-brand .tagline {
  color: var(--ink-3);
  font-size: 13px;
  line-height: 1.55;
}

.footer-col h4 {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 18px;
}

.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 12px; }

.footer-col a {
  color: var(--ink-2);
  font-size: 14px;
  letter-spacing: -0.005em;
}

.footer-col a:hover { color: var(--bronze); }

.footer-bottom {
  max-width: var(--maxw);
  margin: 70px auto 0;
  padding-top: 30px;
  border-top: 1px solid var(--line-soft);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-4);
}

/* ============================================================
   MOTION — fade-in on load + scroll reveal
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity var(--slow) var(--ease), transform var(--slow) var(--ease);
  will-change: opacity, transform;
}

.reveal.in {
  opacity: 1;
  transform: translateY(0);
}

/* Page-load stagger */
.load-stagger > * {
  opacity: 0;
  transform: translateY(18px);
  animation: rise 1100ms var(--ease) forwards;
}

.load-stagger > *:nth-child(1) { animation-delay: 200ms; }
.load-stagger > *:nth-child(2) { animation-delay: 350ms; }
.load-stagger > *:nth-child(3) { animation-delay: 500ms; }
.load-stagger > *:nth-child(4) { animation-delay: 650ms; }
.load-stagger > *:nth-child(5) { animation-delay: 800ms; }
.load-stagger > *:nth-child(6) { animation-delay: 950ms; }

@keyframes rise {
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}
