/* stylelint-disable no-descending-specificity -- component-ordered; intentional. */

/* ─────────────────────────────────────────────────────────────
   Landing page
   ───────────────────────────────────────────────────────────── */

/* ─── Hero ────────────────────────────────────────────────────── */

.hero {
  padding: 4rem clamp(1.5rem, 6vw, 6rem);
  background: var(--white);
  border-bottom: 1px solid var(--border);
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 4rem;
  align-items: start;
  max-width: var(--maxw);
  margin: 0 auto;
}

.hero-eyebrow {
  display: block;
  margin-bottom: 1rem;
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
}

.hero h1 {
  margin-bottom: 1.5rem;
  font-family: var(--serif);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 300;
  line-height: 1.2;
  color: var(--slate);
}

.hero-intro {
  margin-bottom: 1.2rem;
  font-size: 1rem;
  line-height: 1.8;
  color: var(--mid);
}

/* The closing intro paragraph needs no trailing gap — it ends the column. */
.hero-intro:last-of-type {
  margin-bottom: 0;
}

/* ─── Hero contact card ───────────────────────────────────────── */

.contact-card {
  position: sticky;
  top: 2rem;
  padding: 2rem;
  background: var(--cream);
  border: 1px solid var(--border);
}

.contact-card h2 {
  margin-bottom: 0.3rem;
  font-family: var(--serif);
  font-size: 1.3rem;
  font-weight: 300;
  color: var(--slate);
}

.contact-card > p {
  margin-bottom: 1.5rem;
  font-size: 0.88rem;
  color: var(--light);
}

.contact-items {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1.8rem;
}

.contact-item {
  display: flex;
  flex-direction: column;
}

.contact-label {
  display: block;
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--light);
}

.contact-value {
  font-size: 0.9rem;
  color: var(--slate);
  overflow-wrap: anywhere;
}

.gdpr-note {
  margin-top: 1rem;
  font-size: 0.72rem;
  line-height: 1.5;
  text-align: center;
  color: var(--light);
}

/* ─── Approach grid ───────────────────────────────────────────── */

.approach-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  margin-top: 1.5rem;
  background: var(--border);
  border: 1px solid var(--border);
}

.approach-item {
  padding: 1.5rem;
  background: var(--white);
}

.approach-item h3 {
  margin-bottom: 0.4rem;
  font-size: 0.88rem;
  font-weight: 400;
  color: var(--slate);
}

.approach-item p {
  margin: 0;
  font-size: 0.85rem;
  line-height: 1.7;
  color: var(--light);
}

/* ─── Specialisms ─────────────────────────────────────────────── */

.specialism-groups {
  margin-top: 2rem;
  border: 1px solid var(--border);
}

.specialism-group {
  padding: 2rem 2.5rem;
  border-bottom: 1px solid var(--border);
}

.specialism-group:last-child {
  border-bottom: none;
}

.specialism-group-title {
  margin-bottom: 1rem;
  font-size: 0.68rem;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
}

.specialism-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.s-tag {
  padding: 0.3rem 0.8rem;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  color: var(--mid);
  background: var(--white);
  border: 1px solid var(--border);
}

/* Progressive disclosure for the longer tag groups — a <details> so it works
   with no JavaScript and stays keyboard accessible. */
.specialism-tags:has(+ .specialism-more) {
  margin-bottom: 0.6rem;
}

.specialism-more {
  margin-bottom: 1rem;
}

.specialism-more summary {
  display: inline-block;
  padding: 0.3rem 0.8rem;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  color: var(--accent);
  cursor: pointer;
  background: var(--white);
  border: 1px dashed var(--accent);
  list-style: none;
}

.specialism-more summary::-webkit-details-marker {
  display: none;
}

.specialism-more summary::before {
  content: "+ ";
}

.specialism-more[open] summary {
  margin-bottom: 0.6rem;
}

.specialism-more[open] summary::before {
  content: "− ";
}

.specialism-more summary:hover {
  color: var(--white);
  background: var(--accent);
}

.specialism-more summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.specialism-note {
  font-size: 0.88rem;
  font-style: italic;
  line-height: 1.7;
  color: var(--light);
}

/* ─── Expect list ─────────────────────────────────────────────── */

.expect-list {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  margin-top: 1rem;
  list-style: none;
}

