/* Crystal Point — Site styles v1
   Brand tokens: Fjord Turquoise #127582, Ink #0E1D22, Ice #DDE5E5, Mist #F2F5F5, Reverse #F7F4EE
   Type: Cormorant Garamond (display) + Inter (body)
*/

/* ---------- Fonts ---------- */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500&family=Inter:wght@300;400;500;600;700&display=swap');

/* ---------- Tokens ---------- */
:root {
  /* Brand */
  --fjord: #127582;
  --fjord-deep: #0C5D67;
  --ink: #0E1D22;
  --ice: #DDE5E5;
  --mist: #F2F5F5;
  --mineral: #8B9299;
  --reverse: #F7F4EE;
  --white: #FFFFFF;

  /* Type */
  --font-display: 'Cormorant Garamond', 'Times New Roman', serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

  --text-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
  --text-sm: clamp(0.875rem, 0.8rem + 0.35vw, 1rem);
  --text-base: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  --text-lg: clamp(1.125rem, 1rem + 0.75vw, 1.5rem);
  --text-xl: clamp(1.5rem, 1.2rem + 1.25vw, 2.25rem);
  --text-2xl: clamp(2rem, 1.2rem + 2.5vw, 3.5rem);
  --text-hero: clamp(2.75rem, 1rem + 5vw, 5.5rem);

  /* Spacing */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-32: 8rem;

  /* Layout */
  --page-max: 1240px;
  --page-pad: clamp(1.25rem, 3vw, 2.5rem);
  --rule: 1px solid rgba(14, 29, 34, 0.14);
  --rule-strong: 1px solid rgba(14, 29, 34, 0.28);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.55;
  color: var(--ink);
  background: var(--mist);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--fjord); }
button { font: inherit; cursor: pointer; background: none; border: 0; color: inherit; }

/* ---------- Typography ----------
   Promise in serif. Proof in sans.
   Cormorant is reserved for: hero H1, one section title per page (add .serif),
   and one italic tagline per page (.tagline-italic).
   Everything else — H2/H3/H4, subheads, nav, body — is Inter.
----------------------------------- */
h1, h2, h3, h4 { font-family: var(--font-body); font-weight: 600; letter-spacing: -0.01em; line-height: 1.12; color: var(--ink); }
h1 { letter-spacing: -0.02em; line-height: 1.08; }

/* Opt-in serif: for hero H1 and one section title per page. */
.serif { font-family: var(--font-display); font-weight: 600; letter-spacing: -0.005em; line-height: 1.08; }
.serif h1, .serif h2, h1.serif, h2.serif { font-family: var(--font-display); font-weight: 600; letter-spacing: -0.005em; line-height: 1.08; }

/* Hero H1 is always serif by default (site-wide rule). */
.hero h1 { font-family: var(--font-display); font-weight: 600; letter-spacing: -0.005em; line-height: 1.08; }

.eyebrow { font-family: var(--font-body); font-size: var(--text-xs); font-weight: 600; text-transform: uppercase; letter-spacing: 0.14em; color: var(--fjord); }
.tagline-italic { font-family: var(--font-display); font-style: italic; font-weight: 500; color: var(--fjord); }
.body-lg { font-size: var(--text-lg); line-height: 1.5; }
.muted { color: var(--mineral); }

/* ---------- Layout containers ---------- */
.container {
  max-width: var(--page-max);
  margin: 0 auto;
  padding-left: var(--page-pad);
  padding-right: var(--page-pad);
}
section { padding: clamp(3rem, 8vw, 6rem) 0; }
.section-tight { padding: clamp(2rem, 5vw, 3.5rem) 0; }

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--mist);
  border-bottom: var(--rule);
  backdrop-filter: saturate(1.2);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-6);
  height: 72px;
}
.nav-logo { display: block; }
.nav-logo img { height: 36px; width: auto; }
@media (max-width: 640px) { .nav-logo img { height: 30px; } }
.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(1.25rem, 2.5vw, 2.25rem);
  list-style: none;
}
.nav-links a {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--ink);
  padding: var(--space-2) 0;
  border-bottom: 2px solid transparent;
  transition: border-color 0.2s;
}
.nav-links a:hover, .nav-links a.active { border-bottom-color: var(--fjord); color: var(--ink); }
.nav-toggle {
  display: none;
  width: 32px; height: 32px;
  position: relative;
}
.nav-toggle span {
  position: absolute; left: 4px; right: 4px; height: 2px;
  background: var(--ink); transition: transform 0.25s, opacity 0.25s;
}
.nav-toggle span:nth-child(1) { top: 10px; }
.nav-toggle span:nth-child(2) { top: 15px; }
.nav-toggle span:nth-child(3) { top: 20px; }
.nav.open .nav-toggle span:nth-child(1) { transform: translateY(5px) rotate(45deg); }
.nav.open .nav-toggle span:nth-child(2) { opacity: 0; }
.nav.open .nav-toggle span:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }

