/* ==========================================================================
   Quarry Connect — quarryconnect.com
   Navy ground · brand blue #2c72ee · Instrument Serif display, Inter text

   Full-bleed photographs carry white type. Every photo sits under a scrim
   (.hero::after, .block::after) that is darkest where the copy sits, bottom
   left. If you swap in a brighter photograph, check the copy still reads
   over its lightest patch before trusting the greys.
   ========================================================================== */

/* ---------- tokens ---------- */

:root {
  /* The logo's own navy is #123D79. The grounds are darker relatives of it. */
  --navy-900: #05132b;
  --navy-800: #0a2246;
  --navy-700: #123d79;

  --blue: #2c72ee;        /* brand blue: accents, rules, marks */
  --blue-deep: #2568e0;   /* button fill: 5.1:1 with white */
  --blue-press: #1f5ed4;  /* button hover deepens to 5.8:1 rather than brightening */
  --blue-light: #8fb6ff;  /* links on navy */

  --text: #ffffff;
  --text-soft: #dce6f5;
  --text-muted: #a9bcd6;
  --text-dim: #7f93b0;    /* on solid navy only, never over a photograph */

  --rule: rgba(255, 255, 255, 0.14);
  --rule-strong: rgba(255, 255, 255, 0.26);
  --panel: rgba(255, 255, 255, 0.04);
  --field: rgba(3, 12, 28, 0.62);

  --serif: "Instrument Serif", Georgia, "Times New Roman", serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
          "Helvetica Neue", Arial, sans-serif;

  /* fluid scale */
  --t-micro: clamp(0.72rem, 0.7rem + 0.1vw, 0.78rem);
  --t-small: clamp(0.86rem, 0.83rem + 0.15vw, 0.94rem);
  --t-body: clamp(1rem, 0.96rem + 0.2vw, 1.09rem);
  --t-lede: clamp(1.15rem, 1rem + 0.6vw, 1.5rem);
  --t-h3: clamp(1.06rem, 1rem + 0.3vw, 1.2rem);
  --t-display-s: clamp(2.2rem, 1.6rem + 2.6vw, 3.8rem);
  --t-display: clamp(2.8rem, 1.6rem + 5vw, 6.4rem);

  --gutter: clamp(1rem, 4vw, 4.5rem);
  --shell: 80rem;
  --head-h: 4.75rem;
}

/* ---------- reset ---------- */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: var(--head-h);
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--navy-900);
  color: var(--text-soft);
  font-family: var(--sans);
  font-size: var(--t-body);
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

body.menu-open { overflow: hidden; }

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

h1, h2, h3 { margin: 0; line-height: 1.1; color: var(--text); }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }

a {
  color: var(--blue-light);
  text-decoration: none;
  border-bottom: 1px solid color-mix(in srgb, var(--blue-light) 38%, transparent);
  transition: border-color 140ms ease, color 140ms ease, background 140ms ease;
}
a:hover { border-bottom-color: var(--blue-light); }

