/* Shann Bernard — UGC portfolio.
   Neutral ground, one accent (--accent, injected from content.json). */

:root {
  --accent: #1552E0; /* overridden inline from content.json */
  --bg: #faf9f7;
  --surface: #ffffff;
  --ink: #14161a;
  --muted: #5b6169;
  --line: #e6e4de;
  --tint: #efece5;
  --dark: #0b0d10;
  --dark-line: rgb(255 255 255 / 14%);
  --dark-muted: #8b929c;
  /* Cobalt is too dark to read as text on near-black, so derive a lighter
     tint from whatever accent content.json sets. */
  --accent-light: color-mix(in srgb, var(--accent) 50%, white);
  --radius: 14px;
  --wrap: 1120px;
  color-scheme: light;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: Archivo, Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0;
}

p { margin: 0; }
img { max-width: 100%; height: auto; display: block; }

a { color: var(--accent); text-underline-offset: 3px; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.wrap { width: min(var(--wrap), 100% - 2.5rem); margin-inline: auto; }

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: #fff;
  padding: 0.75rem 1rem;
  z-index: 100;
}
.skip:focus { left: 0; }

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  padding: 0.8rem 1.35rem;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: filter 0.15s ease, transform 0.15s ease;
}
.btn:hover { filter: brightness(1.08); }
.btn:active { transform: translateY(1px); }

.btn--ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}
.btn--ghost:hover { border-color: var(--ink); filter: none; }

.btn--sm { padding: 0.5rem 0.95rem; font-size: 0.85rem; }
.btn--lg { padding: 1rem 1.75rem; font-size: 1.05rem; }

/* ---------- top bar ---------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--line);
}

.topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 62px;
}

.topbar__name {
  font-family: Archivo, sans-serif;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-decoration: none;
}

.topbar__nav {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.topbar__nav a:not(.btn) {
  display: none;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 500;
  text-decoration: none;
}
.topbar__nav a:not(.btn):hover { color: var(--ink); }

@media (min-width: 700px) {
  .topbar__nav a:not(.btn) { display: inline; }
}

/* ---------- hero ---------- */

.hero { padding: 3.5rem 0 3rem; }

.hero__inner { display: grid; gap: 2.5rem; }

.hero__eyebrow {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.9rem;
}

.hero__name {
  font-size: clamp(3.1rem, 11vw, 5.75rem);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 0.94;
  color: var(--ink);
}

/* Halftone dot screen inside the letterforms: a fine grid of background-
   coloured dots punched through solid ink, thinning along the diagonal.
   The fade is kept shallow on purpose — at the lightest corner the letters
   still need to clear contrast against the page. */
@supports ((background-clip: text) or (-webkit-background-clip: text)) {
  .hero__name {
    color: transparent;
    -webkit-text-fill-color: transparent;
    background-color: var(--ink);
    --dot-r: 0.6px;
    --dot-gap: 4px;
    background-image:
      radial-gradient(circle, var(--bg) var(--dot-r), transparent calc(var(--dot-r) + 0.1px)),
      linear-gradient(
        135deg,
        transparent 20%,
        color-mix(in srgb, var(--bg) 34%, transparent) 100%
      );
    background-size: var(--dot-gap) var(--dot-gap), 100% 100%;
    -webkit-background-clip: text;
    background-clip: text;
  }

  /* Sub-pixel dots do not render on a 1x display, where the screen would
     vanish into flat ink. Coarsen the grid so it still reads there. */
  @media (max-resolution: 1.5dppx) {
    .hero__name {
      --dot-r: 1px;
      --dot-gap: 5.5px;
    }
  }
}

/* Transparent text has no colour of its own, so high-contrast modes would
   render the name as nothing at all. */
@media (forced-colors: active) {
  .hero__name {
    color: CanvasText;
    -webkit-text-fill-color: CanvasText;
    background: none;
  }
}

.hero__rule {
  display: block;
  width: 84px;
  height: 5px;
  border-radius: 999px;
  background: var(--accent);
  margin-top: 1.4rem;
}

.hero__tagline {
  font-size: clamp(1.15rem, 3.5vw, 1.5rem);
  line-height: 1.35;
  font-weight: 500;
  margin-top: 1rem;
  max-width: 28ch;
}

.hero__niche {
  color: var(--muted);
  margin-top: 1rem;
  max-width: 42ch;
}

.hero__location {
  color: var(--muted);
  font-size: 0.92rem;
  margin-top: 0.5rem;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.85rem;
}

.hero__photo {
  position: relative;
  isolation: isolate;
}

/* Offset panel behind the portrait — the accent at low strength, so it
   reads as a printed block rather than a second brand color. */
.hero__photo::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  transform: translate(14px, 14px);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--accent) 14%, transparent);
}

.hero__photo img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center 22%;
  border-radius: var(--radius);
}

/* Only once the page margin is wide enough to hold the offset — below
   this the panel would push past the right edge. */
@media (min-width: 1200px) {
  .hero__photo::before { transform: translate(22px, 22px); }
}

