/* ==========================================================================
   ELIOS — Contact page (contact.html)
   Loaded after styles.css; the quote form is the shared .cta block.
   No Figma frame: composed from the same parts as Home / Services / About
   (grey cards with corner marks, mono caps labels, hairlines, small buttons).
   LAYOUT ONLY: every font size comes from the :root type tokens in styles.css
   (fixed px, identical at every desktop width); only spacing and layout scale.
   ========================================================================== */

/* ==========================================================================
   Intro + contact details
   White start: the header keeps its dark tone (the same as the Home hero), no photo behind it.
   The motion layer finds no .hero / .svc-hero / .about-hero here and simply skips the photo-hero intro.
   ========================================================================== */
.contact-hero { padding-top: clamp(144px, 10vw, 173px); }   /* the Home headline's top line; never closer than 43px to the nav pill */
/* the head is the shared .section-head: bottom-aligned row on desktop, a left-aligned column from 1200px down (no override here) */
/* the headline column keeps its full two lines; the paragraph column gives way first (never under 400px) */
.contact-hero .section-head__main { flex: none; min-width: 0; max-width: min(calc(60 * var(--rt)), calc(100% - 400px - 2.5rem)); }
.contact-hero .section-head__aside { flex: 0 1 calc(33.5 * var(--rt)); min-width: 400px; width: auto; }

/* four equal cards; if the customer hides the address or the hours the rest share the row */
.contact-cards { margin-top: 5rem; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); grid-template-rows: repeat(3, auto); column-gap: 1.25rem; row-gap: 0; }
/* the cards share three rows (label / value / note): every value and every note starts on one line, whatever wraps */
.contact-card {
  --dot-color: rgba(0, 0, 0, .25);
  padding: 2.25rem 1.5rem; background: var(--surface-light);
  display: grid; grid-row: span 3; grid-template-rows: subgrid; row-gap: 0; align-content: start;
}
.contact-card__label { grid-row: 1; }
.contact-card__label, .contact-card__note, .contact-follow__label { opacity: .62; }   /* >= 4.5:1 on the grey card */
.contact-card__body { display: contents; }
.contact-card__value { margin-top: 2rem; align-self: start; }
.contact-card__note { margin-top: 0.75rem; align-self: start; }
.contact-card__value { grid-row: 2; min-width: 0; width: fit-content; max-width: 100%; font-size: var(--fs-lg); line-height: 1.2; letter-spacing: -.02em; word-spacing: .1em; overflow-wrap: anywhere; text-wrap: balance; }   /* the display face closes up phone numbers: a touch of word space */
.contact-card__note { grid-row: 3; max-width: 24ch; }
a.contact-card__value, .contact-follow__link { position: relative; }
a.contact-card__value::after, .contact-follow__link::after { content: ""; position: absolute; left: 0; right: 100%; bottom: -0.1875rem; height: 1px; background: currentColor; transition: right .3s ease; }
@media (hover: hover) { a.contact-card__value:hover::after, .contact-follow__link:hover::after { right: 0; } }   /* hover only where there is a pointer: a tap must not leave the line drawn */

/* social profiles: one quiet line under the cards */
.contact-follow { margin-top: 1.25rem; padding-top: 2rem; border-top: 1px solid var(--line-light); display: flex; justify-content: space-between; align-items: center; gap: 2rem; }
.contact-follow__label { font-size: var(--fs-mono); line-height: 1.5; text-transform: uppercase; }   /* the .text-mono look, without its scroll reveal: the row shows as one line, label and links together */
.contact-follow__links { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 0.75rem 2.5rem; font-family: var(--font-mono); font-size: var(--fs-mono); line-height: 1.5; letter-spacing: -.02em; text-transform: uppercase; }

/* cards rise in once the preloader has left (CSS only; without the motion layer they are simply there) */
@keyframes contact-rise { from { opacity: 0; transform: translateY(2.5rem); } }
html.gsap:not(.is-loading) .contact-card { animation: contact-rise 1.1s var(--ease-out, cubic-bezier(.16, 1, .3, 1)) calc(.45s + var(--i, 0) * .09s) both; }

/* ==========================================================================
   FAQ (native <details>: keyboard and screen readers for free, one open at a time where the browser supports name=)
   ========================================================================== */
/* under the white intro the shared "same tone, one gap" rule already gives this section its top rhythm (the intro's bottom padding) */
.contact-faq__inner { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 8fr); gap: 2.5rem 5rem; align-items: start; }
/* heading, paragraph and button in one block at the top, held under the header while the list scrolls: opening or closing a row never moves it */
.contact-faq__copy { position: sticky; top: 7.5rem; display: flex; flex-direction: column; gap: 3rem; }
.contact-faq__title { display: flex; flex-direction: column; gap: 1rem; }
.contact-faq__ask { display: flex; flex-direction: column; align-items: flex-start; gap: 3rem; }
.contact-faq__ask p { max-width: calc(30 * var(--rt)); }

