/* NORTH Studio — v2 "The dark room"
   Colours, fonts and motion curves come from brand/tokens.css. */

:root {
  --ground: var(--north-night);
  --raised: var(--north-navy);
  --sky: color-mix(in srgb, var(--north-navy) 38%, var(--north-night));
  --ink: var(--north-white);
  --soft: var(--north-silver);
  --accent: var(--north-gold);
  --paper-ink: var(--north-night);
  --paper-soft: var(--north-muted);

  --m: clamp(20px, 4vw, 56px);      /* the page's one pair of outer margins */
  --inset: clamp(10px, 1.2vw, 16px); /* inset of framed panels */
  --gap: 24px;
  --r: var(--radius);                /* one radius for the whole page */

  /* five type steps */
  --t-small: 15px;
  --t-body: 17px;
  --t-state: 24px;
  --t-head: 28px;
  --t-display: clamp(40px, 4.4vw, 64px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--font-arabic);
  font-weight: 300;
  font-size: var(--t-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg, video, canvas { display: block; max-width: 100%; }
h1, h2, h3, p, figure, ul { margin: 0; padding: 0; }
ul { list-style: none; }
h2, h3 { font-weight: 700; line-height: 1.3; }
b, strong { font-weight: 500; }
[lang="en"] { font-family: var(--font-display); }
a { color: inherit; }
button { font: inherit; color: inherit; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 2px; }
.card :focus-visible, .foot :focus-visible { outline-color: var(--paper-ink); }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; inset-inline-start: 16px; top: -80px; z-index: 100; background: var(--accent); color: var(--ground); padding: 10px 16px; border-radius: var(--r); text-decoration: none; }
.skip:focus { top: 16px; }

.grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); padding-inline: var(--m); }

/* ===== Logo (paths from brand/logos/final) ===== */
.logo { height: auto; overflow: visible; }
.logo__star   { fill: var(--accent); }
.logo__north  { fill: var(--ink); }
.logo__studio { fill: var(--soft); }
.logo--compact { width: 116px; }
.logo--full { width: 100%; }

/* ===== Buttons: one shape, one radius ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 28px; border: 0; border-radius: var(--r);
  font: 500 var(--t-body)/1.2 var(--font-arabic); text-decoration: none; cursor: pointer;
  transition: background-color .3s var(--ease), color .3s var(--ease), transform .2s var(--ease);
}
.btn:active { transform: scale(.98); }
.btn--gold { background: var(--accent); color: var(--ground); }
.btn--gold:hover { background: var(--north-gold-hover); color: var(--ground); }
.btn--ink { background: var(--paper-ink); color: var(--ink); }
.btn--ink:hover { background: var(--raised); }
.btn--sm { min-height: 40px; padding: 0 18px; font-size: var(--t-small); }
.btn--block { width: 100%; }

/* ===== Bar ===== */
.bar {
  position: fixed; inset: 0 0 auto; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: calc(var(--inset) + 18px) calc(var(--inset) + var(--m)) 18px;
  transition: background-color .5s var(--ease), padding .5s var(--ease);
}
.bar.is-solid { background: var(--ground); padding-top: 16px; padding-bottom: 16px; }
.bar__brand { display: block; opacity: 0; visibility: hidden; pointer-events: none; transition: opacity .5s var(--ease), visibility 0s .5s; }
.bar.is-solid .bar__brand { opacity: 1; visibility: visible; pointer-events: auto; transition: opacity .5s var(--ease); }
.bar__nav { display: flex; align-items: center; gap: 32px; }
.bar__nav a:not(.btn) { color: var(--ink); text-decoration: none; font-size: var(--t-small); font-weight: 400; position: relative; }
.bar__nav a:not(.btn)::after {
  content: ""; position: absolute; left: 50%; top: -14px; width: 8px; height: 8px; translate: -50% 0;
  background: var(--accent); transform: scale(0) rotate(-90deg); transition: transform .45s var(--ease);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 0 L13.6 10.4 L24 12 L13.6 13.6 L12 24 L10.4 13.6 L0 12 L10.4 10.4 Z'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 0 L13.6 10.4 L24 12 L13.6 13.6 L12 24 L10.4 13.6 L0 12 L10.4 10.4 Z'/%3E%3C/svg%3E") center / contain no-repeat;
}
.bar__nav a:not(.btn):hover::after, .bar__nav a:not(.btn):focus-visible::after { transform: scale(1) rotate(0); }
.bar__menu { display: none; background: none; border: 0; padding: 10px 0; font-size: var(--t-small); cursor: pointer; }

