/* File Havenline Miner School — contemporary structured craft */

:root {
  --bg: #f3f0ea;
  --bg-deep: #e6e1d6;
  --surface: #fffcf7;
  --ink: #1c2420;
  --ink-soft: #3d4a43;
  --muted: #66736b;
  --line: #d5cec0;
  --accent: #2f6b55;
  --accent-deep: #1a4538;
  --copper: #b87333;
  --copper-soft: #d4a574;
  --highlight: #f0e6d2;
  --error: #9b2c2c;
  --success: #1a5c3a;
  --radius: 4px;
  --radius-lg: 14px;
  --shadow: 0 18px 40px rgba(28, 36, 32, 0.08);
  --font-display: "Bricolage Grotesque", "Segoe UI", sans-serif;
  --font-body: "Figtree", "Segoe UI", sans-serif;
  --header-h: 4.25rem;
  --max: 72rem;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background:
    radial-gradient(ellipse 80% 50% at 10% -10%, rgba(47, 107, 85, 0.09), transparent 55%),
    radial-gradient(ellipse 60% 40% at 100% 0%, rgba(184, 115, 51, 0.08), transparent 50%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-deep) 100%);
  background-attachment: fixed;
  min-height: 100vh;
}

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

a {
  color: var(--accent-deep);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
  transition: color 0.2s var(--ease);
}

a:hover {
  color: var(--copper);
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 650;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--ink);
}

p {
  margin: 0 0 1rem;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.wrap {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(12px);
  background: rgba(243, 240, 234, 0.88);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
  min-height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: -0.02em;
}

.brand:hover {
  color: var(--accent-deep);
}

.brand-mark {
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 0.4rem;
  background:
    linear-gradient(145deg, var(--accent) 0%, var(--accent-deep) 60%),
    var(--copper);
  box-shadow: inset 0 0 0 2px rgba(212, 165, 116, 0.45);
  flex-shrink: 0;
}

.brand-text {
  max-width: 14rem;
  line-height: 1.2;
}

.nav-toggle {
  display: none;
  width: 2.75rem;
  height: 2.75rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

.nav-toggle-bar,
.nav-toggle-bar::before,
.nav-toggle-bar::after {
  display: block;
  width: 1.15rem;
  height: 2px;
  background: var(--ink);
  position: relative;
  transition: transform 0.25s var(--ease);
}

.nav-toggle-bar::before,
.nav-toggle-bar::after {
  content: "";
  position: absolute;
  left: 0;
}

.nav-toggle-bar::before { top: -6px; }
.nav-toggle-bar::after { top: 6px; }

.nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 0.15rem 1.1rem;
  flex-wrap: wrap;
}

.nav-list a {
  text-decoration: none;
  color: var(--ink-soft);
  font-size: 0.92rem;
  font-weight: 560;
}

.nav-list a:hover,
.nav-list a[aria-current="page"] {
  color: var(--accent-deep);
}

.nav-cta {
  display: inline-flex !important;
  align-items: center;
  padding: 0.55rem 0.95rem;
  background: var(--accent);
  color: #f8faf8 !important;
  border-radius: 999px;
  text-decoration: none !important;
}

.nav-cta:hover {
  background: var(--accent-deep);
  color: #fff !important;
}

/* Main layout helpers */
main {
  overflow-x: clip;
}

.page-hero {
  padding: 3.5rem 0 2.5rem;
  position: relative;
}

.page-hero h1 {
  font-size: clamp(2rem, 4.5vw, 3.25rem);
  margin: 0 0 0.85rem;
  max-width: 18ch;
}

.page-hero .lede {
  font-size: 1.125rem;
  color: var(--ink-soft);
  max-width: 38rem;
  margin-bottom: 0;
}

.section {
  padding: 3.5rem 0;
}

.section-title {
  font-size: clamp(1.65rem, 3vw, 2.25rem);
  margin: 0 0 0.75rem;
}

.section-intro {
  color: var(--ink-soft);
  max-width: 38rem;
  margin-bottom: 2rem;
}

.eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--copper);
  margin-bottom: 0.75rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.35rem;
  font-family: var(--font-body);
  font-weight: 650;
  font-size: 0.95rem;
  border-radius: 999px;
  border: 1.5px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.2s var(--ease), background 0.2s var(--ease), color 0.2s var(--ease), border-color 0.2s var(--ease);
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--accent);
  color: #f7fbf8;
}

