/* ===========================================================
   Iron Crown Media
   Concept: the page is an edit. Each category is a clip on a
   timeline; a playhead in the header tracks your scroll.
   =========================================================== */

:root {
  /* Base */
  --black: #000;
  --graphite: #161618;
  --iron: #2a2a2d;
  --paper: #f5f5f7;
  --steel: #8e8e93;
  --brass: #d6a84f;

  /* Clip colours, one per category (like an editing timeline) */
  --c-reel: #d6a84f;
  --c-talk: #7fa7ff;
  --c-motion: #b794f6;
  --c-ads: #ff8a65;
  --c-yt: #5ad1e6;
  --c-pod: #9bd66b;
  --c-ba: #e9e3d3;
  --c-gap: #48484c;

  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);

  --wrap: 1240px;
  --gutter: clamp(20px, 4vw, 40px);
  --r-frame: 26px;
  --rail-h: clamp(380px, 56vh, 560px);
  --bar-h: 100px;

  --font: "Schibsted Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--bar-h) + 12px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--black);
  color: var(--paper);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "ss01";
}

img, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
h1, h2, h3, p, dl, dd, ol, ul { margin: 0; }
ol, ul { padding: 0; list-style: none; }

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

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 48px;
  padding: 0 24px;
  border: 0;
  border-radius: 999px;
  background: var(--brass);
  color: #17120a;
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: -0.005em;
  cursor: pointer;
  transition: transform 160ms var(--ease-out), background-color 200ms ease;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(0.97); }
.btn:focus-visible { outline: 2px solid var(--paper); outline-offset: 3px; }
.btn svg { width: 16px; height: 16px; fill: currentColor; }
.btn--quiet { background: rgba(255, 255, 255, 0.1); color: var(--paper); }
.btn--small { height: 38px; padding: 0 16px; font-size: 0.9375rem; }
.btn--wide { width: 100%; }

@media (hover: hover) and (pointer: fine) {
  .btn:hover { background: #e2b65e; }
  .btn--quiet:hover { background: rgba(255, 255, 255, 0.16); }
}

/* ---------- Header bar (translucent material) ---------- */
.bar {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  background: rgba(0, 0, 0, 0.62);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
}
.bar::after {
  /* soft scroll-edge fade instead of a hard divider */
  content: "";
  position: absolute;
  inset: 100% 0 auto 0;
  height: 18px;
  background: linear-gradient(rgba(0, 0, 0, 0.45), transparent);
  pointer-events: none;
}
.bar__row { display: flex; align-items: center; gap: 28px; height: 60px; }

.brand { display: inline-flex; align-items: center; gap: 10px; margin-right: auto; }
.brand__mark { width: 26px; height: 26px; fill: var(--brass); flex: none; }
.brand__name { font-weight: 700; font-size: 1.0625rem; letter-spacing: -0.02em; }

.bar__links { display: flex; gap: 26px; font-size: 0.9375rem; color: var(--steel); }
.bar__links a { transition: color 200ms ease; }
.bar__links a:hover { color: var(--paper); }

/* ---------- Timeline ---------- */
.timeline {
  display: grid;
  grid-template-columns: 150px 1fr 104px;
  align-items: center;
  gap: 16px;
  height: 40px;
}
.timeline__label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8125rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.timeline__label::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--tl-color, var(--c-reel));
  flex: none;
}
.timeline__tc {
  font-size: 0.8125rem;
  color: var(--steel);
  text-align: right;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}