/* ===== Hero ===== */
.hero { position: relative; height: 100svh; min-height: 600px; overflow: hidden; }
.hero__frame { position: absolute; inset: var(--inset); border-radius: var(--r); overflow: hidden; background: var(--sky); }
.sky { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero__video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 1.2s var(--ease); }
.hero.has-video .hero__video { opacity: 1; }
.hero.has-video .hero__sky-note { display: none; }

.hero__mark {
  position: absolute; left: 50%; top: 45%; transform: translate(-50%, -50%);
  width: min(74vw, 820px); text-align: center;
}
.hero__mark h1 { margin: 0; }
.hero__mark .logo { will-change: transform; }
.hero__tagline { margin-top: clamp(28px, 4vh, 48px); font-size: var(--t-state); font-weight: 300; color: var(--ink); }

.hero__about, .hero__sky-note {
  position: absolute; bottom: calc(var(--inset) + clamp(28px, 5vh, 56px)); margin: 0;
}
.hero__about { inset-inline-start: calc(var(--inset) + var(--m)); max-width: 40ch; font-size: var(--t-body); color: var(--ink); }
.hero__sky-note { inset-inline-end: calc(var(--inset) + var(--m)); max-width: 34ch; font-size: var(--t-small); color: var(--soft); }

/* ===== Services: one-size name columns ===== */
.services { padding-block: clamp(120px, 20vh, 220px); }
.services__title { grid-column: 1 / span 3; font-size: var(--t-head); margin-bottom: 96px; }
.services__col { grid-row: 2; }
.services__col:nth-of-type(1) { grid-column: 1 / span 3; }
.services__col:nth-of-type(2) { grid-column: 4 / span 3; }
.services__col:nth-of-type(3) { grid-column: 7 / span 3; }
.services__group { font-size: var(--t-body); font-weight: 500; color: var(--ink); margin-bottom: 1.6em; }
.services__group span { font-style: italic; font-weight: 400; color: var(--soft); margin-inline-start: 6px; }
.services__list button {
  display: block; width: 100%; text-align: start; background: none; border: 0; cursor: default;
  padding: 5px 0; font-size: var(--t-body); font-weight: 300; line-height: 1.25; color: var(--soft);
  transition: color .25s var(--ease), transform .35s var(--ease);
}
.services__list button:hover, .services__list button:focus-visible, .services__list button[aria-current="true"] { color: var(--ink); transform: translateX(-6px); }
.services__list .soon {
  display: inline-block; vertical-align: middle; margin-inline-start: 8px; padding: 2px 10px;
  border: 1px solid currentColor; border-radius: 999px; font-size: var(--t-small); line-height: 1.4; color: var(--soft);
}
.services__sum { display: none; }
.services__more { display: inline-block; margin-top: 20px; font-size: var(--t-small); color: var(--accent); text-decoration: none; border-bottom: 1px solid color-mix(in srgb, var(--accent) 45%, transparent); padding-bottom: 2px; }
.services__more:hover { color: var(--north-gold-hover); border-color: currentColor; }
.services__aside { grid-column: 10 / span 3; grid-row: 2; }
.services__desc { font-size: var(--t-body); color: var(--ink); min-height: 4.8em; margin-bottom: 32px; }

/* ===== Work: one strip per project ===== */
.work {
  --h: clamp(150px, 22vh, 230px);
  display: grid; grid-template-columns: minmax(170px, 15%) 1fr; column-gap: var(--gap);
  padding-block: clamp(120px, 16vh, 180px); padding-inline-start: var(--m);
}
.work__rail { position: sticky; top: 120px; align-self: start; }
.work__rail h2 { font-size: var(--t-head); }
.work__note { margin-top: 16px; font-size: var(--t-small); color: var(--soft); max-width: 22ch; }
.work__filters { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; margin-top: 40px; }
.work__filters button { background: none; border: 0; padding: 4px 0; font-size: var(--t-small); color: var(--soft); cursor: pointer; transition: color .25s var(--ease); }
.work__filters button:hover { color: var(--ink); }
.work__filters button[aria-pressed="true"] { color: var(--accent); font-weight: 500; }