:focus-visible {
  outline: 2px solid var(--blue-light);
  outline-offset: 3px;
  border-radius: 2px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip {
  position: absolute;
  left: var(--gutter);
  top: -4rem;
  z-index: 100;
  background: var(--text);
  color: var(--navy-900);
  padding: 0.6rem 1rem;
  border: 0;
  border-radius: 4px;
}
.skip:focus { top: 0.75rem; }

/* ---------- shell and type ---------- */

.wrap {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* The large serif. Instrument Serif has one weight; size does the work. */
.display {
  font-family: var(--serif);
  font-weight: 400;
  font-size: var(--t-display);
  line-height: 1;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

h2.display { font-size: var(--t-display-s); line-height: 1.04; }

/* a longer title (a question, say): a step down from .display and wider */
.hero h1.display--long { font-size: clamp(2.6rem, 1.6rem + 4vw, 5.4rem); max-width: 20ch; }

.eyebrow,
.block__num {
  font-size: var(--t-micro);
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-soft);
}

.lede {
  font-size: var(--t-lede);
  line-height: 1.45;
  color: var(--text);
  max-width: 40ch;
}

/* ==========================================================================
   Header and menu
   ========================================================================== */

.site-head {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  /* over a photograph: a soft top shade so the menu reads against sky */
  background: linear-gradient(180deg, rgba(5, 19, 43, 0.6), rgba(5, 19, 43, 0));
  transition: background 200ms ease, box-shadow 200ms ease;
}

.site-head.is-scrolled,
.page-plain .site-head,
.site-head.is-open {
  background: rgba(5, 19, 43, 0.94);
  box-shadow: 0 1px 0 var(--rule);
}

@supports (backdrop-filter: blur(1px)) {
  .site-head.is-scrolled,
  .page-plain .site-head { background: rgba(5, 19, 43, 0.82); backdrop-filter: blur(10px); }
}

.site-head__bar {
  height: var(--head-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.site-head__logo { border: 0; flex: 0 0 auto; margin-right: auto; }
.site-head__logo img { width: clamp(160px, 18vw, 210px); }

.site-nav ul {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2vw, 2rem);
}

.site-nav a {
  color: var(--text);
  font-size: var(--t-small);
  font-weight: 500;
  border-bottom: 1px solid transparent;
  padding-block: 0.25rem;
}
.site-nav a:hover { border-bottom-color: var(--text); }
.site-nav a[aria-current="page"] { border-bottom-color: var(--blue); }

/* language flags, right of the menu */
.lang { display: flex; align-items: center; gap: 0.5rem; }

.lang__btn {
  display: grid;
  place-items: center;
  padding: 0.3rem;
  background: none;
  border: 0;
  cursor: pointer;
  opacity: 0.45;
  transition: opacity 140ms ease;
}
.lang__btn img {
  display: block;
  width: 24px;
  height: 18px;
  border-radius: 2px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.25);
}
.lang__btn:hover { opacity: 0.85; }
.lang__btn[aria-pressed="true"] { opacity: 1; }

.menu-toggle {
  display: none;
  align-items: center;
  gap: 0.6rem;
  font: inherit;
  font-size: var(--t-small);
  font-weight: 500;
  color: var(--text);
  background: none;
  border: 0;
  padding: 0.5rem 0;
  cursor: pointer;
}

.menu-toggle__bars,
.menu-toggle__bars::before,
.menu-toggle__bars::after {
  display: block;
  width: 22px;
  height: 2px;
  background: currentColor;
  transition: transform 200ms ease, background 200ms ease;
}
.menu-toggle__bars { position: relative; }
.menu-toggle__bars::before,
.menu-toggle__bars::after { content: ""; position: absolute; left: 0; }
.menu-toggle__bars::before { top: -7px; }
.menu-toggle__bars::after { top: 7px; }

.is-open .menu-toggle__bars { background: transparent; }
.is-open .menu-toggle__bars::before { transform: translateY(7px) rotate(45deg); }
.is-open .menu-toggle__bars::after { transform: translateY(-7px) rotate(-45deg); }

/* Below 62rem the menu folds into the toggle and opens as a full panel. */
@media (max-width: 61.99rem) {
  .menu-toggle { display: inline-flex; order: 3; }   /* flags sit left of it */

  .site-nav {
    display: none;
    position: fixed;
    inset: var(--head-h) 0 0;
    background: var(--navy-900);
    overflow-y: auto;
    padding: 1.5rem var(--gutter) 3rem;
  }
  .is-open .site-nav { display: block; }

  .site-nav ul { flex-direction: column; align-items: stretch; gap: 0; }
  .site-nav li { border-bottom: 1px solid var(--rule); }
  .site-nav a {
    display: block;
    font-family: var(--serif);
    font-size: clamp(1.9rem, 7vw, 2.6rem);
    font-weight: 400;
    padding-block: 0.7rem;
    border: 0;
  }
  .site-nav a[aria-current="page"] { color: var(--blue-light); }
}

/* ==========================================================================
   Full-bleed photographs: hero (top of each page) and block (homepage)
   ========================================================================== */

.hero,
.block {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background: var(--navy-800);
}

.photo {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-credit {
  position: absolute;
  right: var(--gutter);
  bottom: 0.6rem;
  z-index: 1;
  font-size: 0.68rem;
  color: var(--text-muted);
}

/* SCRIM: darkest at the bottom left, where the copy sits. */
.hero::after,
.block::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(0deg, rgba(5, 19, 43, 0.92) 0%, rgba(5, 19, 43, 0.62) 38%, rgba(5, 19, 43, 0.2) 72%, rgba(5, 19, 43, 0.35) 100%),
    linear-gradient(90deg, rgba(5, 19, 43, 0.55) 0%, rgba(5, 19, 43, 0) 65%);
}

.hero--full { min-height: 100svh; }
.hero--page { min-height: min(60svh, 40rem); }
.hero--page .hero__inner { padding-bottom: clamp(2rem, 6vh, 3.5rem); }

.hero__inner,
.block__inner {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: clamp(1rem, 2.4vh, 1.5rem);
  padding-top: calc(var(--head-h) + 3rem);
  padding-bottom: clamp(3rem, 10vh, 6.5rem);
}

.hero h1,
.block h2 { max-width: 15ch; text-shadow: 0 2px 30px rgba(3, 12, 28, 0.45); }

.hero__sub {
  font-size: var(--t-lede);
  line-height: 1.4;
  color: var(--text);
  max-width: 36ch;
}

.hero__text,
.block__text {
  max-width: 54ch;
  color: var(--text-soft);
}

/* Homepage hero: message in the left two thirds, proof and sign-up in the
   right third, level with the top of the message. Below 62rem the side
   drops under the message. */
.hero--full { align-items: center; }   /* homepage: centred, not on the floor */
.hero__inner--split { display: grid; gap: clamp(1.75rem, 4vh, 2.5rem); align-items: start; }
.hero__main { display: flex; flex-direction: column; align-items: flex-start; gap: clamp(1rem, 2.4vh, 1.5rem); }

@media (min-width: 62rem) {
  .hero__inner--split { grid-template-columns: 2fr 1fr; column-gap: clamp(2rem, 5vw, 4.5rem); }
}

/* a dark glass panel so the copy holds up over the bright cliff */
.hero__side {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1rem;
  padding: clamp(1.25rem, 2.5vw, 1.75rem);
  background: rgba(5, 19, 43, 0.62);
  border: 1px solid var(--rule);
  border-radius: 10px;
}
@supports (backdrop-filter: blur(1px)) {
  .hero__side { background: rgba(5, 19, 43, 0.5); backdrop-filter: blur(8px); }
}

.hero__side .hero__text { color: var(--text-soft); }

.hero__proof {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-size: var(--t-small);
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--text);
}
.hero__proof li { padding-left: 1rem; position: relative; }
.hero__proof li::before { content: "\2022"; position: absolute; left: 0; color: var(--blue-light); }

.block { min-height: 100svh; }
.block h2.display { font-size: var(--t-display); line-height: 1; }
.block h2.display--long { max-width: 20ch; }
.block__inner { gap: clamp(0.9rem, 2vh, 1.25rem); }
.block .btn { margin-top: 0.5rem; }

/* scroll cue at the foot of the homepage hero */
.hero__scroll {
  position: absolute;
  left: 50%;
  bottom: 1.5rem;
  translate: -50% 0;
  width: 2.75rem;
  height: 2.75rem;
  display: grid;
  place-items: center;
  border: 0;
}
.hero__scroll span {
  width: 1px;
  height: 2.2rem;
  background: linear-gradient(180deg, transparent, var(--text));
  animation: cue 2.2s ease-in-out infinite;
}
@keyframes cue {
  0%, 100% { transform: translateY(-4px); opacity: 0.4; }
  50% { transform: translateY(4px); opacity: 1; }
}

/* ==========================================================================
   Content sections
   ========================================================================== */

.section { padding-block: clamp(4rem, 10vh, 7rem); }
.hero + .section { padding-top: clamp(2.5rem, 6vh, 4rem); }
.section--top { padding-top: calc(var(--head-h) + clamp(3rem, 8vh, 5rem)); }

.features {
  margin-top: clamp(3rem, 7vh, 4.5rem);
  display: grid;
  gap: 0 clamp(2rem, 5vw, 4.5rem);
  counter-reset: feature;
}

@media (min-width: 48rem) {
  .features { grid-template-columns: 1fr 1fr; }
}

.feature {
  counter-increment: feature;
  border-top: 1px solid var(--rule);
  padding-block: 1.6rem 2rem;
  display: grid;
  grid-template-columns: 2.5rem 1fr;
  align-content: start;
  column-gap: 1rem;
  row-gap: 0.5rem;
}

.feature::before {
  content: counter(feature, decimal-leading-zero);
  grid-row: span 2;
  font-size: var(--t-small);
  font-weight: 600;
  color: var(--blue-light);
  padding-top: 0.15rem;
}

.feature h3 { font-size: var(--t-h3); font-weight: 600; line-height: 1.3; }
.feature p { color: var(--text-muted); }

.prose {
  max-width: 46rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.prose .lede { max-width: none; margin-bottom: 0.5rem; }
.prose p:not(.lede) { color: var(--text-soft); }

/* ---------- closing call to action ---------- */

.cta {
  background: var(--navy-800);
  border-top: 1px solid var(--rule);
  padding-block: clamp(4rem, 12vh, 7.5rem);
  text-align: center;
}

.cta__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}
.cta__inner p { color: var(--text-soft); max-width: 40ch; }

.cta__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.85rem;
  margin-top: 1rem;
}