.btn-primary:hover {
  background: var(--accent-deep);
  color: #fff;
}

.btn-ghost {
  background: transparent;
  border-color: var(--ink);
  color: var(--ink);
}

.btn-ghost:hover {
  background: var(--ink);
  color: var(--surface);
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

/* Home hero — asymmetric split */
.home-hero {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 2rem;
  align-items: stretch;
  padding: 2.5rem 0 3rem;
  min-height: calc(100vh - var(--header-h) - 2rem);
}

.home-hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 1rem 0 2rem;
  animation: rise 0.9s var(--ease) both;
}

.home-hero-brand {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 6vw, 4.1rem);
  font-weight: 750;
  letter-spacing: -0.035em;
  line-height: 0.98;
  margin: 0 0 1.25rem;
  color: var(--ink);
  max-width: 11ch;
}

.home-hero h1 {
  font-size: clamp(1.15rem, 2.2vw, 1.45rem);
  font-weight: 550;
  letter-spacing: -0.01em;
  color: var(--ink-soft);
  margin: 0 0 1rem;
  max-width: 28ch;
  font-family: var(--font-body);
}

.home-hero .lede {
  color: var(--muted);
  max-width: 34rem;
  margin-bottom: 0;
}

.home-hero-visual {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  min-height: 28rem;
  box-shadow: var(--shadow);
  animation: fade-in 1.1s var(--ease) 0.15s both;
}

.home-hero-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  min-height: 28rem;
  transform: scale(1.04);
  animation: slow-zoom 18s ease-in-out infinite alternate;
}

.home-hero-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, transparent 40%, rgba(26, 69, 56, 0.35));
  pointer-events: none;
}

/* Offer strip */
.offer-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin-top: -1rem;
  position: relative;
  z-index: 2;
}

.offer-tile {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1.4rem 1.35rem;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
}

.offer-tile:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.offer-tile h3 {
  margin: 0 0 0.5rem;
  font-size: 1.15rem;
}

.offer-tile p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.offer-tile a {
  display: inline-block;
  margin-top: 0.9rem;
  font-weight: 650;
  text-decoration: none;
}

/* Media blocks */
.media-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  align-items: center;
}

.media-split img {
  width: 100%;
  border-radius: var(--radius-lg);
  aspect-ratio: 4/3;
  object-fit: cover;
  box-shadow: var(--shadow);
}

.prose-block h2 {
  margin-top: 0;
}

.list-check {
  list-style: none;
  padding: 0;
  margin: 1.25rem 0 0;
}

.list-check li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 0.65rem;
  color: var(--ink-soft);
}

.list-check li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55rem;
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 2px;
  background: var(--copper);
}

/* Service cards */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: 1.35rem;
}

.service-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.service-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.service-card img {
  width: 100%;
  aspect-ratio: 16/10;
  object-fit: cover;
}

.service-card-body {
  padding: 1.25rem 1.3rem 1.45rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.service-card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.2rem;
}

.service-card p {
  color: var(--muted);
  flex: 1;
  font-size: 0.95rem;
}

.service-card .btn {
  align-self: flex-start;
  margin-top: 0.75rem;
}

/* Quote / stories */
.quote-panel {
  background: var(--accent-deep);
  color: #e8f0eb;
  border-radius: var(--radius-lg);
  padding: clamp(1.75rem, 4vw, 2.75rem);
  position: relative;
  overflow: hidden;
}

.quote-panel::before {
  content: "";
  position: absolute;
  width: 12rem;
  height: 12rem;
  right: -3rem;
  top: -4rem;
  border-radius: 50%;
  background: rgba(212, 165, 116, 0.15);
}

.quote-panel blockquote {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 2.4vw, 1.55rem);
  line-height: 1.4;
  font-weight: 500;
  max-width: 38rem;
  position: relative;
}