@media (max-width: 820px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: absolute; top: 72px; left: 0; right: 0;
    flex-direction: column;
    background: var(--mist);
    border-bottom: var(--rule);
    gap: 0;
    padding: var(--space-4) var(--page-pad) var(--space-6);
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.25s, opacity 0.2s;
  }
  .nav.open .nav-links {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }
  .nav-links li { width: 100%; border-bottom: var(--rule); }
  .nav-links li:last-child { border-bottom: 0; }
  .nav-links a {
    display: block;
    padding: var(--space-4) 0;
    border-bottom: 0;
  }
}

/* ---------- Hero ---------- */
.hero {
  background: var(--mist);
  padding: clamp(4rem, 10vw, 8rem) 0 clamp(3rem, 7vw, 5rem);
  border-bottom: var(--rule);
}

/* Image-backed hero variant. Photograph sits behind, dark gradient overlay
   ensures ink text remains legible. Used on Home, About, Operations. */
.hero-image {
  position: relative;
  padding: clamp(6rem, 14vw, 10rem) 0 clamp(4rem, 9vw, 6rem);
  color: var(--reverse);
  background: var(--ink);
  border-bottom: 0;
  overflow: hidden;
}
.hero-image::before {
  content: '';
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  z-index: 0;
}
.hero-image::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg,
      rgba(14, 29, 34, 0.55) 0%,
      rgba(14, 29, 34, 0.42) 30%,
      rgba(14, 29, 34, 0.62) 65%,
      rgba(14, 29, 34, 0.78) 100%),
    linear-gradient(90deg,
      rgba(14, 29, 34, 0.35) 0%,
      rgba(14, 29, 34, 0.10) 50%,
      rgba(14, 29, 34, 0.10) 100%);
  z-index: 1;
}
.hero-image .container { position: relative; z-index: 2; }
/* Elevated specificity so these rules beat .hero .subline (defined later). */
.hero.hero-image h1,
.hero.hero-image .subline,
.hero.hero-image .hero-tagline {
  color: var(--reverse);
  text-shadow: 0 1px 12px rgba(14, 29, 34, 0.45);
}
.hero.hero-image .eyebrow {
  color: var(--ice);
  text-shadow: 0 1px 8px rgba(14, 29, 34, 0.45);
}
.hero.hero-image .muted {
  color: var(--ice);
  opacity: 0.9;
  text-shadow: 0 1px 8px rgba(14, 29, 34, 0.5);
}
.hero.hero-image .subline.muted { color: var(--ice); }
.hero.hero-image .hairline { border-top-color: var(--ice); }
.hero.hero-image .cta { color: var(--reverse); border-bottom-color: var(--ice); }
.hero.hero-image .cta:hover { color: var(--ice); border-bottom-color: var(--fjord); }

.bg-hero-portion::before { background-image: url('img/hero-portion-real-1787743526.jpg'); background-position: center center; }
.bg-hero-fillet::before { background-image: url('img/vestnes-farm-winter-1787743526.jpg'); background-position: center 40%; }
.bg-hero-line::before { background-image: url('img/tresfjord-mountains-1787743526.jpg'); background-position: center 55%; }

/* Full-bleed section imagery — used as a pacing/atmosphere break between
   text sections. Image runs edge-to-edge, no caption. */
