/* JND Consulting.
   Layout follows the clean, image-led structure of modern geothermal institute sites,
   in JND's own palette: navy from the logo, steel blue from the plume, and amber
   only where the well drawing shows heat. */

@font-face {
  font-family: "Archivo";
  src: url("../fonts/archivo-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Archivo";
  src: url("../fonts/archivo-latin-ext.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --white: #ffffff;
  --sinter: #f0f2ef;      /* light sections: cool silica white */
  --sheet: #f8f9f7;       /* the drawing sheet */
  --ink: #17304f;         /* headings, the navy panels */
  --rhyolite: #262e33;    /* body text, drawing linework */
  --slate: #4e5a63;       /* secondary text */
  --navy: #214878;        /* logo navy: buttons */
  --navy-dark: #1a3a61;
  --blue: #2b67ae;        /* labels and accents on light */
  --deep-navy: #17304f;
  --plume: #9ab0c8;       /* logo plume; accents on dark */
  --cement: #dde4ec;
  --orpiment: #d9861a;    /* heat, in the drawing only */
  --heat-tint: #f5e4cc;
  --rule: #d6dce0;
  --steam: #a8b3b4;
  --error-on-dark: #ffb4a9;

  --font: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --gutter: clamp(16px, 4vw, 40px);
  --section: clamp(64px, 8vw, 112px);
  --leaf: 40px 0;         /* signature corner: two rounded, two square */
  --leaf-sm: 24px 0;
  --shadow: 0 18px 70px -12px rgba(23, 48, 79, 0.45);
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--white);
  color: var(--rhyolite);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  font-stretch: 100%;
  text-rendering: optimizeLegibility;
}

img, svg { max-width: 100%; }
p { margin: 0; }

a { color: var(--navy); text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }

h1, h2, h3 { margin: 0; color: var(--ink); }
h1 {
  font-size: clamp(2.5rem, 1.6rem + 2.8vw, 3.75rem);
  font-stretch: 106%;
  font-weight: 760;
  line-height: 1.06;
  letter-spacing: -0.02em;
}
h2 {
  font-size: clamp(1.875rem, 1.4rem + 1.4vw, 2.5rem);
  font-stretch: 104%;
  font-weight: 730;
  line-height: 1.12;
  letter-spacing: -0.015em;
}
h3 { font-size: 1.25rem; font-weight: 680; line-height: 1.3; }

.wrap { max-width: 1200px; margin-inline: auto; padding-inline: var(--gutter); }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: var(--gutter); top: -100px; z-index: 10;
  background: var(--navy); color: #fff; padding: 10px 16px; font-weight: 600;
}
.skip-link:focus { top: 12px; }

/* ---------- Buttons ---------- */