.quote-panel cite {
  display: block;
  margin-top: 1.25rem;
  font-style: normal;
  font-size: 0.9rem;
  color: var(--copper-soft);
  font-family: var(--font-body);
}

/* Pricing */
.rate-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.rate-table th,
.rate-table td {
  text-align: left;
  padding: 1rem 1.15rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.rate-table th {
  background: var(--highlight);
  font-family: var(--font-display);
  font-weight: 650;
}

.rate-table tr:last-child td {
  border-bottom: 0;
}

.price-note {
  margin-top: 1.5rem;
  padding: 1.25rem 1.4rem;
  background: var(--surface);
  border-left: 3px solid var(--copper);
  border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--ink-soft);
}

/* Reviews */
.review-grid {
  display: grid;
  gap: 1.25rem;
}

.review-item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1.4rem 1.5rem;
}

.review-item.featured {
  border-color: var(--accent);
  background: linear-gradient(135deg, var(--surface), var(--highlight));
}

.review-item h3 {
  margin: 0 0 0.4rem;
  font-size: 1.1rem;
}

.review-meta {
  color: var(--muted);
  font-size: 0.88rem;
  margin-bottom: 0.85rem;
}

/* Blog */
.blog-list {
  display: grid;
  gap: 1.5rem;
}

.blog-card {
  display: grid;
  grid-template-columns: 14rem 1fr;
  gap: 1.35rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.3s var(--ease);
}

.blog-card:hover {
  box-shadow: var(--shadow);
  color: inherit;
}

.blog-card img {
  width: 100%;
  height: 100%;
  min-height: 10rem;
  object-fit: cover;
}

.blog-card-body {
  padding: 1.2rem 1.2rem 1.2rem 0;
}

.blog-card h2 {
  margin: 0 0 0.45rem;
  font-size: 1.25rem;
}

.blog-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.article {
  max-width: 44rem;
  margin: 0 auto;
}

.article-hero img {
  width: 100%;
  border-radius: var(--radius-lg);
  aspect-ratio: 21/9;
  object-fit: cover;
  margin: 1.5rem 0 2rem;
}

.article h2 {
  margin-top: 2rem;
  font-size: 1.45rem;
}

/* Forms */
.form-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow);
}

.form-grid {
  display: grid;
  gap: 1rem;
}

.form-row {
  display: grid;
  gap: 0.4rem;
}

.form-row.two {
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

label {
  font-weight: 650;
  font-size: 0.9rem;
}

input,
select,
textarea {
  width: 100%;
  padding: 0.8rem 0.95rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  font: inherit;
  color: var(--ink);
}

input:focus,
select:focus,
textarea:focus {
  outline: 2px solid rgba(47, 107, 85, 0.35);
  border-color: var(--accent);
}

.field-error {
  color: var(--error);
  font-size: 0.85rem;
  min-height: 1.1em;
}

.form-status {
  margin-top: 1rem;
  padding: 0.85rem 1rem;
  border-radius: var(--radius);
  display: none;
}

.form-status.show {
  display: block;
}

.form-status.success {
  background: rgba(26, 92, 58, 0.1);
  color: var(--success);
  border: 1px solid rgba(26, 92, 58, 0.25);
}

.form-status.error {
  background: rgba(155, 44, 44, 0.08);
  color: var(--error);
  border: 1px solid rgba(155, 44, 44, 0.25);
}

.contact-layout {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 2rem;
  align-items: start;
}

.contact-details {
  padding: 0.5rem 0;
}

.contact-details dt {
  font-weight: 700;
  margin-top: 1rem;
  font-family: var(--font-display);
}

.contact-details dd {
  margin: 0.25rem 0 0;
  color: var(--ink-soft);
}

/* Legal */
.legal {
  max-width: 46rem;
}

.legal h2 {
  font-size: 1.3rem;
  margin-top: 2rem;
}

.legal table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
  margin: 1rem 0 1.5rem;
}

.legal th,
.legal td {
  border: 1px solid var(--line);
  padding: 0.65rem 0.75rem;
  text-align: left;
  vertical-align: top;
  background: var(--surface);
}