.section-image {
  padding: 0;
  background: var(--ink);
}
.section-image .figure-full {
  width: 100%;
  aspect-ratio: 16 / 7;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
@media (max-width: 640px) {
  .section-image .figure-full { aspect-ratio: 4 / 3; }
}
.bg-tresfjord-real { background-image: url('img/tresfjord-mountains-1787743526.jpg'); background-position: center 55%; background-size: cover; background-repeat: no-repeat; }

/* Optional caption for a section-image break. Tiny, aligned to grid. */
.section-image .figure-caption {
  padding: var(--space-4) 0 var(--space-8);
  background: var(--mist);
  color: var(--ink);
}
.section-image .figure-caption .cap {
  font-size: var(--text-xs);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
  opacity: 0.72;
}

/* Inline image + text pair — used on Home Section 05 with the portion shot. */
.image-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: center;
}
.image-pair .image-pair-figure {
  aspect-ratio: 4 / 3;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-color: var(--ice);
}
@media (max-width: 720px) {
  .image-pair { grid-template-columns: 1fr; }
}
.bg-portion-row { background-image: url('img/portion-row.jpg'); }
.hero-inner { max-width: 900px; }
.hero h1 {
  font-size: var(--text-hero);
  margin-top: var(--space-6);
  margin-bottom: var(--space-8);
}
.hero .subline {
  font-size: var(--text-lg);
  line-height: 1.45;
  color: var(--ink);
  max-width: 640px;
  margin-bottom: var(--space-8);
}
.hero .hairline {
  width: 64px;
  border-top: 2px solid var(--fjord);
  margin: var(--space-8) 0 var(--space-6);
}
.hero-tagline {
  font-size: var(--text-lg);
  margin-bottom: var(--space-8);
}
.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-6);
  align-items: center;
}

/* ---------- CTAs ---------- */
.cta {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  font-weight: 500;
  padding: var(--space-3) 0;
  border-bottom: 1.5px solid var(--ink);
  color: var(--ink);
  transition: border-color 0.2s, color 0.2s, gap 0.2s;
}
.cta.primary { border-bottom-color: var(--fjord); color: var(--fjord); }
.cta:hover { color: var(--fjord); border-bottom-color: var(--fjord); gap: var(--space-3); }
.cta::after { content: '→'; display: inline-block; transition: transform 0.2s; }
.cta:hover::after { transform: translateX(3px); }

/* ---------- Section headings ---------- */
.section-title {
  display: flex;
  align-items: baseline;
  gap: var(--space-6);
  margin-bottom: var(--space-12);
  flex-wrap: wrap;
}
.section-title h2 { font-size: var(--text-2xl); }
.section-title .eyebrow { flex-shrink: 0; }

/* ---------- Values grid (numbered) ---------- */
.values {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0;
  border-top: var(--rule);
  border-left: var(--rule);
}
.value {
  padding: var(--space-8) var(--space-6);
  border-right: var(--rule);
  border-bottom: var(--rule);
  background: var(--ice);
}
.value-num {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--fjord);
  margin-bottom: var(--space-3);
}
.value h3 {
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--ink);
  margin-bottom: var(--space-3);
  letter-spacing: 0;
}
.value p { color: var(--ink); }

/* ---------- Two-column ---------- */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 5rem);
}
@media (max-width: 720px) {
  .two-col { grid-template-columns: 1fr; gap: var(--space-8); }
}
.two-col p + p { margin-top: var(--space-4); }

/* ---------- Three-column ---------- */
.three-col {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.5rem, 3vw, 3rem);
}
@media (max-width: 820px) { .three-col { grid-template-columns: 1fr; gap: var(--space-8); } }
.three-col .col h3 {
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--fjord);
  text-transform: uppercase;
  letter-spacing: 0.10em;
  margin-bottom: var(--space-4);
  padding-bottom: var(--space-2);
  border-bottom: 2px solid var(--fjord);
  display: inline-block;
}

/* ---------- People cards ---------- */
.people {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.5rem, 3vw, 3rem);
}
@media (max-width: 820px) { .people { grid-template-columns: 1fr; } }
.person {
  padding-top: var(--space-6);
  border-top: 2px solid var(--fjord);
}
.person .role {
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.10em;
  color: var(--mineral);
  margin-bottom: var(--space-3);
}
.person h3 {
  font-family: var(--font-body);
  font-size: var(--text-lg);
  font-weight: 600;
  margin-bottom: var(--space-4);
}

/* ---------- Timeline ---------- */
.timeline {
  list-style: none;
  border-top: var(--rule);
}
.timeline li {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: var(--space-6);
  padding: var(--space-6) 0;
  border-bottom: var(--rule);
  align-items: baseline;
}
.timeline .year {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--fjord);
}
@media (max-width: 620px) {
  .timeline li { grid-template-columns: 1fr; gap: var(--space-2); padding: var(--space-4) 0; }
}

/* ---------- Pull quote ---------- */
.pullquote {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  font-size: var(--text-2xl);
  color: var(--fjord);
  line-height: 1.2;
  border-left: 2px solid var(--fjord);
  padding: var(--space-4) 0 var(--space-4) var(--space-8);
  margin: var(--space-16) 0;
  max-width: 720px;
}

