/* Gasfra Holdings — obsidian */

:root {
  --bg: #121014;          /* cool near-black */
  --fg: #ece6da;          /* warm off-white */
  --muted: #bab4aa;       /* secondary text, ~9:1 on --bg */
  --accent: #9a94a6;      /* smoke pewter, used sparingly */
  --line: rgba(236, 230, 218, 0.13);
  --line-accent: rgba(154, 148, 166, 0.55);

  --serif: "Cormorant Garamond", "Iowan Old Style", Georgia, serif;
  --sans: "Hanken Grotesk", "Helvetica Neue", Arial, sans-serif;

  /* type scale, ratio 1.325 */
  --t-0: 1.0625rem;   /* 17px body */
  --t-1: 1.408rem;
  --t-2: 1.865rem;
  --t-3: 2.471rem;
  --t-4: 3.274rem;

  --gutter: clamp(20px, 4.2vw, 64px);
  --gap: 24px;
  --max: 1320px;
  --header-h: 84px;
  --ease: cubic-bezier(.2, .6, .2, 1);
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  background: var(--bg);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-weight: 400;
  font-size: var(--t-0);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p, ol { margin: 0; padding: 0; }
ol { list-style: none; }
a { color: inherit; }

::selection { background: var(--accent); color: var(--bg); }

:focus-visible { outline: 1px solid var(--fg); outline-offset: 4px; }

.skip {
  position: absolute; left: var(--gutter); top: -100px; z-index: 100;
  background: var(--fg); color: var(--bg); padding: .5rem 1rem; text-decoration: none;
}
.skip:focus { top: 12px; }

.wrap {
  width: min(100% - 2 * var(--gutter), var(--max));
  margin-inline: auto;
}

section[id] { scroll-margin-top: calc(var(--header-h) - 1px); }

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

.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  height: var(--header-h);
  transition: background-color .5s var(--ease), border-color .5s var(--ease);
  border-bottom: 1px solid transparent;
}
.site-header.is-scrolled {
  background: rgba(18, 16, 20, 0.94);
  border-bottom-color: var(--line);
}
@supports (backdrop-filter: blur(1px)) {
  .site-header.is-scrolled { background: rgba(18, 16, 20, 0.86); backdrop-filter: blur(10px); }
}

.site-header__inner {
  height: 100%;
  display: flex; align-items: center; justify-content: space-between;
}

.brand { display: block; line-height: 0; }
.brand img { height: 24px; width: auto; }

.site-nav { display: flex; gap: clamp(1.75rem, 3vw, 3rem); }
.site-nav a {
  font-size: .875rem; font-weight: 400; letter-spacing: .06em;
  text-decoration: none; color: var(--fg);
  padding-block: .4rem;
  background: linear-gradient(var(--accent), var(--accent)) 0 100% / 0 1px no-repeat;
  transition: background-size .45s var(--ease);
}
.site-nav a:hover, .site-nav a:focus-visible { background-size: 100% 1px; }

.menu-toggle { display: none; }

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

.hero {
  position: relative;
  min-height: min(100vh, 1100px); min-height: min(100svh, 1100px);
  display: flex; align-items: flex-end;
  overflow: hidden;
  isolation: isolate;
}
.hero__img {
  position: absolute; inset: 0; z-index: -2;
  width: 100%; height: 100%; object-fit: cover; object-position: 50% 42%;
}
.hero__video {
  position: absolute; inset: 0; z-index: -2;
  width: 100%; height: 100%; object-fit: cover; object-position: 50% 42%;
  opacity: 0; transition: opacity 1.6s var(--ease);
}
.hero__video.is-playing { opacity: 1; }
.hero__scrim {
  position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(to top, rgba(18,16,20,.94) 0%, rgba(18,16,20,.55) 38%, rgba(18,16,20,.12) 70%, rgba(18,16,20,.45) 100%);
}
.hero__content {
  padding-bottom: clamp(3.5rem, 9vh, 7.5rem);
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap);
}
.hero__title {
  grid-column: 1 / span 10;
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(2.5rem, 5.55vw, 5.6rem);
  line-height: 1.04; letter-spacing: -.012em;
  max-width: 19.5ch;
  text-wrap: balance;
}
.hero__sub {
  grid-column: 1 / span 6;
  margin-top: clamp(1.5rem, 3vw, 2.5rem);
  padding-top: 1.5rem;
  border-top: 1px solid var(--line-accent);
  max-width: 34rem;
  color: var(--fg); opacity: .86;
  font-size: var(--t-0);
}