@media (min-width: 860px) {
  .hero { padding: 5rem 0 4.5rem; }
  .hero__inner {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
    align-items: center;
    gap: 4rem;
  }
  .hero__photo img { aspect-ratio: 4 / 5; }
}

/* ---------- in-flow calls to action ---------- */

.cta-inline {
  text-align: center;
  margin-top: 4rem;
  padding-top: 3rem;
  border-top: 1px solid var(--line);
}

.cta-inline__line {
  font-family: Archivo, sans-serif;
  font-size: clamp(1.15rem, 3.5vw, 1.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 1.35rem;
}

/* ---------- hero socials ---------- */

.hero__socials {
  list-style: none;
  margin: 1.6rem 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 1.1rem;
}

.hero__socials a {
  display: inline-flex;
  gap: 0.4rem;
  align-items: baseline;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--line);
  padding-bottom: 2px;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.hero__socials a:hover { color: var(--accent); border-color: var(--accent); }
.hero__socials span { color: var(--muted); font-weight: 400; }
.hero__socials a:hover span { color: inherit; }

/* ---------- sections ---------- */

.section { padding: 3.5rem 0; }

.section__head { margin-bottom: 2.75rem; }

.section__eyebrow {
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.7rem;
}

.section__title {
  font-size: clamp(2rem, 6vw, 3.1rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  margin: 0;
}

@media (min-width: 860px) {
  .section { padding: 5rem 0; }
}

/* ---------- work samples ---------- */

.work {
  border-top: 1px solid var(--line);
  background: var(--tint);
}

.samples { display: grid; gap: 3.5rem; }

.sample { display: grid; gap: 1.5rem; }

@media (min-width: 860px) {
  .samples { gap: 5rem; }
  .sample {
    grid-template-columns: minmax(0, 0.7fr) minmax(0, 1fr);
    align-items: center;
    gap: 3rem;
  }
  .sample__body { max-width: 52ch; }
  /* Alternate which side the phone sits on. */
  .sample:nth-child(even) .sample__media { order: 2; }
}

.phone {
  width: min(268px, 74%);
  margin-inline: auto;
  padding: 9px;
  background: #17191d;
  border-radius: 2.4rem;
  box-shadow:
    0 28px 56px -22px rgb(20 22 26 / 52%),
    0 8px 18px -10px rgb(20 22 26 / 28%),
    0 0 0 1px rgb(20 22 26 / 6%);
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.sample:hover .phone {
  transform: translateY(-4px);
  box-shadow:
    0 36px 66px -22px rgb(20 22 26 / 55%),
    0 10px 22px -10px rgb(20 22 26 / 30%),
    0 0 0 1px rgb(20 22 26 / 6%);
}

/* Tilt the mockups against the alternating layout, straightening on hover.
   Desktop only — on a narrow screen the rotation eats horizontal room. */
@media (min-width: 860px) {
  .sample .phone { transform: rotate(-2.5deg); }
  .sample:nth-child(even) .phone { transform: rotate(2.5deg); }
  .sample:hover .phone { transform: rotate(0deg) translateY(-6px); }
}

/* Oversized ghost numeral sitting behind the blurb. */
.sample__body { position: relative; }
.sample__body > :not(.sample__index) { position: relative; z-index: 1; }

/* Reserve room above the brand line so the numeral overlaps whitespace
   rather than the text it is numbering. */
.sample__body { padding-top: clamp(1.5rem, 4vw, 2.75rem); }

.sample__index {
  position: absolute;
  z-index: 0;
  top: 0;
  left: -0.06em;
  transform: translateY(-0.62em);
  margin: 0;
  font-family: Archivo, sans-serif;
  font-size: clamp(3.5rem, 10vw, 6.5rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.05em;
  color: color-mix(in srgb, var(--accent) 13%, transparent);
  pointer-events: none;
  user-select: none;
}

.phone__screen {
  position: relative;
  aspect-ratio: 9 / 16;
  border-radius: 1.9rem;
  overflow: hidden;
  background: #000;
}

.phone__screen iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Click-to-play poster: no third-party frame loads until asked. */
.facade {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: #000;
  cursor: pointer;
  display: block;
}

.facade img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.facade__blank {
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, #23262c, #15171b);
}

.facade__play {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: grid;
  place-items: center;
  box-shadow: 0 6px 18px rgb(0 0 0 / 35%);
  transition: transform 0.18s ease;
}
.facade__play svg { margin-left: 3px; }
.facade:hover .facade__play { transform: translate(-50%, -50%) scale(1.08); }

.sample__brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.7rem;
}

.badge {
  text-transform: none;
  letter-spacing: 0;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 25%, transparent);
  border-radius: 999px;
  padding: 0.1rem 0.5rem;
  cursor: help;
}

.sample__title { font-size: clamp(1.3rem, 4vw, 1.65rem); font-weight: 700; }

.sample__format {
  color: var(--accent);
  font-size: 0.9rem;
  font-weight: 500;
  margin-top: 0.6rem;
}

.sample__concept { margin-top: 0.85rem; color: var(--ink); }

.sample__tools {
  margin-top: 0.85rem;
  font-size: 0.88rem;
  color: var(--muted);
}

.stats {
  display: flex;
  flex-wrap: wrap;
  gap: 1.75rem;
  margin: 1.25rem 0 0;
  padding-top: 1.1rem;
  border-top: 1px solid var(--line);
}
.stats__item { margin: 0; }
.stats dt {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--muted);
}
.stats dd {
  margin: 0.15rem 0 0;
  font-family: Archivo, sans-serif;
  font-size: 1.3rem;
  font-weight: 700;
}

/* ---------- about ---------- */

.about { border-top: 1px solid var(--line); }
.about__inner { display: grid; gap: 2.5rem; }
.about__body { max-width: 60ch; font-size: 1.05rem; }
.about__photos { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.about__photos img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: var(--radius);
}

/* An odd number of photos leaves the last one orphaned against dead space,
   so centre it instead. It keeps the same 3/4 crop as the pair above: these
   sources are 736x1600 exports with black bars baked in, and any slot
   narrower than the image itself puts those bars back on screen. */
.about__photos img:last-child:nth-child(odd) {
  grid-column: 1 / -1;
  width: 50%;
  justify-self: center;
}

@media (min-width: 860px) {
  .about__inner { grid-template-columns: minmax(0, 1fr) minmax(0, 0.8fr); gap: 4rem; align-items: center; }
}

/* ---------- rates ---------- */

.rates { border-top: 1px solid var(--line); }

.packages {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(255px, 1fr));
}