.timeline__track {
  position: relative;
  display: flex;
  gap: 2px;
  height: 22px;
  align-items: center;
}
.clip {
  position: relative;
  height: 12px;
  min-width: 6px;
  border: 0;
  padding: 0;
  border-radius: 3px;
  background: var(--clip);
  opacity: 0.42;
  cursor: pointer;
  transition: opacity 200ms ease, height 200ms var(--ease-out);
}
.clip.is-active { opacity: 1; height: 16px; }
.clip:focus-visible { outline: 2px solid var(--paper); outline-offset: 2px; }
@media (hover: hover) and (pointer: fine) {
  .clip:hover { opacity: 0.85; }
}
.timeline__playhead {
  position: absolute;
  top: -2px;
  bottom: -2px;
  left: 0;
  width: 2px;
  margin-left: -1px;
  background: var(--paper);
  border-radius: 1px;
  pointer-events: none;
  z-index: 2;
  will-change: transform;
}
.timeline__playhead::before {
  content: "";
  position: absolute;
  top: -3px;
  left: 50%;
  width: 10px;
  height: 7px;
  transform: translateX(-50%);
  background: var(--paper);
  clip-path: polygon(0 0, 100% 0, 50% 100%);
}

/* ---------- Hero ---------- */
.hero { padding-top: calc(var(--bar-h) + clamp(56px, 9vh, 110px)); }
.hero__title {
  font-size: clamp(3.1rem, 9.4vw, 9rem);
  font-weight: 800;
  line-height: 0.94;
  letter-spacing: -0.048em;
}
.line { display: block; overflow: hidden; padding-bottom: 0.06em; }
.line > span { display: inline-block; }

.hero__foot {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px 48px;
  flex-wrap: wrap;
  margin-top: clamp(28px, 4vw, 44px);
}
.hero__lede { max-width: 30em; font-size: 1.1875rem; line-height: 1.5; color: var(--steel); }
.hero__ctas { display: flex; gap: 12px; flex-wrap: wrap; }
.hero__reel { margin-top: clamp(40px, 6vw, 72px); }

/* One orchestrated load moment: headline rises, reel un-clips.
   Pure CSS, so the hero always appears even if the script is slow or blocked. */
.line > span { animation: rise 900ms var(--ease-out) both; }
.line:nth-child(2) > span { animation-delay: 90ms; }
.hero__foot { animation: fade-in 600ms ease 380ms both; }
.hero__reel { animation: unclip 1100ms var(--ease-in-out) 250ms both; }
@keyframes rise { from { transform: translateY(105%); } }
@keyframes fade-in { from { opacity: 0; } }
@keyframes unclip {
  from { clip-path: inset(6% 6% 6% 6% round 40px); opacity: 0.4; }
  to { clip-path: inset(0 round 0); opacity: 1; }
}

/* ---------- Chapters ---------- */
.chapter { padding-top: clamp(96px, 13vw, 160px); }
.chapter__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 32px;
}
.chapter__head p,
.compare-copy p { max-width: 34em; margin-top: 14px; color: var(--steel); font-size: 1.0625rem; }

h2, .section-title {
  font-size: clamp(2.1rem, 4.6vw, 3.75rem);
  font-weight: 750;
  line-height: 1.02;
  letter-spacing: -0.035em;
}
.chip {
  display: inline-block;
  width: 0.42em;
  height: 0.42em;
  margin-right: 0.32em;
  border-radius: 0.09em;
  vertical-align: 0.14em;
  background: var(--chapter-color);
}

[data-color="reel"]   { --chapter-color: var(--c-reel); }
[data-color="talk"]   { --chapter-color: var(--c-talk); }
[data-color="motion"] { --chapter-color: var(--c-motion); }
[data-color="ads"]    { --chapter-color: var(--c-ads); }
[data-color="yt"]     { --chapter-color: var(--c-yt); }
[data-color="pod"]    { --chapter-color: var(--c-pod); }
[data-color="ba"]     { --chapter-color: var(--c-ba); }
[data-color="gap"]    { --chapter-color: var(--c-gap); }

/* Rail prev/next */
.rail-nav { display: flex; gap: 8px; flex: none; }
.rail-btn {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.09);
  cursor: pointer;
  transition: background-color 200ms ease, opacity 200ms ease, transform 160ms var(--ease-out);
}
.rail-btn svg { width: 18px; height: 18px; stroke: var(--paper); stroke-width: 2; fill: none; }
.rail-btn:active { transform: scale(0.94); }
.rail-btn:disabled { opacity: 0.3; cursor: default; }
@media (hover: hover) and (pointer: fine) {
  .rail-btn:not(:disabled):hover { background: rgba(255, 255, 255, 0.16); }
}