/* "Watch the film": quiet text button under the intro, scrolls to the film and turns its sound on */
.film-link {
  grid-column: 1 / span 6; justify-self: start;
  margin-top: 1.5rem;
  display: inline-flex; align-items: center; gap: .85rem;
  appearance: none; background: none; border: 0; padding: .45rem 0;
  font: 500 .8125rem/1.4 var(--sans); letter-spacing: .14em; text-transform: uppercase;
  color: var(--muted); cursor: pointer;
  transition: color .4s var(--ease);
}
.film-link__icon {
  display: grid; place-items: center;
  width: 30px; height: 30px; border-radius: 50%;
  border: 1px solid var(--line-accent);
  transition: border-color .4s var(--ease);
}
.film-link__icon svg { margin-left: 2px; }   /* optical centre of the triangle */
.film-link__time {
  color: var(--accent); font-weight: 400; letter-spacing: .12em;
  font-variant-numeric: tabular-nums lining-nums;
  padding-left: .85rem; border-left: 1px solid var(--line);
  transition: color .4s var(--ease);
}
.film-link:hover, .film-link:focus-visible { color: var(--fg); }
.film-link:hover .film-link__icon, .film-link:focus-visible .film-link__icon { border-color: var(--fg); }
.film-link:hover .film-link__time, .film-link:focus-visible .film-link__time { color: var(--muted); }
html:not(.js) .film-link { display: none; }

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

/* ---------- Film ----------
   Inline under the hero. A 16:9 frame across the content width; the only chrome is a
   small sound toggle (bottom-left) and, when the film is not playing, a centred play button. */

.film-section { padding-top: clamp(3.5rem, 7vw, 6rem); }
html:not(.js) .film-section { display: none; }

.film-section__frame {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #0b0a0d;
  scroll-margin-top: var(--header-h);   /* "Watch the film" centres it in the area below the header */
}
.film-section__video {
  display: block; width: 100%; height: 100%;
  object-fit: cover;
  background: #0b0a0d;
}
.film-section__video::cue {
  font-family: "Hanken Grotesk", "Helvetica Neue", Arial, sans-serif;
  font-size: clamp(.6875rem, 1.35vw, 1.25rem);
  line-height: 1.4;
  color: #ece6da;
  background: rgba(18, 16, 20, 0.72);
}

.film-section__sound {
  position: absolute; left: clamp(12px, 1.6vw, 24px); bottom: clamp(12px, 1.6vw, 24px);
  display: inline-flex; align-items: center; gap: .7rem;
  appearance: none; margin: 0; padding: .55rem .9rem;
  font: 500 .75rem/1 var(--sans); letter-spacing: .14em; text-transform: uppercase;
  color: var(--fg);
  background: rgba(18, 16, 20, 0.62);
  border: 1px solid var(--line-accent);
  cursor: pointer;
  transition: border-color .4s var(--ease), background-color .4s var(--ease);
}
@supports (backdrop-filter: blur(1px)) {
  .film-section__sound { background: rgba(18, 16, 20, 0.42); backdrop-filter: blur(8px); }
}
.film-section__sound-state {
  color: var(--accent); letter-spacing: .12em;
  padding-left: .7rem; border-left: 1px solid var(--line);
}
.film-section__sound[aria-pressed="true"] .film-section__sound-state { color: var(--fg); }
.film-section__sound:hover, .film-section__sound:focus-visible { border-color: var(--fg); }

.film-section__play {
  position: absolute; left: 50%; top: 50%;
  translate: -50% -50%;
  display: grid; place-items: center;
  width: clamp(64px, 7vw, 88px); height: clamp(64px, 7vw, 88px);
  appearance: none; margin: 0; padding: 0;
  border-radius: 50%;
  border: 1px solid var(--line-accent);
  background: rgba(18, 16, 20, 0.5);
  color: var(--fg); cursor: pointer;
  transition: border-color .4s var(--ease), background-color .4s var(--ease);
}
.film-section__play[hidden] { display: none; }
.film-section__play svg { margin-left: 3px; }   /* optical centre of the triangle */
.film-section__play:hover, .film-section__play:focus-visible { border-color: var(--fg); background: rgba(18, 16, 20, 0.7); }

/* ---------- Page grid ----------
   One 12-column grid. Columns 1–3 hold the section label (and, in Sectors,
   the index number); content always starts on column 4. */

.approach__grid, .sectors__grid, .contact__grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gap);
}

.section-title {
  grid-column: 1 / 3;
  font-family: var(--sans); font-weight: 500;
  font-size: .8125rem; line-height: 1.4;
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--muted);
}

/* ---------- Approach ---------- */

.approach { padding-block: clamp(6rem, 12vw, 10rem) clamp(4.5rem, 8vw, 6.5rem); }

.approach .section-title { grid-row: 1; padding-top: 1.85rem; }