/* ---------- form page layout: form beside a side card ---------- */

.split {
  display: grid;
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: start;
}

@media (min-width: 58rem) {
  .split { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); }
  .split__side { position: sticky; top: calc(var(--head-h) + 2rem); margin-top: 7.5rem; }
}

.split__main {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.split__main .form { margin-top: 1rem; }

.card {
  background: var(--navy-800);
  border: 1px solid var(--rule);
  border-radius: 8px;
  padding: clamp(1.5rem, 3vw, 2.25rem);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.9rem;
}
.card h2 { font-family: var(--serif); font-weight: 400; font-size: clamp(1.8rem, 1.5rem + 1vw, 2.4rem); }
.card p { color: var(--text-soft); }
.card .btn { margin-top: 0.5rem; }
.card .card__action { align-self: center; }
.card__muted { color: var(--text-muted) !important; }

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
  display: inline-block;
  justify-self: start;
  font-family: inherit;
  font-size: var(--t-small);
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #fff;
  background: var(--blue-deep);
  border: 1px solid var(--blue-deep);
  border-radius: 999px;
  padding: 0.8rem 1.75rem;
  cursor: pointer;
  transition: background 140ms ease, color 140ms ease, border-color 140ms ease, transform 140ms ease;
}

.btn:hover:not(:disabled) { background: var(--blue-press); border-color: var(--blue-press); }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* white button over a photograph */
.btn--light { background: var(--text); color: var(--navy-900); border-color: var(--text); }
.btn--light:hover:not(:disabled) { background: var(--text-soft); border-color: var(--text-soft); }