.button {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 12px 28px;
  border: 2px solid var(--navy); border-radius: 999px;
  background: var(--navy); color: #fff;
  font: inherit; font-size: 1rem; font-weight: 680; line-height: 1.2;
  text-decoration: none; cursor: pointer;
  transition: background-color 0.15s, color 0.15s, border-color 0.15s;
}
.button:hover { background: var(--navy-dark); border-color: var(--navy-dark); }
.button--outline { background: transparent; color: var(--navy); }
.button--outline:hover { background: var(--navy); color: #fff; }
.button--light { background: #fff; border-color: #fff; color: var(--ink); }
.button--light:hover { background: var(--sinter); border-color: var(--sinter); }
@media (prefers-reduced-motion: reduce) { .button { transition: none; } }

/* ---------- Header ---------- */

.site-header { background: var(--white); border-bottom: 1px solid var(--rule); position: relative; z-index: 2; }
.header-inner {
  display: flex; flex-wrap: wrap; align-items: center;
  gap: 8px 36px; padding-block: 14px;
}
.brand { display: block; line-height: 0; }
.brand img { height: 50px; width: auto; }
.site-nav { margin-left: auto; }
.site-nav ul { display: flex; flex-wrap: wrap; gap: 4px 30px; margin: 0; padding: 0; list-style: none; }
.site-nav a {
  display: inline-block; padding-block: 10px;
  color: var(--ink); font-size: 1rem; font-weight: 620; text-decoration: none;
}
.site-nav a:hover { color: var(--blue); text-decoration: underline; text-decoration-thickness: 2px; }
.header-phone {
  font-weight: 680; text-decoration: none; white-space: nowrap;
  font-variant-numeric: tabular-nums; padding: 8px 18px;
  border: 2px solid var(--rule); border-radius: 999px;
}
.header-phone:hover { border-color: var(--navy); }

/* Below 1000px the hero's call button takes over from the header number. */
@media (max-width: 1000px) { .header-phone { display: none; } }
@media (max-width: 760px) {
  .header-inner { gap: 4px 20px; padding-block: 12px 4px; }
  .brand img { height: 42px; }
  .site-nav { order: 3; flex-basis: 100%; margin-left: 0; }
}
@media (max-width: 480px) { .brand img { height: 40px; } }

/* ---------- Hero ---------- */

.hero { position: relative; background: var(--sinter); overflow: hidden; }
/* Navy panel with diagonal hatching (the drawing's ground hatch, enlarged). */
.hero::before {
  content: ""; position: absolute; top: 0; bottom: 0; right: 0; left: calc(50% + 60px);
  background:
    repeating-linear-gradient(-45deg, rgba(154, 176, 200, 0.09) 0 2px, transparent 2px 26px),
    var(--deep-navy);
}
.hero-grid {
  position: relative;
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 48px 24px; align-items: center;
  padding-block: clamp(48px, 6vw, 88px);
}
.hero-copy { grid-column: 1 / span 5; }
.eyebrow { color: var(--blue); font-weight: 650; margin-bottom: 16px; }
.hero-copy h1 { margin-bottom: 24px; }
.lead { font-size: 1.25rem; line-height: 1.55; color: var(--rhyolite); }
.hero-copy .lead + p { margin-top: 16px; color: var(--slate); }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 16px; margin-top: 36px; }

/* Hero photos: the steam plume in the leaf card, the sunset overlapping its lower-right corner. */
.hero-media { grid-column: 6 / span 7; position: relative; padding: 0 72px 88px 0; }
.hero-photo { display: block; overflow: hidden; }
.hero-photo img { display: block; width: 100%; height: 100%; object-fit: cover; }
.hero-photo--main { aspect-ratio: 1; border-radius: var(--leaf); box-shadow: var(--shadow); }
.hero-photo--inset {
  position: absolute; right: -80px; bottom: 0; width: 72%; aspect-ratio: 16 / 10;
  border: 6px solid #fff; border-radius: var(--leaf-sm); box-shadow: var(--shadow);
}

@media (max-width: 1100px) {
  /* Panel sits behind the lower part of the photos; its height follows their width. */
  .hero::before {
    left: 0; top: auto;
    height: calc((min(720px, 100vw - 2 * var(--gutter)) - 64px) * 0.7 + 64px + clamp(48px, 6vw, 88px));
  }
  .hero-copy, .hero-media { grid-column: 1 / -1; }
  .hero-copy { max-width: 40rem; }
  .hero-media { max-width: 720px; width: 100%; justify-self: center; padding: 0 56px 64px 0; }
  .hero-photo--inset { width: 60%; right: -20px; }
}
@media (max-width: 640px) {
  .hero::before { height: calc((100vw - 2 * var(--gutter) - 16px) * 0.7 + 72px + 48px); }
  .hero-media { padding: 0 16px 72px 0; }
  .hero-photo--inset { width: 50%; right: 0; border-width: 4px; }
  .lead { font-size: 1.1875rem; }
  .actions .button { flex: 1 1 100%; }
}

/* ---------- Well section ---------- */

.well-section { position: relative; overflow: hidden; }
/* Mirrors the hero: hatched navy panel on the left, behind the drawing. */
.well-section::before {
  content: ""; position: absolute; top: 0; bottom: 0; left: 0; right: calc(50% + 60px);
  background:
    repeating-linear-gradient(45deg, rgba(154, 176, 200, 0.09) 0 2px, transparent 2px 26px),
    var(--deep-navy);
}
.well-grid {
  position: relative;
  display: grid; grid-template-columns: minmax(0, 8fr) minmax(0, 4fr);
  grid-template-areas: "figure intro" "figure detail";
  gap: 0 48px;
}
.well-figure {
  grid-area: figure; align-self: center; margin: 0; padding: 12px;
  background: var(--sheet); border-radius: 0 40px; box-shadow: var(--shadow);
}
.well-figure .well { display: block; width: 100%; height: auto; }
.well--mobile { display: none !important; }

.well-panel { display: none; }
.well-intro { grid-area: intro; align-self: end; }
.well-detail { grid-area: detail; align-self: start; }
.well-intro h2 { margin-bottom: 20px; }
.well-intro .lead { font-size: 1.125rem; }
.well-steps { counter-reset: step; display: grid; gap: 22px; margin: 32px 0 0; padding: 0; list-style: none; }
.well-steps li { counter-increment: step; position: relative; padding-left: 52px; }
/* Numbered because the steps follow the fluid's path, reservoir to surface. */
.well-steps li::before {
  content: counter(step); position: absolute; left: 0; top: -2px;
  display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%;
  background: var(--navy); color: #fff; font-size: 0.9375rem; font-weight: 700;
}
.well-steps li:not(:last-child)::after {
  content: ""; position: absolute; left: 16px; top: 38px; bottom: -18px; width: 2px; background: var(--rule);
}
.well-steps h3 { font-size: 1.125rem; margin-bottom: 4px; }
.well-steps p { color: var(--slate); font-size: 1rem; }
.well-link { margin-top: 28px; font-size: 1rem; color: var(--slate); }
.well-link a { font-weight: 650; white-space: nowrap; }

@media (max-width: 1100px) {
  /* The side panel becomes a full-width band behind the drawing only. */
  .well-section::before { display: none; }
  .well-panel {
    display: block; grid-area: figure; margin: 12% calc(-1 * var(--gutter));
    background:
      repeating-linear-gradient(45deg, rgba(154, 176, 200, 0.09) 0 2px, transparent 2px 26px),
      var(--deep-navy);
  }
  /* Heading first, then the drawing, then the steps. */
  .well-grid { grid-template-columns: minmax(0, 1fr); grid-template-areas: "intro" "figure" "detail"; gap: 40px; }
  .well-figure { max-width: 720px; width: 100%; justify-self: center; }
  .well-intro, .well-detail { max-width: 40rem; }
}
@media (max-width: 640px) {
  .well--desktop { display: none !important; }
  .well--mobile { display: block !important; }
  .well-figure { padding: 8px; border-radius: 0 24px; }
}

/* ---------- Well drawing ---------- */

.w-sheet { fill: var(--sheet); }
.w-frame { fill: none; stroke: var(--steam); stroke-width: 1; }
.w-reservoir { fill: var(--heat-tint); }
.w-reservoir-edge { stroke: var(--orpiment); stroke-width: 1; stroke-dasharray: 6 4; }
.w-hatch { fill: none; stroke: var(--steam); stroke-width: 0.8; }
.w-ground { fill: none; stroke: var(--rhyolite); stroke-width: 1.5; }
.w-cement { fill: none; }
.w-cement-bg { fill: var(--cement); }
.w-cement-dot { fill: var(--slate); }
.w-openhole { fill: none; stroke: var(--slate); stroke-dasharray: 2 3; }
.w-casing { fill: none; stroke: var(--rhyolite); }
.w-casing--perforated { stroke-dasharray: 5 3; }
.w-hollow { fill: none; stroke: var(--sheet); }
.w-shoe { fill: var(--rhyolite); }
.w-tick, .w-td-line { fill: none; stroke: var(--rhyolite); stroke-width: 1.25; }
.w-td { fill: none; stroke: var(--rhyolite); stroke-width: 2; }
.w-wellhead rect, .w-wellhead path, .w-wellhead circle, .w-wellhead ellipse {
  fill: var(--sheet); stroke: var(--rhyolite); stroke-width: 1.25; stroke-linejoin: round;
}
.heat-cool { stop-color: var(--plume); }
.heat-hot { stop-color: var(--orpiment); }
.w-flow { fill: none; stroke-dasharray: 10 8; stroke-linecap: round; }
.w-inflow { fill: none; stroke: var(--navy); stroke-width: 2; stroke-dasharray: 7 5; stroke-linecap: round; }
.w-arrowhead { fill: var(--navy); }
.w-leader { fill: none; stroke: var(--slate); stroke-width: 0.75; }
.w-text {
  font-family: var(--font); font-stretch: 75%; font-weight: 520;
  fill: var(--rhyolite); font-variant-numeric: tabular-nums;
}
.w-text--strong { font-weight: 660; }
.w-titleblock rect, .w-titleblock path { fill: none; stroke: var(--rhyolite); stroke-width: 1; }

/* Fluid flows in from the reservoir and up the well. Static for reduced motion. */
@media (prefers-reduced-motion: no-preference) {
  .w-flow { animation: w-flow-up 1.1s linear infinite; }
  .w-inflow { animation: w-flow-in 0.9s linear infinite; }
  .w-inflow--2 { animation-delay: -0.22s; }
  .w-inflow--3 { animation-delay: -0.45s; }
  .w-inflow--4 { animation-delay: -0.67s; }
}
@keyframes w-flow-up { from { stroke-dashoffset: 18; } to { stroke-dashoffset: 0; } }
@keyframes w-flow-in { from { stroke-dashoffset: 12; } to { stroke-dashoffset: 0; } }

/* ---------- Sections ---------- */

.section { padding-block: var(--section); }
.section--alt { background: var(--sinter); }
.section-title { text-align: center; }
.section-title::after {
  content: ""; display: block; width: 56px; height: 3px; margin: 18px auto 0;
  background: var(--blue); border-radius: 2px;
}

/* Service cards */
.cards {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px;
  margin: 56px 0 0; padding: 0; list-style: none;
}
.card {
  background: var(--sinter); border-radius: var(--leaf-sm);
  padding: 28px 28px 32px;
}
.card .icon {
  display: block; width: 48px; height: 48px; margin-bottom: 20px;
  fill: none; stroke: var(--navy); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round;
}
.card-meta { color: var(--blue); font-size: 0.9375rem; font-weight: 650; margin-bottom: 6px; }
.card h3 { margin-bottom: 10px; }
.card h3 + p { color: var(--slate); font-size: 1rem; }
.card--wide {
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px 28px; align-items: center;
  margin-top: 24px; background: var(--navy); color: #fff;
}
.card--wide .icon { margin: 0; stroke: var(--plume); }
.card--wide .card-meta { color: #c9d6e4; }
.card--wide h3 { color: #fff; }
.card--wide h3 + p { color: #dfe7f0; }

@media (max-width: 1000px) { .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) {
  .cards { grid-template-columns: minmax(0, 1fr); gap: 16px; margin-top: 40px; }
  .card { padding: 24px; }
  .card--wide { grid-template-columns: minmax(0, 1fr); }
}

/* Onsite band: navy fading into a site photo on the right */
.band {
  color: #fff;
  background:
    linear-gradient(90deg, var(--deep-navy) 0%, var(--deep-navy) 42%, rgba(23, 48, 79, 0.82) 58%, rgba(23, 48, 79, 0.2) 100%),
    url("../proyecto8.jpg") right center / auto 100% no-repeat,
    var(--deep-navy);
}
.band-inner { display: flex; align-items: center; min-height: 440px; padding-block: 72px; }
.band-copy { max-width: 34rem; }
.band h2 { color: #fff; margin-bottom: 18px; }
.band p { font-size: 1.125rem; color: #dfe7f0; margin-bottom: 32px; }
@media (max-width: 760px) {
  .band {
    background:
      linear-gradient(0deg, rgba(23, 48, 79, 0.95), rgba(23, 48, 79, 0.8)),
      url("../proyecto8.jpg") center / cover no-repeat,
      var(--deep-navy);
  }
  .band-inner { min-height: 0; padding-block: 64px; }
}

/* Projects */
.photo-grid {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px;
  margin: 56px 0 0; padding: 0; list-style: none;
}
.photo-grid img {
  display: block; width: 100%; height: auto; aspect-ratio: 1; object-fit: cover;
  border-radius: var(--leaf-sm); background: var(--cement);
}
.photo-grid .focus-top { object-position: 50% 25%; }
@media (max-width: 760px) { .photo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 40px; } }

/* Recent collaborations: logos normalised into equal tiles */
.logo-grid {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px;
  margin: 56px 0 0; padding: 0; list-style: none;
}
.logo-tile {
  display: flex; flex-direction: column; align-items: center; gap: 18px;
  padding: 32px 20px 24px; text-align: center;
  background: #fff; border: 1px solid var(--rule); border-radius: var(--leaf-sm);
}
.logo-tile img { display: block; width: 100%; max-width: 184px; height: 76px; object-fit: contain; }
/* Heavy wordmarks read larger than emblems at the same size. */
.logo-tile .logo-img--compact { max-width: 140px; }
.logo-name { font-size: 0.9375rem; font-weight: 650; line-height: 1.35; color: var(--ink); }
.logo-place { margin-top: 2px; font-size: 0.875rem; color: var(--slate); }
/* Organisations with no published logo: name in type, sized to sit like a logo. */
.logo-tile--text { justify-content: center; }
.logo-tile--text .logo-name { font-size: 1.125rem; font-stretch: 90%; font-weight: 700; max-width: 16ch; }
@media (max-width: 900px) { .logo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) {
  .logo-grid { gap: 10px; margin-top: 40px; }
  .logo-tile { padding: 24px 12px 18px; gap: 14px; }
  .logo-tile img { height: 56px; }
  .logo-tile .logo-img--compact { max-width: 108px; }
}

/* ---------- Contact ---------- */

.contact { background: var(--deep-navy); color: var(--sinter); padding-block: var(--section) 56px; }
.contact :focus-visible { outline-color: var(--plume); }
.contact a { color: #fff; }
.contact h2 { color: #fff; margin-bottom: 32px; }
.contact-grid {
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 48px 24px; align-items: start;
}
.contact-details { grid-column: 1 / span 5; }
.contact-form { grid-column: 7 / span 6; }

.details { display: grid; gap: 22px; margin: 0; }
.details dt { font-size: 0.9375rem; font-weight: 650; color: var(--plume); }
.details dd { margin: 2px 0 0; font-size: 1.125rem; }
.details .phone { font-size: 1.5rem; font-weight: 680; font-variant-numeric: tabular-nums; text-decoration: none; }
.details .phone:hover { text-decoration: underline; }
.details .note { color: var(--plume); font-size: 1rem; }

.form-row + .form-row { margin-top: 20px; }
.form-row label { display: block; font-weight: 620; margin-bottom: 6px; }
.form-row input, .form-row textarea {
  display: block; width: 100%; font: inherit; font-size: 1.0625rem; color: var(--rhyolite);
  background: #fff; border: 1px solid var(--plume); border-radius: 12px; padding: 12px 16px;
}
.form-row textarea { min-height: 180px; resize: vertical; line-height: 1.5; }
.form-row input[aria-invalid="true"], .form-row textarea[aria-invalid="true"] {
  border-color: var(--error-on-dark); box-shadow: 0 0 0 1px var(--error-on-dark);
}
.field-error { color: var(--error-on-dark); font-size: 1rem; margin-top: 6px; }
.field-hint { color: var(--plume); font-size: 1rem; margin-top: 6px; }
.field-hint button {
  font: inherit; font-weight: 620; color: #fff; background: none; border: 0; padding: 0;
  text-decoration: underline; text-underline-offset: 3px; cursor: pointer;
}
.hp-field { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.cf-turnstile { margin-top: 20px; }
.form-status { margin-top: 20px; font-weight: 620; }
.form-status:empty { margin: 0; }
.form-status[data-kind="error"] { color: var(--error-on-dark); }
.form-status:focus { outline: none; }
.form-actions { margin-top: 24px; }
.contact .button { background: #fff; border-color: #fff; color: var(--ink); }
.contact .button:hover { background: var(--sinter); border-color: var(--sinter); }
.contact .button:disabled { opacity: 0.7; cursor: progress; }
.form-privacy { margin-top: 16px; font-size: 0.9375rem; color: var(--plume); max-width: 52ch; }

@media (max-width: 900px) {
  .contact-details, .contact-form { grid-column: 1 / -1; }
}

/* ---------- Footer ---------- */

.site-footer { background: var(--deep-navy); color: var(--plume); font-size: 0.9375rem; }
.footer-inner {
  display: flex; flex-wrap: wrap; align-items: center; gap: 16px 40px;
  padding-block: 32px 40px; border-top: 1px solid rgba(154, 176, 200, 0.3);
}
.footer-inner img { height: 44px; width: auto; }
.footer-inner .credit { margin-left: auto; }
.site-footer a { color: var(--plume); }
.site-footer a:hover { color: #fff; }

/* ---------- 404 ---------- */

.not-found { padding-block: var(--section); background: var(--sinter); }
.not-found h1 { margin-bottom: 20px; }
.not-found p { max-width: 50ch; }

/* P&A offshore: detail text and scope list under the intro (well-section layout) */
.well-detail p { color: var(--slate); }
.well-detail p + p { margin-top: 14px; }
.well-detail h3 { margin: 24px 0 12px; }
.pa-scope { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.pa-scope li { position: relative; padding-left: 24px; color: var(--slate); }
.pa-scope li::before {
  content: ""; position: absolute; left: 2px; top: 0.62em;
  width: 8px; height: 8px; border-radius: 50%; background: var(--blue);
}