.principles {
  grid-column: 4 / 13; grid-row: 1;
  display: grid; grid-template-columns: subgrid;
  row-gap: 3rem;
}
.principle {
  grid-column: span 3;
  padding-top: 1.75rem;
  border-top: 1px solid var(--line);
}
.principle__title {
  font-family: var(--serif); font-weight: 500;
  font-size: clamp(1.55rem, 2.1vw, var(--t-2)); line-height: 1.12; letter-spacing: -.005em;
  margin-bottom: .9rem;
}
.principle p { color: var(--muted); max-width: 32ch; }

.headcount {
  grid-column: 4 / 13; grid-row: 2;
  display: grid; grid-template-columns: subgrid; align-items: baseline;
  margin-top: clamp(3.5rem, 6vw, 5rem);
  padding-top: 1.75rem;
  border-top: 1px solid var(--line);
}
.headcount__figure {
  grid-column: 1 / span 3;
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(3.5rem, 6vw, 5.75rem); line-height: 1; letter-spacing: -.01em;
  font-variant-numeric: lining-nums;
}
.headcount__label {
  grid-column: 4 / span 6;
  font-family: var(--serif); font-weight: 400;
  font-size: var(--t-2); line-height: 1.25; color: var(--fg);
}

/* ---------- Sectors ---------- */

.sectors {
  padding-block: clamp(4.5rem, 8vw, 7rem) clamp(5rem, 9vw, 7.5rem);
  border-top: 1px solid var(--line);
}
.sectors .section-title { grid-row: 1; padding-top: 1.15rem; }

.sector-list {
  grid-column: 3 / 8; grid-row: 1;
  display: grid; grid-template-columns: subgrid;
  border-bottom: 1px solid var(--line);
}
.sector {
  grid-column: 1 / -1;
  position: relative;
  display: grid; grid-template-columns: subgrid;
  padding-block: 1.15rem 1.25rem;
  border-top: 1px solid var(--line);
}
.sector::before {           /* pewter hairline that draws in on the active row */
  content: ""; position: absolute; left: 0; top: -1px; height: 1px; width: 100%;
  background: var(--accent);
  transform: scaleX(0); transform-origin: left;
  transition: transform .8s var(--ease);
}
.sector__num {
  grid-column: 1;
  font-family: var(--sans); font-weight: 400; font-size: .8125rem; letter-spacing: .12em;
  font-variant-numeric: tabular-nums lining-nums;
  color: var(--accent);
  padding-top: .45rem;
}
.sector__body { grid-column: 2 / -1; }
.sector__title {
  font-family: var(--serif); font-weight: 500;
  font-size: clamp(1.4rem, 1.75vw, 1.6rem); line-height: 1.15; letter-spacing: -.005em;
  margin-bottom: .3rem;
  transition: color .4s var(--ease);
}
.sector__body p { color: var(--muted); max-width: 52ch; }
.sector__img { display: none; }

.sector-stage { display: none; margin: 0; }

@media (min-width: 900px) {
  .sector-stage {
    display: block;
    grid-column: 9 / 13; grid-row: 1;
    position: sticky; top: calc(var(--header-h) + 2rem);
    align-self: start;
  }
  .sector-stage__frame {
    position: relative; aspect-ratio: 4 / 5; overflow: hidden; background: #0b0a0d;
  }
  .sector-stage__frame img {
    position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
    opacity: 0; transform: scale(1.035);
    transition: opacity .9s var(--ease), transform 2.4s var(--ease);
  }
  .sector-stage__frame img.is-active { opacity: 1; transform: scale(1); }
  .sector-stage__frame video {
    position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
    opacity: 0; transition: opacity .9s var(--ease);
  }
  .sector-stage__frame video.is-playing { opacity: 1; }
  .sector-stage__caption {
    display: flex; gap: 1.25rem; align-items: baseline;
    margin-top: 1rem; padding-top: .9rem; border-top: 1px solid var(--line);
    font-size: .8125rem; letter-spacing: .04em; color: var(--muted);
  }
  .sector-stage__caption [data-stage-num] { color: var(--accent); font-variant-numeric: tabular-nums; letter-spacing: .12em; }

  .js .sector .sector__title { color: var(--muted); }
  .js .sector.is-active .sector__title { color: var(--fg); }
  .js .sector.is-active::before { transform: scaleX(1); }
}

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