.expect-list li {
  display: flex;
  gap: 0.8rem;
  font-size: 0.92rem;
  line-height: 1.7;
  color: var(--mid);
}

.expect-list li::before {
  content: "";
  flex-shrink: 0;
  width: 5px;
  height: 5px;
  margin-top: 0.62em;
  border-radius: 50%;
  background: var(--accent);
}

/* ─── Credentials grid ────────────────────────────────────────── */

.cred-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  margin-top: 1.5rem;
  background: var(--border);
  border: 1px solid var(--border);
}

.cred-item {
  padding: 1.5rem 2rem;
  background: var(--white);
}

/* These grids draw their rules with a 1px gap over a tinted background, so an
   unfilled trailing cell shows through as a grey block. With an odd number of
   items the last one spans the full row instead. Self-correcting if items are
   added or removed. */
.approach-item:last-child:nth-child(odd),
.cred-item:last-child:nth-child(odd) {
  grid-column: 1 / -1;
}

.cred-item h3 {
  margin-bottom: 0.5rem;
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
}

.cred-item p {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--mid);
}

.ethics-note {
  margin-top: 2rem;
  padding: 1.5rem 2rem;
  font-size: 0.88rem;
  line-height: 1.75;
  color: var(--mid);
  background: var(--white);
  border-left: 3px solid var(--accent);
}

.ethics-note strong {
  font-weight: 400;
  color: var(--slate);
}

/* Quiet in-copy links out to the other pages — keeps the site cross-linked
   without adding another call-to-action block. */
.section-links {
  margin-top: 1.5rem;
  font-size: 0.88rem;
  line-height: 1.75;
  color: var(--mid);
}

.section-links a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.section-links a:hover {
  color: var(--slate);
}

/* ─── Practical grid ──────────────────────────────────────────── */

.practical-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  margin-top: 1.5rem;
  background: var(--border);
  border: 1px solid var(--border);
}

.practical-item {
  padding: 1.5rem;
  background: var(--white);
}

.practical-item h3 {
  margin-bottom: 0.5rem;
  font-size: 0.65rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--light);
}

.practical-item p {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--mid);
}

/* ─── Contact section ─────────────────────────────────────────── */

.contact-section {
  padding: clamp(3rem, 6vw, 5rem) clamp(1.5rem, 6vw, 6rem);
  background: var(--white);
  border-top: 1px solid var(--border);
}

.contact-section-inner {
  max-width: var(--maxw);
  margin: 0 auto;
}

.contact-section h2 {
  margin-bottom: 0.5rem;
  font-family: var(--serif);
  font-size: 1.8rem;
  font-weight: 300;
  color: var(--slate);
}

.contact-section-inner > p {
  margin-bottom: 2.5rem;
  font-size: 0.95rem;
  color: var(--mid);
}

/* Two columns, so the two short fields sit side by side. A single stack of
   four boxes of wildly different heights reads awkwardly, and 560px left a
   lot of dead space in a 1000px section. Everything else spans the full
   width; "how did you find me" stays half-width because it is the least
   important field and should not demand a full row. The honeypot is
   absolutely positioned, so it creates no grid cell. */

.contact-form {
  max-width: 760px;
}

.contact-form form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 1.5rem;
}

.contact-form .form-group,
.contact-form .form-note {
  grid-column: 1 / -1;
}

.contact-form .form-group:has(#name),
.contact-form .form-group:has(#email),
.contact-form .form-group:has(#source) {
  grid-column: span 1;
}

@media (width <= 640px) {
  .contact-form form {
    grid-template-columns: 1fr;
  }

  .contact-form .form-group:has(#name),
  .contact-form .form-group:has(#email),
  .contact-form .form-group:has(#source) {
    grid-column: 1 / -1;
  }
}

.form-note {
  margin: -0.4rem 0 1.5rem;
  font-size: 0.78rem;
  line-height: 1.65;
  color: var(--light);
}

/* ─── Responsive ──────────────────────────────────────────────── */

@media (width <= 780px) {
  .hero-inner {
    grid-template-columns: 1fr;
  }

  .contact-card {
    position: static;
  }
}

@media (width <= 580px) {
  .approach-grid,
  .cred-grid,
  .practical-grid {
    grid-template-columns: 1fr;
  }
}