/* Horizontal rail: every item shares a height, width follows its ratio */
.rail {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: max(var(--gutter), (100% - var(--wrap)) / 2);
  padding-inline: max(var(--gutter), (100% - var(--wrap)) / 2);
  padding-bottom: 8px;
  scrollbar-width: none;
}
.rail::-webkit-scrollbar { display: none; }

/* ---------- Video frame ---------- */
.item { flex: none; scroll-snap-align: start; margin: 0; }
.item figcaption {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  font-size: 0.9375rem;
}
.item figcaption span:last-child { color: var(--steel); white-space: nowrap; }

.frame {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: var(--r-frame);
  overflow: hidden;
  background: var(--graphite);
  cursor: pointer;
  isolation: isolate;
  transform: translateZ(0);
  -webkit-tap-highlight-color: transparent;
}
.frame:focus-visible { outline: 2px solid var(--paper); outline-offset: 4px; }
.frame video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 600ms var(--ease-out);
}
@media (hover: hover) and (pointer: fine) {
  .frame:hover video { transform: scale(1.025); }
  .frame:hover .frame__play { background: var(--paper); }
  .frame:hover .frame__play svg { fill: #000; }
}
.frame:active { transform: scale(0.985); transition: transform 160ms var(--ease-out); }

.rail .item { height: auto; }
.rail .frame { height: var(--rail-h); width: auto; }
.r-9x16 .frame { aspect-ratio: 9 / 16; }
.r-4x5  .frame { aspect-ratio: 4 / 5; }
.r-1x1  .frame { aspect-ratio: 1 / 1; }
.r-16x9 .frame { aspect-ratio: 16 / 9; }

.hero__reel .frame { aspect-ratio: 16 / 9; border-radius: 32px; }

.frame__play {
  position: absolute;
  right: 16px;
  bottom: 16px;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: rgba(30, 30, 32, 0.55);
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  transition: background-color 200ms ease;
}
.frame__play svg { width: 16px; height: 16px; fill: #fff; margin-left: 2px; transition: fill 200ms ease; }
.hero__reel .frame__play { width: 72px; height: 72px; right: 28px; bottom: 28px; }
.hero__reel .frame__play svg { width: 24px; height: 24px; }

/* Placeholder until a real file exists */
.frame__empty {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 20px;
  text-align: center;
  color: var(--steel);
  font-size: 0.875rem;
  background:
    radial-gradient(90% 60% at 50% 0%, color-mix(in srgb, var(--chapter-color, var(--c-reel)) 22%, transparent), transparent 70%),
    var(--graphite);
}
.frame__empty svg { width: 34px; height: 34px; fill: color-mix(in srgb, var(--chapter-color, var(--c-reel)) 70%, transparent); }
.frame__empty strong { color: var(--paper); font-weight: 600; font-size: 0.9375rem; }
.frame__empty code {
  font-family: inherit;
  font-size: 0.8125rem;
  color: var(--paper);
  background: rgba(255, 255, 255, 0.08);
  padding: 4px 10px;
  border-radius: 999px;
}
.frame.is-empty .frame__empty { display: flex; }
.frame.is-empty .frame__play { display: none; }

/* ---------- Before / after ---------- */
.compare-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: clamp(32px, 6vw, 96px);
  align-items: center;
}
.compare-copy .btn { margin-top: 28px; }

.compare {
  --pos: 50%;
  position: relative;
  height: min(720px, 78vh);
  aspect-ratio: 9 / 16;
  border-radius: var(--r-frame);
  overflow: hidden;
  background: var(--graphite);
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
}
.compare video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}
.compare__after { clip-path: inset(0 0 0 var(--pos)); }
.compare__tag {
  position: absolute;
  top: 16px;
  z-index: 3;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 600;
  background: rgba(30, 30, 32, 0.55);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.compare__tag--before { left: 16px; }
.compare__tag--after { right: 16px; }
.compare__handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--pos);
  z-index: 4;
  width: 44px;
  margin-left: -22px;
  border: 0;
  padding: 0;
  background: transparent;
  cursor: ew-resize;
  touch-action: none;
}
.compare__handle::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 2px;
  margin-left: -1px;
  background: var(--paper);
}
.compare__knob {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: var(--paper);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.45);
  transition: transform 160ms var(--ease-out);
}
.compare__knob svg { width: 20px; height: 20px; stroke: #000; stroke-width: 2; fill: none; }
.compare.is-dragging .compare__knob { transform: translate(-50%, -50%) scale(1.08); }
.compare__handle:focus-visible .compare__knob { outline: 2px solid var(--brass); outline-offset: 3px; }
.compare .frame__empty { border-radius: 0; }
.compare.is-empty .frame__empty { display: flex; }
.compare.is-empty .compare__handle,
.compare.is-empty .compare__tag { display: none; }

/* ---------- Included ---------- */
.section-title { margin-bottom: clamp(32px, 4vw, 48px); }
.included {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 40px 48px;
}
.included dt { font-weight: 650; font-size: 1.1875rem; letter-spacing: -0.015em; }
.included dd { margin-top: 8px; color: var(--steel); }

/* ---------- Steps (a real sequence, so numbered) ---------- */
.steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 32px;
  counter-reset: step;
}
.steps li { position: relative; padding-top: 28px; }
.steps li::before {
  /* the connecting line reads like a track */
  content: "";
  position: absolute;
  top: 13px;
  left: 36px;
  right: -32px;
  height: 2px;
  background: var(--iron);
}
.steps li:last-child::before { display: none; }
.steps__n {
  position: absolute;
  top: 0;
  left: 0;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--iron);
  font-size: 0.875rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.steps h3 { margin-top: 22px; font-size: 1.1875rem; font-weight: 650; letter-spacing: -0.015em; }