.btn--ghost { background: transparent; border-color: var(--rule-strong); }
.btn--ghost:hover:not(:disabled) { background: rgba(255, 255, 255, 0.08); border-color: var(--text); }

/* ==========================================================================
   Form
   ========================================================================== */

.form {
  display: grid;
  gap: 1.05rem;
  background: var(--navy-800);
  border: 1px solid var(--rule);
  border-radius: 8px;
  padding: clamp(1.25rem, 3vw, 2rem);
}

@media (min-width: 34rem) {
  .form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.05rem; }
}
@media (max-width: 33.99rem) {
  .form__row { display: grid; gap: 1.05rem; }
}

.field { display: flex; flex-direction: column; gap: 0.42rem; }

.field label {
  font-size: var(--t-micro);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.field .req { color: var(--blue-light); }

.field input,
.field select,
.field textarea {
  font-family: inherit;
  font-size: var(--t-body);
  color: var(--text);
  background: var(--field);
  border: 1px solid var(--rule-strong);
  border-radius: 4px;
  padding: 0.7rem 0.85rem;
  width: 100%;
  transition: border-color 140ms ease;
}

.field select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--text-muted) 50%),
                    linear-gradient(135deg, var(--text-muted) 50%, transparent 50%);
  background-position: calc(100% - 1.15rem) 50%, calc(100% - 0.8rem) 50%;
  background-size: 0.35rem 0.35rem;
  background-repeat: no-repeat;
  padding-right: 2.25rem;
  color-scheme: dark;   /* dark native dropdown list */
}
.field select option { color: var(--text); background: #1f2937; }

.field textarea { resize: vertical; min-height: 7rem; line-height: 1.55; }

.field input:hover,
.field select:hover,
.field textarea:hover { border-color: rgba(255, 255, 255, 0.42); }

.field input:focus-visible,
.field select:focus-visible,
.field textarea:focus-visible {
  border-color: var(--blue-light);
  outline: 1px solid var(--blue-light);
  outline-offset: 0;
}

/* honeypot: reachable to bots, invisible and out of tab order.
   It is named "website", not "company"; company is a real field. */
.trap {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form__note {
  font-size: var(--t-micro);
  color: var(--text-dim);
  line-height: 1.55;
}

/* Success: the form is replaced by this panel so it can't be sent twice. */
.form-sent {
  border: 1px solid var(--blue);
  border-radius: 8px;
  background: var(--navy-800);
  padding: clamp(1.5rem, 4vw, 2.25rem);
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}
.form-sent:focus { outline: none; }
.form-sent:focus-visible { outline: 2px solid var(--blue-light); outline-offset: 3px; }
.form-sent h3 { font-size: var(--t-h3); font-weight: 700; line-height: 1.25; }
.form-sent p { font-size: var(--t-small); color: var(--text-muted); line-height: 1.58; }

.form__status {
  font-size: var(--t-small);
  line-height: 1.55;
  padding: 0.75rem 0.95rem;
  border-radius: 4px;
  border: 1px solid var(--rule-strong);
  background: var(--field);
}
.form__status[hidden] { display: none; }
.form__status[data-state="ok"] { border-color: var(--blue-light); color: var(--text); }
.form__status[data-state="error"] { border-color: #c0705c; color: #f4cec2; }

/* ==========================================================================
   Footer
   ========================================================================== */

.site-foot {
  border-top: 1px solid var(--rule);
  padding-block: clamp(2.5rem, 6vh, 3.5rem);
  font-size: var(--t-small);
  color: var(--text-muted);
}

.site-foot__grid {
  display: grid;
  gap: 2rem clamp(1.5rem, 4vw, 3.5rem);
  align-items: start;
}

@media (min-width: 52rem) {
  .site-foot__grid { grid-template-columns: auto 1fr auto; }
}

.site-foot__mark { border: 0; display: block; opacity: 0.9; }
.site-foot__mark:hover { opacity: 1; }
.site-foot__mark img { width: clamp(46px, 5vw, 56px); }

.site-foot__addr { font-style: normal; display: flex; flex-direction: column; gap: 0.15rem; }
.site-foot__addr strong { color: var(--text-soft); font-weight: 600; }

.site-foot__nav ul { display: grid; grid-template-columns: repeat(2, auto); gap: 0.35rem 2rem; }

/* copyright line: full width, centred under the rest */
.site-foot__end {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.35rem 0.75rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
  text-align: center;
}
.site-foot__legal { display: inline-flex; gap: 0.75rem; }
.site-foot__sep { color: var(--text-dim); }

.site-foot a { color: var(--text-muted); border-bottom-color: transparent; }
.site-foot a:hover { color: var(--blue-light); border-bottom-color: var(--blue-light); }

/* ==========================================================================
   Simple content pages (privacy, terms, 404)
   ========================================================================== */

.doc { padding-block: calc(var(--head-h) + clamp(2rem, 6vh, 4rem)) clamp(3rem, 9vh, 5.5rem); }

.doc__inner {
  max-width: 44rem;
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
}

.doc h1 { font-family: var(--serif); font-weight: 400; font-size: var(--t-display-s); }
.doc h2 { font-size: var(--t-h3); font-weight: 600; margin-top: 1.1rem; }
.doc p { color: var(--text-muted); }
.doc ul { display: flex; flex-direction: column; gap: 0.5rem; color: var(--text-muted); }
.doc li { padding-left: 1.1rem; position: relative; }
.doc li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.72em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--blue);
}
.doc__updated {
  font-size: var(--t-micro);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-dim);
}

/* ==========================================================================
   Motion
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
