/* ==========================================================================
   INSAME — site chrome
   Masthead, mobile drawer, footer, and components shared across every page.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Masthead

   Two states. At the top of a page it is transparent and roomy. Past the
   fold it compacts, gains an ivory ground and a hairline. The transition is
   deliberately slow (.55s) so it reads as the page settling rather than a
   sticky-header snap.
   -------------------------------------------------------------------------- */

.masthead {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  transition:
    background-color .55s var(--e-out),
    box-shadow .55s var(--e-out),
    transform .5s var(--e-out);
}

.masthead__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  height: var(--nav-h);
  transition: height .55s var(--e-out);
}

.masthead.is-stuck {
  background: rgba(245, 242, 235, .82);
  -webkit-backdrop-filter: saturate(150%) blur(14px);
  backdrop-filter: saturate(150%) blur(14px);
  box-shadow: 0 1px 0 var(--rule-soft);
}
.masthead.is-stuck .masthead__inner { height: 62px; }

/* Hide on downward scroll once well past the fold; the page is long and the
   photography deserves the full viewport. Returns immediately on scroll up. */
.masthead.is-hidden { transform: translateY(-100%); }

/* Over the dark InsameVision environment the chrome inverts. */
.masthead.is-dark { color: var(--ivory); }
.masthead.is-dark.is-stuck {
  background: rgba(19, 18, 16, .8);
  box-shadow: 0 1px 0 var(--rule-dark);
}
.masthead.is-dark .brand__mark { filter: brightness(0) invert(1); }
.masthead.is-dark .nav__link::after { background: var(--ivory); }
.masthead.is-dark .burger span { background: var(--ivory); }

.brand { display: flex; align-items: center; flex: 0 0 auto; }
.brand__mark {
  height: 30px;
  width: auto;
  width: auto;
  transition: filter .55s var(--e-out), height .55s var(--e-out);
}
.masthead.is-stuck .brand__mark { height: 26px; }

.nav {
  display: flex;
  gap: clamp(1.5rem, 2.6vw, 2.75rem);
  align-items: center;
}
.nav__link {
  position: relative;
  font-size: var(--t-sm);
  letter-spacing: .04em;
  padding-block: .4rem;
}
.nav__link::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 100%; height: 1px;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: 100% 50%;
  transition: transform .5s var(--e-out);
}
.nav__link:hover::after,
.nav__link:focus-visible::after,
.nav__link[aria-current="page"]::after {
  transform: scaleX(1);
  transform-origin: 0 50%;
}

.masthead__actions { display: flex; align-items: center; gap: 1.4rem; flex: 0 0 auto; }
.masthead__tel { font-size: var(--t-sm); letter-spacing: .02em; color: var(--stone); }
.masthead__tel:hover { color: var(--ink); }
.masthead .btn { padding: .78em 1.45em; }

/* ---- burger ---- */
.burger {
  display: none;
  width: 40px; height: 40px;
  position: relative;
  margin-right: -8px;
}
.burger span {
  position: absolute;
  left: 9px;
  width: 22px; height: 1.5px;
  background: var(--ink);
  transition: transform .45s var(--e-io), opacity .25s linear;
}
.burger span:nth-child(1) { top: 15px; }
.burger span:nth-child(2) { top: 21px; }
.burger span:nth-child(3) { top: 27px; }
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ---- mobile drawer ---- */
.drawer {
  position: fixed;
  inset: 0;
  z-index: 99;
  background: var(--ivory);
  padding: calc(var(--nav-h) + 3rem) var(--gutter) 3rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  clip-path: inset(0 0 100% 0);
  transition: clip-path .7s var(--e-io);
  visibility: hidden;
}
.drawer.is-open { clip-path: inset(0 0 0 0); visibility: visible; }

.drawer__nav { display: flex; flex-direction: column; gap: .35rem; }
.drawer__nav a {
  font-family: var(--serif);
  font-size: clamp(2.2rem, 10vw, 3.4rem);
  line-height: 1.16;
  letter-spacing: -.02em;
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .6s var(--e-out), transform .6s var(--e-out);
}
.drawer.is-open .drawer__nav a { opacity: 1; transform: none; }
.drawer.is-open .drawer__nav a:nth-child(1) { transition-delay: .12s; }
.drawer.is-open .drawer__nav a:nth-child(2) { transition-delay: .18s; }
.drawer.is-open .drawer__nav a:nth-child(3) { transition-delay: .24s; }
.drawer.is-open .drawer__nav a:nth-child(4) { transition-delay: .30s; }
.drawer.is-open .drawer__nav a:nth-child(5) { transition-delay: .36s; }
.drawer.is-open .drawer__nav a:nth-child(6) { transition-delay: .42s; }

.drawer__foot { display: flex; flex-direction: column; gap: 1.1rem; align-items: flex-start; }

body.is-locked { overflow: hidden; }

@media (max-width: 980px) {
  .nav, .masthead__tel { display: none; }
  .burger { display: block; }
  .masthead .btn { display: none; }
}

/* --------------------------------------------------------------------------
   Section heading — eyebrow, rule, statement
   -------------------------------------------------------------------------- */