.steps p { margin-top: 8px; color: var(--steel); }

/* ---------- Contact ---------- */
.contact { padding-bottom: clamp(96px, 12vw, 150px); }
.contact__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: clamp(40px, 6vw, 96px);
  align-items: start;
}
.contact__title {
  font-size: clamp(2.6rem, 6.4vw, 5.6rem);
  font-weight: 800;
  line-height: 0.96;
  letter-spacing: -0.045em;
}
.contact__copy > p { max-width: 26em; margin-top: 22px; color: var(--steel); font-size: 1.1875rem; }
.contact__direct { margin-top: 32px; display: grid; gap: 10px; }
.contact__direct a {
  display: inline-flex;
  gap: 14px;
  font-size: 1.125rem;
  font-weight: 600;
  border-bottom: 1px solid transparent;
  transition: border-color 200ms ease;
}
.contact__direct a span { color: var(--steel); font-weight: 400; min-width: 5.5em; }
.contact__direct a:hover { border-bottom-color: var(--brass); }

.form {
  display: grid;
  gap: 18px;
  padding: clamp(22px, 3vw, 36px);
  border-radius: 30px;
  background: var(--graphite);
}
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form label { display: grid; gap: 8px; font-size: 0.875rem; font-weight: 500; color: var(--steel); }
.form input, .form select, .form textarea {
  width: 100%;
  font: inherit;
  font-size: 1rem;
  color: var(--paper);
  background: var(--black);
  border: 1px solid var(--iron);
  border-radius: 14px;
  padding: 13px 15px;
  transition: border-color 200ms ease;
}
.form select {
  appearance: none;
  padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%238e8e93' stroke-width='1.6' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
}
.form textarea { resize: vertical; min-height: 120px; }
.form input:focus, .form select:focus, .form textarea:focus { outline: none; border-color: var(--brass); }
.form [aria-invalid="true"] { border-color: #ff6b5e; }
.form__note { min-height: 1.4em; font-size: 0.875rem; color: var(--steel); }

/* ---------- Footer ---------- */
.footer { padding: 28px 0 40px; color: var(--steel); font-size: 0.875rem; }
.footer__row { display: flex; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap; }

/* ---------- Player (modal, centered) ---------- */
.player {
  width: 100%;
  height: 100%;
  max-width: 100vw;
  max-height: 100vh;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--paper);
}
.player::backdrop {
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}
.player[open] { display: grid; place-items: center; }
.player__inner {
  display: grid;
  justify-items: center;
  gap: 16px;
  padding: 20px;
  transition: transform 320ms var(--ease-out), opacity 240ms ease;
}
@starting-style {
  .player[open] .player__inner { transform: scale(0.96); opacity: 0; }
}
.player__frame {
  overflow: hidden;
  border-radius: var(--r-frame);
  background: #000;
}
.player__frame video { max-width: min(1100px, 92vw); max-height: 76vh; width: auto; }
.player__foot { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; justify-content: center; }
.player__title { font-weight: 600; }
.player__close {
  position: fixed;
  top: 18px;
  right: 18px;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  cursor: pointer;
  transition: background-color 200ms ease, transform 160ms var(--ease-out);
}
.player__close svg { width: 20px; height: 20px; stroke: var(--paper); stroke-width: 2; }
.player__close:hover { background: rgba(255, 255, 255, 0.2); }
.player__close:active { transform: scale(0.94); }

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .included { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 44px; }
  .steps li:nth-child(2)::before { display: none; }
  .contact__grid { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  :root { --r-frame: 20px; --bar-h: 96px; }
  .bar__links { display: none; }
  .bar__row { height: 56px; }
  .brand__name { font-size: 0.9375rem; }
  .brand__mark { width: 22px; height: 22px; }
  .bar__row { gap: 16px; }
  .timeline { grid-template-columns: 126px 1fr; gap: 10px; }
  .timeline__tc { display: none; }

  .hero__lede { font-size: 1.0625rem; }
  .hero__ctas { width: 100%; }
  .hero__ctas .btn { flex: 1; }
  .hero__reel .frame { border-radius: 22px; }
  .hero__reel .frame__play { width: 54px; height: 54px; right: 14px; bottom: 14px; }

  .rail-nav { display: none; }
  .rail { gap: 12px; }
  /* On phones, width drives size so wide clips still fit */
  .rail .frame { height: auto; }
  .r-9x16 .frame { width: 68vw; }
  .r-4x5  .frame { width: 74vw; }
  .r-1x1  .frame { width: 78vw; }
  .r-16x9 .frame { width: 86vw; }

  .compare-layout { grid-template-columns: 1fr; }
  .compare { height: auto; width: min(100%, 420px); justify-self: center; }
  .compare-copy .btn { display: none; }

  .included { grid-template-columns: 1fr; gap: 28px; }
  .steps { grid-template-columns: 1fr; row-gap: 32px; }
  .steps li::before { display: none; }
  .form__row { grid-template-columns: 1fr; }
}

@media (max-width: 340px) {
  .brand__name { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .line > span, .hero__reel { animation: none; }
  .hero__foot { animation: fade-in 300ms ease both; }
  .frame video, .frame:active, .clip { transition: none; }
  .frame:hover video { transform: none; }
  .player__inner { transition: opacity 200ms ease; }
  @starting-style { .player[open] .player__inner { transform: none; opacity: 0; } }
}

@media (prefers-reduced-transparency: reduce) {
  .bar { background: #000; backdrop-filter: none; -webkit-backdrop-filter: none; }
  .frame__play, .compare__tag { background: #1e1e20; backdrop-filter: none; -webkit-backdrop-filter: none; }
}