.contact {
  padding-block: clamp(4.5rem, 8vw, 7rem) clamp(6rem, 11vw, 9rem);
  border-top: 1px solid var(--line);
}
.contact .section-title { grid-row: 1; padding-top: .55rem; }
.contact__body { grid-column: 4 / 13; grid-row: 1; }
.contact__line {
  font-family: var(--serif); font-style: italic;
  font-size: var(--t-2); line-height: 1.25; max-width: 24ch;
}
.contact__email {
  margin-top: clamp(1.75rem, 3.5vw, 2.5rem);
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(1.75rem, 3.4vw, var(--t-4)); line-height: 1.1; letter-spacing: -.01em;
}
.contact__email a {
  text-decoration: none;
  background: linear-gradient(var(--line-accent), var(--line-accent)) 0 100% / 100% 1px no-repeat;
  padding-bottom: .2rem;
  transition: background-image .4s var(--ease);
  word-break: break-word;
}
.contact__email a:hover, .contact__email a:focus-visible {
  background-image: linear-gradient(var(--fg), var(--fg));
}
.contact__place { margin-top: 1.5rem; color: var(--muted); }

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

.site-footer { border-top: 1px solid var(--line); padding-block: 2.25rem; }
.site-footer__inner {
  display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap;
}
.site-footer__logo { height: 18px; width: auto; opacity: .85; }
.site-footer p { font-size: .8125rem; color: var(--muted); letter-spacing: .02em; }

/* ---------- Reveal motion ---------- */

.js .reveal { opacity: 0; transform: translateY(14px); transition: opacity 1.1s var(--ease), transform 1.1s var(--ease); }
.js .reveal.is-in { opacity: 1; transform: none; }
.principle.reveal:nth-child(2) { transition-delay: .12s; }
.principle.reveal:nth-child(3) { transition-delay: .24s; }

.js .hero__title, .js .hero__sub, .js .film-link { animation: rise 1.4s var(--ease) both; }
.js .hero__sub { animation-delay: .25s; }
.js .film-link { animation-delay: .4s; }
@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
}

.nowrap { white-space: nowrap; }

/* ---------- Tablet: content runs to column 8 so the list keeps a usable measure ---------- */

@media (max-width: 1100px) and (min-width: 900px) {
  :root { --gap: 20px; }
  .principle p { max-width: none; }
  .sector-list { grid-column: 3 / 9; }
}

/* ---------- Mobile: single column; labels sit above their content ---------- */

@media (max-width: 899px) {
  .approach__grid, .sectors__grid, .contact__grid,
  .principles, .headcount, .sector-list, .sector { grid-template-columns: minmax(0, 1fr); }

  .section-title,
  .approach .section-title, .sectors .section-title, .contact .section-title {
    grid-column: 1; grid-row: auto; padding-top: 0; margin-bottom: 2rem;
  }
  .principles, .headcount, .sector-list, .contact__body { grid-column: 1; grid-row: auto; }
  .principle, .headcount__figure, .headcount__label, .sector__num, .sector__body { grid-column: 1; }

  .principle p { max-width: none; }

  .headcount { row-gap: .75rem; }

  .sector { row-gap: .35rem; padding-block: 1.5rem 1.75rem; }
  .sector__num { padding-top: 0; }
  .sector__img {
    display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover;
    margin-top: 1.25rem;
  }
}

@media (max-width: 720px) {
  :root { --header-h: 64px; }
  .brand img { height: 18px; }

  .js .menu-toggle {
    display: block;
    appearance: none; background: none; border: 0; color: var(--fg);
    font: 400 .875rem/1 var(--sans); letter-spacing: .06em;
    padding: .75rem 0 .75rem 1rem; cursor: pointer;
  }
  .js .site-nav {
    position: absolute; top: var(--header-h); left: 0; right: 0;
    flex-direction: column; gap: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    padding: .5rem var(--gutter) 1.25rem;
    display: none;
  }
  .site-header.is-open { background: var(--bg); border-bottom-color: var(--line); }
  .site-header.is-open .site-nav { display: flex; }
  .site-nav a {
    font-family: var(--serif); font-size: 1.75rem; letter-spacing: 0;
    padding-block: .65rem; border-top: 1px solid var(--line); background: none;
  }
  .site-nav a:first-child { border-top: 0; }
  html:not(.js) .site-nav { display: none; }

  .hero__content { grid-template-columns: minmax(0, 1fr); }
  .hero__title, .hero__sub, .film-link { grid-column: 1; }
  .film-link { margin-top: 1.25rem; }
  .hero__title { font-size: clamp(2.35rem, 10.4vw, 3rem); line-height: 1.06; }
  .hero__sub { font-size: var(--t-0); }

  /* Small frame: the sound toggle moves to the top-left corner so it never covers the captions */
  .film-section__sound {
    top: 8px; left: 8px; bottom: auto;
    gap: .55rem; padding: .45rem .65rem;
    font-size: .6875rem;
  }
  .film-section__sound-state { padding-left: .55rem; }

  .contact__email { font-size: clamp(1.6rem, 8vw, 2.1rem); }

  .site-footer__inner { flex-direction: column; align-items: flex-start; }
}