.work__strips { display: grid; grid-template-columns: minmax(0, 1fr); gap: 48px; min-width: 0; }
.strip { min-width: 0; }
.strip[hidden] { display: none; }
.strip__link { display: block; text-decoration: none; }
.strip__frames { display: flex; gap: 8px; overflow: hidden; }
.frame {
  position: relative; flex: none; height: var(--h); aspect-ratio: var(--r, 4/3);
  background: var(--raised); transition: opacity .5s var(--ease);
}
.frame::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: 14px; height: 14px; translate: -50% -50%;
  background: var(--accent); opacity: .7;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 0 L13.6 10.4 L24 12 L13.6 13.6 L12 24 L10.4 13.6 L0 12 L10.4 10.4 Z'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 0 L13.6 10.4 L24 12 L13.6 13.6 L12 24 L10.4 13.6 L0 12 L10.4 10.4 Z'/%3E%3C/svg%3E") center / contain no-repeat;
}
.strip__frames img { height: var(--h); width: auto; flex: none; object-fit: cover; }
.work__strips:has(.strip__link:hover) .strip__link:not(:hover) .strip__frames > * { opacity: .4; }
.strip__cap { display: flex; justify-content: space-between; gap: 16px; margin-top: 14px; padding-inline-end: var(--m); font-size: var(--t-small); color: var(--soft); }
.strip__cap b { color: var(--ink); font-weight: 500; transition: color .3s var(--ease); }
.strip__link:hover .strip__cap b, .strip__link:focus-visible .strip__cap b { color: var(--accent); }
.work__empty { font-size: var(--t-body); color: var(--soft); }
.work__soon { min-height: 60svh; display: grid; place-content: center; justify-items: center; text-align: center; padding-inline-end: var(--m); }
.work__soon-star { width: 28px; height: 28px; color: var(--accent); margin-bottom: 28px; }
.work__soon-word { font-size: clamp(96px, 17vw, 260px); font-weight: 700; line-height: 1.35; color: var(--ink); }
.work__soon-note { margin-top: 8px; max-width: 38ch; font-size: var(--t-body); color: var(--soft); }
.work__empty button { background: none; border: 0; padding: 0; color: var(--accent); cursor: pointer; text-decoration: underline; text-underline-offset: 4px; }

/* ===== Process: photographs down a diagonal ===== */
.process { padding-block: clamp(120px, 16vh, 200px); }
.process__grid > * { align-self: start; }
.process__title { grid-column: 1 / -1; grid-row: 1; font-size: var(--t-display); margin-bottom: 72px; }
.process__text { grid-row: 2; font-size: var(--t-body); max-width: 36ch; color: var(--ink); }
.process__text b { display: block; margin-bottom: .5em; color: var(--accent); font-weight: 500; }
.process__text--1 { grid-column: 1 / span 4; }
.process__text--2 { grid-column: 5 / span 4; }
.process__text--3 { grid-column: 9 / span 4; }

/* ===== About: inset panel, shaped portrait ===== */
.about { padding: var(--inset); }
.about__panel {
  position: relative; overflow: hidden; border-radius: var(--r); background: var(--raised);
  min-height: calc(100svh - 2 * var(--inset));
  display: grid; grid-template-columns: 1fr minmax(280px, 340px); gap: 48px;
  padding: 56px calc(var(--m) + 8px);
}
.about__title { grid-column: 1; font-size: var(--t-display); max-width: 11ch; align-self: start; }
.about__blocks { grid-column: 2; display: grid; gap: 48px; align-content: start; }
.about__block h3 { font-size: var(--t-state); font-weight: 700; margin-bottom: 12px; }
.about__block p { font-size: var(--t-body); color: var(--ink);  }
.about__block p + p { margin-top: 12px; }
.about__creds { margin-top: 20px; padding-top: 16px; border-top: 1px solid color-mix(in srgb, var(--soft) 25%, transparent); display: grid; gap: 6px; }
.about__creds li { position: relative; padding-inline-start: 16px; font-size: var(--t-small); color: var(--soft); line-height: 1.6; }
.about__creds li::before { content: ""; position: absolute; inset-inline-start: 0; top: .7em; width: 5px; height: 5px; background: var(--accent); clip-path: polygon(50% 0, 60% 40%, 100% 50%, 60% 60%, 50% 100%, 40% 60%, 0 50%, 40% 40%); }
[lang="en"].about__creds, .about__creds [lang="en"] { font-family: var(--font-body-en); }
.about__blocks .btn { justify-self: start; }
.about__portrait {
  position: absolute; inset-inline-start: calc(var(--m) + 8px); bottom: calc(-0.2 * min(38vw, 560px));
  width: min(38vw, 560px); aspect-ratio: 1;
}
.about__photo { width: 100%; height: 100%; border-radius: 50%; overflow: hidden; background: var(--sky); display: grid; place-items: center; color: var(--soft); font-size: var(--t-small); }
.about__photo img { width: 100%; height: 100%; object-fit: cover; }
.about__star { position: absolute; left: 50%; top: 0; width: 9%; translate: -50% -50%; color: var(--accent); }