.package {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.75rem;
}

.package__name {
  font-size: 1.15rem;
  font-weight: 700;
}

.package__price {
  font-family: Archivo, sans-serif;
  font-size: 2rem;
  font-weight: 800;
  color: var(--accent);
  margin: 0.35rem 0 1.1rem;
  letter-spacing: -0.02em;
}

.package__includes {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.6rem;
  font-size: 0.95rem;
  color: var(--muted);
}
.package__includes li { padding-left: 1.4rem; position: relative; }
.package__includes li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
}

.rates__note {
  margin-top: 1.75rem;
  max-width: 60ch;
  font-size: 0.95rem;
  color: var(--muted);
}

/* ---------- contact ---------- */

.contact {
  background: var(--dark);
  color: #fff;
  text-align: center;
  padding: 5rem 0;
}

@media (min-width: 860px) {
  .contact { padding: 7rem 0; }
}

.contact .section__eyebrow { color: var(--accent-light); }
.contact .section__title { color: #fff; }
.contact__inner { max-width: 44rem; margin-inline: auto; }

/* A long address cannot shrink a fixed pill, so let it wrap and tighten
   the padding on the narrowest phones. */
.contact__email .btn {
  max-width: 100%;
  overflow-wrap: anywhere;
}

@media (max-width: 380px) {
  .contact__email .btn { padding: 0.9rem 1.1rem; font-size: 0.95rem; }
}
.contact .section__title { margin-bottom: 1.75rem; }
.contact__email { margin-bottom: 1.5rem; }

.contact__socials {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
}
.contact__socials a {
  display: inline-flex;
  gap: 0.45rem;
  align-items: baseline;
  color: #fff;
  text-decoration: none;
  border: 1px solid var(--dark-line);
  background: transparent;
  border-radius: 999px;
  padding: 0.6rem 1.1rem;
  font-weight: 600;
  font-size: 0.92rem;
  transition: border-color 0.2s ease, color 0.2s ease;
}
.contact__socials a:hover { border-color: var(--accent-light); color: var(--accent-light); }
.contact__socials span { color: var(--dark-muted); font-weight: 400; }
.contact__socials a:hover span { color: inherit; }
.contact :focus-visible { outline-color: var(--accent-light); }

/* ---------- footer ---------- */

.footer {
  background: var(--dark);
  border-top: 1px solid var(--dark-line);
  padding: 2rem 0 2.5rem;
  color: var(--dark-muted);
  font-size: 0.85rem;
}

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

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .facade:hover .facade__play { transform: translate(-50%, -50%); }
}

/* ---------- scrolled top bar ---------- */

.topbar { transition: box-shadow 0.25s ease, border-color 0.25s ease; }
.topbar.is-stuck {
  box-shadow: 0 6px 20px -14px rgb(20 22 26 / 45%);
  border-color: color-mix(in srgb, var(--line) 70%, var(--ink));
}

/* ---------- scroll reveal ----------
   The hidden state is applied only once JS confirms it can reveal again,
   so with no JS (or reduced motion) everything is simply visible. */

.js-reveal .reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s cubic-bezier(0.22, 0.61, 0.36, 1),
    transform 0.6s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.js-reveal .reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .js-reveal .reveal,
  .js-reveal .reveal.is-visible {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .sample:hover .phone { transform: rotate(-2.5deg); }
  .sample:nth-child(even):hover .phone { transform: rotate(2.5deg); }
}