.faq { align-self: start; border-top: 1px solid var(--line-light); }
.faq__item { border-bottom: 1px solid var(--line-light); }
.faq__item summary {
  display: flex; justify-content: space-between; align-items: center; gap: 2rem;
  margin: 0 -0.75rem; padding: 1.75rem 0.75rem; cursor: pointer; list-style: none;   /* the side margin keeps the text on the gutter line and gives the focus ring room */
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary:focus-visible { outline-offset: -2px; box-shadow: none; }   /* the ring stays inside the row: it never crosses the answer's first line or the text */
.faq__q { font-size: var(--fs-lg); line-height: 1.3; letter-spacing: -.02em; text-wrap: balance; }
/* plus that turns into a minus: a 36px square like every icon button */
.faq__icon { position: relative; flex: none; width: 36px; height: 36px; background: var(--chip-light); color: var(--ink); transition: background-color .25s ease, color .25s ease; }
.faq__icon::before, .faq__icon::after { content: ""; position: absolute; left: 50%; top: 50%; width: 12px; height: 1.5px; margin: -0.75px 0 0 -6px; background: currentColor; transition: transform .35s var(--ease-io, cubic-bezier(.7, 0, .2, 1)); }
.faq__icon::after { transform: rotate(90deg); }
.faq__item[open] .faq__icon { background: var(--ink); color: var(--white); }
.faq__item[open] .faq__icon::after { transform: none; }
@media (hover: hover) { .faq__item summary:hover .faq__icon { background: var(--yellow); color: var(--ink); } }
.faq__a {
  max-width: 560px; padding-bottom: 2rem;   /* fixed px measure (the type is fixed px): every answer wraps the same at every width */
  font-family: var(--font-mono); font-size: var(--fs-mono); line-height: 1.5; text-transform: uppercase; text-wrap: pretty;
}
/* open and close without the list jumping (Chrome 131+; elsewhere it simply opens) */
@supports (interpolate-size: allow-keywords) {
  .faq { interpolate-size: allow-keywords; }
  .faq__item::details-content { block-size: 0; overflow: clip; transition: block-size .45s var(--ease-io, cubic-bezier(.7, 0, .2, 1)), content-visibility .45s allow-discrete; }
  .faq__item[open]::details-content { block-size: auto; }
}

/* anchors: #quote has its own 120px padding, so on desktop it lands with the section top at the window top; #faq has no top padding (it follows the white intro), so the global scroll-padding puts its eyebrow at 120px. At <=1024 both eyebrows land 120px down */
#quote { scroll-margin-top: -7.5rem; }
@media (max-width: 1024px) { #quote { scroll-margin-top: calc(-1 * var(--section-y)); } }   /* the quote block's top padding is --section-y here: the eyebrow lands 120px down, like #faq, clear of the header when it returns on an upward jump */
/* contact.js measures the rows on an invisible copy: no opening animation there */
.faq--measure .faq__item::details-content { transition: none !important; }

/* quote form (shared block): its height is fixed, so no resize grip */
.cta__form textarea { resize: none; }

/* ==========================================================================
   Responsive
   Tap rule (<=1200 or a coarse pointer, so iPad landscape counts): the details, the social links and the
   FAQ rows are at least 44px high. The links grow with padding and a matching negative margin, so the
   layout does not move and the underline stays under the text.
   ========================================================================== */
@media (max-width: 1200px) {
  .contact-hero .section-head__main { max-width: none; }
  .contact-hero .section-head__aside { flex: none; min-width: 0; }
  /* FAQ stacks: title, the list, then "can't find your answer" (the copy block dissolves into the grid) */
  .contact-faq__copy { display: contents; }
  .contact-faq__inner { grid-template-columns: minmax(0, 1fr); gap: 48px; }
  .contact-faq__title { order: 1; max-width: 640px; }
  .faq { order: 2; }
  .contact-faq__ask { order: 3; max-width: 640px; gap: 32px; }
}
/* four details in one row down to 1140px (the email needs about 200px inside a card); below that two columns */
@media (max-width: 1139px) {
  .contact-cards { grid-auto-flow: row; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: none; row-gap: 1.25rem; }
  .contact-card { display: flex; flex-direction: column; grid-row: auto; }
  .contact-card__body { display: flex; flex-direction: column; }
  .contact-card__value, .contact-card__note { grid-row: auto; }
}
@media (max-width: 1200px), (pointer: coarse) {
  a.contact-card__value { --tp: calc((44px - 1.2em) / 2); padding-block: var(--tp); margin-block: calc(2rem - var(--tp)) calc(-1 * var(--tp)); }   /* 1.2em = the line height */
  a.contact-card__value::after { bottom: calc(var(--tp) - 0.1875rem); }
  .contact-follow__link { display: block; padding-block: 13px; margin-block: -13px; }
  .contact-follow__link::after { bottom: calc(13px - 0.1875rem); }
}

@media (max-width: 1024px) {
  .contact-hero { padding-top: 150px; }   /* eyebrow 34px under the header row, like the legal title */
  .contact-cards { margin-top: 56px; }
}

@media (max-width: 760px) {
  .contact-hero__head { gap: 32px; }
  .contact-cards { grid-template-columns: 1fr; }
  .contact-card { padding: 28px 20px; }
  .contact-card__value { margin-top: 20px; }
  a.contact-card__value { margin-block: calc(20px - var(--tp)) calc(-1 * var(--tp)); }
  .contact-follow { flex-direction: column; align-items: flex-start; gap: 8px; }
  .contact-follow__links { justify-content: flex-start; gap: 0 24px; }
  .faq__item summary { padding: 22px 12px; gap: 16px; }   /* the -12px side margin keeps text and icon on the page gutter */
  .faq__a { padding-bottom: 24px; }
}