.sec-head { display: flex; flex-direction: column; gap: 1.1rem; }
.sec-head__top {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding-bottom: 1.1rem;
  border-bottom: 1px solid var(--rule);
}
.sec-head__top .rule-fill { flex: 1; height: 1px; background: var(--rule); }

/* --------------------------------------------------------------------------
   Marquee — used once, for the award/credential strip.
   Duplicated track so the loop is seamless; paused on hover and for
   reduced-motion users.
   -------------------------------------------------------------------------- */

.marquee { overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.marquee__track {
  display: flex;
  width: max-content;
  gap: clamp(2.5rem, 6vw, 6rem);
  animation: marquee 42s linear infinite;
}
.marquee:hover .marquee__track { animation-play-state: paused; }
@keyframes marquee { to { transform: translate3d(-50%, 0, 0); } }
@media (prefers-reduced-motion: reduce) { .marquee__track { animation: none; } }

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

.footer {
  background: var(--near-black);
  color: var(--ivory);
  padding-block: clamp(4rem, 9vh, 7rem) 2.5rem;
}
.footer a { color: var(--stone-dim); transition: color .3s var(--e-out); }
.footer a:hover { color: var(--ivory); }

.footer__statement {
  font-family: var(--serif);
  font-size: clamp(2rem, 5.5vw, 4.25rem);
  line-height: 1.02;
  letter-spacing: -.02em;
  max-width: 18ch;
  margin-bottom: clamp(3rem, 7vh, 5rem);
}

.footer__grid {
  display: grid;
  grid-template-columns: 1.6fr repeat(3, 1fr);
  gap: clamp(2rem, 4vw, 3.5rem);
  padding-top: 2.75rem;
  border-top: 1px solid var(--rule-dark);
}
.footer__col h2 {
  font-family: var(--mono);
  font-size: var(--t-label);
  letter-spacing: .19em;
  text-transform: uppercase;
  color: var(--stone-dim);
  font-weight: 400;
  margin-bottom: 1.35rem;
}
.footer__col li + li { margin-top: .7rem; }
.footer__col li, .footer__col p { font-size: var(--t-sm); color: var(--stone-dim); }
.footer__mark { height: 30px; width: auto; filter: brightness(0) invert(1); margin-bottom: 1.5rem; }

.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  justify-content: space-between;
  align-items: center;
  margin-top: clamp(3rem, 6vh, 4.5rem);
  padding-top: 1.75rem;
  border-top: 1px solid var(--rule-dark);
  font-size: var(--t-sm);
  color: var(--stone-dim);
}
.footer__vision {
  font-family: var(--mono);
  font-size: var(--t-label);
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--stone-dim);
}

@media (max-width: 860px) {
  .footer__grid { grid-template-columns: 1fr 1fr; gap: 2.5rem 1.5rem; }
  .footer__col--brand { grid-column: 1 / -1; }
}

/* --------------------------------------------------------------------------
   Page masthead (inner pages)
   -------------------------------------------------------------------------- */

.page-head { padding-top: calc(var(--nav-h) + clamp(3.5rem, 10vh, 8rem)); padding-bottom: clamp(2.5rem, 6vh, 4.5rem); }
.page-head__meta { display: flex; gap: 1.5rem; align-items: center; margin-bottom: 2rem; }

/* --------------------------------------------------------------------------
   Forms — shared by contact and the enquiry flow
   -------------------------------------------------------------------------- */

.field { position: relative; display: flex; flex-direction: column; gap: .5rem; }
.field label {
  font-family: var(--mono);
  font-size: var(--t-label);
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--stone);
}
.field input,
.field textarea,
.field select {
  width: 100%;
  padding: .95rem 0;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--rule);
  font-size: var(--t-body);
  transition: border-color .4s var(--e-out);
}
.field input:focus,
.field textarea:focus,
.field select:focus {
  outline: none;
  border-bottom-color: var(--bronze);
}
.field textarea { resize: vertical; min-height: 7rem; }
.field select { -webkit-appearance: none; appearance: none; border-radius: 0; cursor: pointer; }

.field--err input, .field--err textarea, .field--err select { border-bottom-color: #b4442f; }
.field__err { font-size: var(--t-sm); color: #b4442f; }

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1.5rem, 3vw, 2.5rem);
}
.form-grid .field--full { grid-column: 1 / -1; }
@media (max-width: 680px) { .form-grid { grid-template-columns: 1fr; } }

.spinner {
  width: 1em; height: 1em;
  border: 1.5px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  display: inline-block;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.form-done { text-align: center; padding-block: clamp(3rem, 8vh, 5rem); }
.form-done__check { width: 62px; height: 62px; margin: 0 auto 1.75rem; }
.form-done__check circle, .form-done__check path {
  fill: none; stroke: var(--bronze); stroke-width: 1.5;
  stroke-linecap: round; stroke-linejoin: round;
}
.form-done__check circle { stroke-dasharray: 166; stroke-dashoffset: 166; animation: draw .8s var(--e-out) forwards; }
.form-done__check path   { stroke-dasharray: 48;  stroke-dashoffset: 48;  animation: draw .45s var(--e-out) .55s forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