/* ---------- Long-form body (essay) ---------- */
.essay { max-width: 720px; }
.essay p { font-size: var(--text-base); line-height: 1.7; margin-bottom: var(--space-6); }
.essay h2 { font-size: var(--text-xl); margin-top: var(--space-16); margin-bottom: var(--space-6); }
.essay ul { padding-left: 0; list-style: none; margin: var(--space-6) 0; }
.essay ul li { padding-left: var(--space-6); position: relative; margin-bottom: var(--space-4); line-height: 1.6; }
.essay ul li::before { content: '·'; position: absolute; left: 0; color: var(--fjord); font-weight: 700; }
.essay strong { font-weight: 600; }

/* ---------- Closing rule ---------- */
.closing {
  text-align: center;
  padding: clamp(3rem, 7vw, 5rem) 0;
}
.closing .rule {
  width: 80px;
  border-top: 2px solid var(--fjord);
  margin: 0 auto var(--space-6);
}
.closing .tagline-italic { font-size: var(--text-xl); }

/* ---------- Contact page ---------- */
.contact-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
}
@media (max-width: 720px) { .contact-cols { grid-template-columns: 1fr; } }
.contact-col h3 {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--fjord);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  margin-bottom: var(--space-6);
  padding-bottom: var(--space-3);
  border-bottom: 2px solid var(--fjord);
}
.contact-col .name {
  font-family: var(--font-body);
  font-size: var(--text-lg);
  font-weight: 600;
  margin-bottom: var(--space-1);
}
.contact-col .role { color: var(--mineral); font-size: var(--text-sm); margin-bottom: var(--space-4); }
.contact-col a { font-weight: 500; }
.contact-col p + p { margin-top: var(--space-2); }

.address-block {
  border-top: var(--rule);
  padding-top: var(--space-8);
  margin-top: var(--space-16);
  font-size: var(--text-sm);
  color: var(--mineral);
  line-height: 1.7;
}
.address-block strong { color: var(--ink); font-weight: 600; display: block; margin-bottom: var(--space-1); }

/* ---------- Form ---------- */
.contact-form {
  margin-top: var(--space-16);
  padding-top: var(--space-16);
  border-top: var(--rule);
  max-width: 640px;
}
.contact-form h3 {
  font-family: var(--font-body);
  font-size: var(--text-lg);
  font-weight: 600;
  margin-bottom: var(--space-6);
}
.field { margin-bottom: var(--space-6); }
.field label {
  display: block;
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.10em;
  color: var(--mineral);
  margin-bottom: var(--space-2);
}
.field input, .field select, .field textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: var(--text-base);
  padding: var(--space-3) 0;
  background: transparent;
  border: 0;
  border-bottom: 1.5px solid var(--ink);
  color: var(--ink);
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-bottom-color: var(--fjord);
}
.field textarea { resize: vertical; min-height: 100px; }
.form-submit {
  font-size: var(--text-sm);
  font-weight: 500;
  padding: var(--space-4) var(--space-8);
  background: var(--ink);
  color: var(--reverse);
  transition: background 0.2s;
}
.form-submit:hover { background: var(--fjord); }
.form-note { margin-top: var(--space-4); font-size: var(--text-xs, 0.8125rem); color: var(--ink); opacity: 0.6; max-width: 520px; line-height: 1.5; }
.form-note a { color: inherit; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 2px; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--ink);
  color: var(--reverse);
  padding: clamp(3rem, 6vw, 5rem) 0 var(--space-8);
  margin-top: var(--space-32);
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(1.5rem, 3vw, 3rem);
  padding-bottom: var(--space-16);
  border-bottom: 1px solid rgba(247, 244, 238, 0.12);
}
@media (max-width: 820px) { .footer-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-col h4 {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--mineral);
  margin-bottom: var(--space-4);
}
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: var(--space-2); font-size: var(--text-sm); line-height: 1.6; }
.footer-col a { color: var(--reverse); opacity: 0.8; }
.footer-col a:hover { opacity: 1; color: var(--reverse); }
.footer-col p { font-size: var(--text-sm); line-height: 1.6; opacity: 0.75; }
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-4);
  padding-top: var(--space-6);
  font-size: var(--text-xs);
  color: rgba(247, 244, 238, 0.55);
  letter-spacing: 0.06em;
}
.footer-bottom .brand-line { text-transform: uppercase; letter-spacing: 0.14em; }
.footer-tagline { font-family: var(--font-display); font-style: italic; color: rgba(247, 244, 238, 0.75); letter-spacing: 0; text-transform: none; font-size: var(--text-sm); }

/* ---------- Utilities ---------- */
/* Reveal is a no-op utility — content is always visible. Kept as a hook for future subtle enhancements. */
.reveal { opacity: 1; }

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