.legal th {
  background: var(--highlight);
}

/* 404 */
.error-page {
  min-height: calc(100vh - var(--header-h) - 12rem);
  display: grid;
  place-items: center;
  text-align: center;
  padding: 4rem 1rem;
}

.error-page h1 {
  font-size: clamp(3rem, 10vw, 6rem);
  margin: 0;
  color: var(--accent);
}

/* Cookie banner */
.cookie-banner {
  position: fixed;
  bottom: 1rem;
  left: 1rem;
  right: 1rem;
  z-index: 60;
  max-width: 34rem;
  margin-inline: auto;
  background: var(--ink);
  color: #edf2ef;
  padding: 1.15rem 1.25rem;
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.28);
  display: none;
  animation: rise 0.45s var(--ease);
}

.cookie-banner.show {
  display: block;
}

.cookie-banner p {
  margin: 0 0 1rem;
  font-size: 0.92rem;
  color: #c9d4cd;
}

.cookie-banner a {
  color: var(--copper-soft);
}

.cookie-actions {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.cookie-actions .btn {
  padding: 0.65rem 1.1rem;
  font-size: 0.88rem;
}

.cookie-actions .btn-accept {
  background: var(--accent);
  color: #fff;
  border: none;
}

.cookie-actions .btn-reject {
  background: transparent;
  border: 1px solid #6a7870;
  color: #edf2ef;
}

.inline-error {
  background: rgba(155, 44, 44, 0.1);
  color: var(--error);
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  margin: 0.5rem 0;
  font-size: 0.9rem;
}

/* Lab page timeline */
.lab-steps {
  display: grid;
  gap: 0;
  border-left: 2px solid var(--line);
  margin-left: 0.6rem;
  padding-left: 1.5rem;
}

.lab-step {
  position: relative;
  padding: 0 0 1.75rem;
}

.lab-step::before {
  content: "";
  position: absolute;
  left: -1.85rem;
  top: 0.35rem;
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--bg);
}

.lab-step h3 {
  margin: 0 0 0.4rem;
  font-size: 1.15rem;
}

/* Footer */
.site-footer {
  margin-top: 4rem;
  background: var(--ink);
  color: #c7d1cb;
  padding: 3.5rem 0 2rem;
}

.footer-inner {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}

.footer-name {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  color: #f4f7f5;
  margin: 0 0 0.5rem;
}

.footer-tag {
  max-width: 28rem;
  color: #9aaba2;
  margin-bottom: 2rem;
}

.footer-cols {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 1.5rem;
}

.footer-heading {
  font-family: var(--font-display);
  color: #f4f7f5;
  font-weight: 650;
  margin: 0 0 0.75rem;
}

.footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-col li {
  margin-bottom: 0.45rem;
}

.footer-col a {
  color: #a8b8b0;
  text-decoration: none;
}

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

.footer-address {
  margin: 0 0 0.75rem;
  line-height: 1.5;
}

.footer-copy {
  margin-top: 2.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid #2c3832;
  font-size: 0.85rem;
  color: #7d8c84;
}

/* Animations */
@keyframes rise {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slow-zoom {
  from { transform: scale(1.02); }
  to { transform: scale(1.08); }
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

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

/* Responsive */
@media (max-width: 960px) {
  .home-hero,
  .media-split,
  .contact-layout,
  .footer-cols {
    grid-template-columns: 1fr;
  }

  .offer-strip {
    grid-template-columns: 1fr;
  }

  .home-hero {
    min-height: auto;
  }

  .blog-card {
    grid-template-columns: 1fr;
  }

  .blog-card-body {
    padding: 0 1.2rem 1.2rem;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(255, 252, 247, 0.98);
    border-bottom: 1px solid var(--line);
    padding: 0.5rem 1rem 1rem;
    display: none;
  }

  .site-nav.open {
    display: block;
  }

  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 0.25rem;
  }

  .nav-cta {
    justify-content: center;
    margin-top: 0.35rem;
  }

  .form-row.two {
    grid-template-columns: 1fr;
  }
}

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