/* ===== Contact: card on a photograph ===== */
.contact { position: relative; min-height: 100svh; overflow: hidden; display: flex; align-items: flex-start; justify-content: flex-end; padding: 60px; }
.contact__photo { position: absolute; inset: 0; }
.contact__photo img { width: 100%; height: 110%; object-fit: cover; object-position: 60% 50%; filter: brightness(.6) contrast(1.05); }
.contact__photo figcaption { position: absolute; inset-inline-start: var(--m); bottom: 32px; font-size: var(--t-small); color: var(--ink); }
.contact__photo figcaption a { color: inherit; text-underline-offset: 3px; }
.card {
  position: relative; width: min(440px, 100%); background: var(--north-white); color: var(--paper-ink);
  border-radius: var(--r); padding: 32px; display: grid; gap: 20px; margin-top: 40px;
}
.card h2 { font-size: var(--t-head); }
.card__lead { color: var(--paper-soft); font-size: var(--t-body); }
.form { display: grid; gap: 16px; }
.field { display: grid; gap: 6px; margin: 0; padding: 0; border: 0; min-width: 0; }
.field label, .field legend { font-size: var(--t-small); font-weight: 400; color: var(--paper-ink); padding: 0; }
.field input[type="text"], .field textarea {
  width: 100%; font: 300 var(--t-body)/1.5 var(--font-arabic); color: var(--paper-ink); background: var(--north-paper);
  border: 1px solid var(--north-line); border-radius: var(--r); padding: 10px 12px;
}
.field input[type="text"]:focus, .field textarea:focus { outline: 2px solid var(--paper-ink); outline-offset: 0; }
.field textarea { resize: vertical; min-height: 84px; }
.field [aria-invalid="true"] { border-color: #A23B2A; }
.field--choices { display: flex; flex-wrap: wrap; gap: 8px; }
.field--choices legend { width: 100%; margin-bottom: 6px; }
.choice { position: relative; cursor: pointer; }
.choice input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.choice span { display: inline-block; padding: 7px 18px; border-radius: var(--r); background: var(--north-line); color: var(--paper-ink); font-size: var(--t-small); transition: background-color .2s, color .2s; }
.choice input:checked + span { background: var(--paper-ink); color: var(--ink); }
.choice input:focus-visible + span { outline: 2px solid var(--paper-ink); outline-offset: 2px; }
.form__error { color: #A23B2A; font-size: var(--t-small); }

/* ===== Footer: the light at the end ===== */
main { position: relative; z-index: 1; background: var(--ground); }
.foot {
  position: sticky; bottom: 0; z-index: 0;
  min-height: 100svh;
  display: grid; grid-template-rows: auto 1fr auto auto;
  padding: 120px var(--m) 24px;
  background: var(--north-white); color: var(--paper-ink);
}
.foot__cols { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--gap); }
.foot__cols > div { display: grid; gap: 6px; align-content: start; font-size: var(--t-body); color: var(--paper-soft); }
.foot__cols a { color: var(--paper-soft); text-decoration: none; justify-self: start; }
.foot__cols a:hover { color: var(--paper-ink); text-decoration: underline; text-underline-offset: 4px; }
.foot__head { color: var(--paper-ink); font-weight: 500; margin-bottom: 6px; }
.foot__mark { grid-row: 3; width: 100%; height: auto; overflow: visible; transform-origin: 50% 100%; }
.foot__mark .logo__star { fill: var(--raised); }
.foot__mark .logo__north { fill: var(--paper-ink); }
.foot__legal { grid-row: 4; margin-top: 20px; font-size: var(--t-small); color: var(--paper-soft); }

/* ===== Desktop: one wheel step, one screen ===== */
@media (hover: hover) and (pointer: fine) and (min-width: 1000px) and (min-height: 640px) {
  html { scroll-snap-type: y proximity; }
  .hero, .services, .work, .process, .about, .contact { scroll-snap-align: start; }
  .foot { scroll-snap-align: end; }
  .services, .work { min-height: 100svh; }
}

/* ===== Tablet and phone ===== */
@media (max-width: 999px) {
  .bar__menu { display: block; }
  .bar__nav {
    position: fixed; inset: 0; z-index: -1; flex-direction: column; justify-content: center; gap: 28px;
    background: var(--ground); opacity: 0; visibility: hidden; transition: opacity .35s var(--ease), visibility .35s;
  }
  .bar__nav.is-open { opacity: 1; visibility: visible; }
  .bar__nav a:not(.btn) { font-size: var(--t-state); }
  .bar__brand { opacity: 1; visibility: visible; pointer-events: auto; }

  .hero__mark { width: 84vw; top: 40%; }
  .hero__about { inset-inline-end: calc(var(--inset) + var(--m)); bottom: calc(var(--inset) + 96px); }
  .hero__sky-note { inset-inline-start: calc(var(--inset) + var(--m)); bottom: calc(var(--inset) + 24px); max-width: none; }

  .services__title { grid-column: 1 / -1; margin-bottom: 48px; }
  .services__col, .services__col:nth-of-type(n), .services__aside { grid-column: 1 / -1; grid-row: auto; margin-bottom: 48px; }
  .services__list button { line-height: 1.5; }
  .services__list button:hover { transform: none; }
  .services__sum { display: block; margin-top: 16px; color: var(--soft); font-size: var(--t-small); }
  .services__desc { display: none; }

  .work { grid-template-columns: 1fr; padding-inline: 0; --h: 120px; }
  .work__rail { position: static; padding-inline: var(--m); display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 32px; }
  .work__note { order: 3; flex-basis: 100%; margin: 0; max-width: none; }
  .work__filters { flex-direction: row; gap: 16px; margin: 0; }
  .work__soon { min-height: 50svh; padding-inline: var(--m); }
  .strip__frames { overflow-x: auto; scroll-snap-type: x mandatory; padding-inline: var(--m); scrollbar-width: none; }
  .strip__frames > * { scroll-snap-align: start; }
  .strip__cap { padding-inline: var(--m); }
  .strip__cap span:nth-child(2) { display: none; }

  .process__grid { display: flex; flex-direction: column; gap: 20px; }
  .process__grid > * { margin-top: 0 !important; }
  .process__title { font-size: var(--t-head); margin-bottom: 16px; }
  .process__text { max-width: none; }

  .about__panel { grid-template-columns: 1fr; padding: 40px 24px 0; gap: 40px; }
  .about__title { grid-column: 1; font-size: var(--t-head); max-width: none; }
  .about__blocks { grid-column: 1; }
  .about__portrait { position: relative; inset: auto; width: 86vw; max-width: 460px; justify-self: center; margin-bottom: calc(-0.25 * min(86vw, 460px)); }

  .contact { display: block; padding: 0; min-height: 0; }
  .contact__photo { position: relative; height: 70svh; }
  .contact__photo img { height: 100%; }
  .contact__photo figcaption { bottom: 96px; }
  .card { width: auto; margin: -80px 16px 0; padding: 24px; }

  .foot { padding-top: 96px; }
  .foot__cols { grid-template-columns: 1fr 1fr; row-gap: 32px; }
}
@media (max-width: 560px) {
  .foot__cols { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

.form__note { font-size: var(--t-small); color: var(--paper-soft); text-align: center; }
.form__note a { color: var(--paper-ink); text-underline-offset: 3px; }

.foot__legal [dir="ltr"] { white-space: nowrap; }
