/* ==========================================================================
   Beyond Semantics
   --------------------------------------------------------------------------
   Palette comes from the logo artwork: #F52C50 sets the word BEYOND and
   #FE7664 sets SEMANTICS. The gradient between them is the site's one
   decorative device, used on the headline, the section numbers, the rules
   and the bullets, and nowhere else.

   Layout is a two column editorial rail: a narrow left column carrying the
   section number and label, a wide right column carrying the content.
   ========================================================================== */

/* ---------- Tokens ---------- */
:root {
  --brand:      #F52C50;
  --brand-2:    #FE7664;
  --grad:       linear-gradient(100deg, #F52C50 0%, #FE7664 100%);
  --brand-soft: rgba(245, 44, 80, .10);
  --brand-line: rgba(245, 44, 80, .34);

  /* Surfaces. Panels sit above the page, never below it. */
  --bg:         #0B0B12;
  --bg-2:       #13131D;
  --bg-3:       #1B1B28;

  /* Every one of these passes WCAG AA on --bg and --bg-2. */
  --ink:        #F7F7FA;
  --ink-2:      #BCBCCE;
  --ink-3:      #9494AC;
  --ink-4:      #81819A;

  --line:       rgba(255, 255, 255, .08);
  --line-2:     rgba(255, 255, 255, .16);

  --sans: "Manrope", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace;

  --wrap:     1240px;
  --rail:     14rem;
  --rail-gap: clamp(2rem, 5vw, 5rem);
  --radius:   14px;

  --pad:  clamp(4.5rem, 9vw, 8.5rem);
  --ease: cubic-bezier(.22, .61, .36, 1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 7rem;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.125rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
ul { list-style: none; padding: 0; }

::selection { background: var(--brand); color: #fff; }

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

/* ---------- Type ---------- */
h1, h2, h3, h4 {
  font-weight: 300;
  line-height: 1.1;
  letter-spacing: -.033em;
  text-wrap: balance;
}
h1 { font-size: clamp(2.75rem, 6.6vw, 5.25rem); font-weight: 200; letter-spacing: -.042em; }
h3 { font-size: clamp(1.375rem, 2.2vw, 1.75rem); letter-spacing: -.03em; }
h4 { font-size: 1.125rem; font-weight: 600; letter-spacing: -.012em; line-height: 1.4; }

p { text-wrap: pretty; }
strong { font-weight: 600; color: var(--ink); }

.lede {
  font-size: clamp(1.1875rem, 1.9vw, 1.4375rem);
  line-height: 1.55;
  color: var(--ink-2);
  font-weight: 300;
}

/* The gradient is the site's signature. Used sparingly and always on
   the same two brand colours. */
.grad-text {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.mono {
  font-family: var(--mono);
  font-size: .8125rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-3);
}

/* ---------- Layout ---------- */
.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }
section { padding-block: var(--pad); position: relative; }
.rule { border-top: 1px solid var(--line); }

.rail { display: grid; gap: 2.25rem var(--rail-gap); }
@media (min-width: 900px) { .rail { grid-template-columns: var(--rail) minmax(0, 1fr); } }

.rail-label { align-self: start; }
@media (min-width: 900px) { .rail-label { position: sticky; top: 7.5rem; } }

/* The section label is the anchor for each block: large, weighted, and
   underscored with the brand gradient. */
.rail-label .name {
  display: block;
  font-family: var(--sans);
  font-size: clamp(1.625rem, 2.6vw, 2.125rem);
  font-weight: 600;
  letter-spacing: -.035em;
  line-height: 1.1;
  text-transform: none;
  color: var(--ink);
}
.rail-label .name::after {
  content: "";
  display: block;
  width: 2.75rem; height: 3px;
  background: var(--grad);
  border-radius: 3px;
  margin-top: 1.1rem;
}

.rail-body > .lede { max-width: 46rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .6rem;
  padding: .95rem 1.75rem;
  border-radius: 999px;
  font-size: 1rem; font-weight: 600; letter-spacing: -.008em;
  white-space: nowrap;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease),
              border-color .25s var(--ease), background-color .25s var(--ease);
}
.btn .arw { width: .85em; height: .85em; flex: none; transition: transform .25s var(--ease); }
.btn:hover .arw { transform: translateX(4px); }

.btn-primary {
  background: var(--grad);
  color: #fff;
  box-shadow: 0 1px 0 rgba(255,255,255,.25) inset,
              0 10px 30px -12px rgba(245,44,80,.85);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 1px 0 rgba(255,255,255,.25) inset,
              0 18px 40px -12px rgba(245,44,80,1);
}

.btn-ghost { border: 1px solid var(--line-2); color: var(--ink); }
.btn-ghost:hover { border-color: var(--brand-line); background: var(--brand-soft); transform: translateY(-2px); }

.btn-row { display: flex; flex-wrap: wrap; gap: .85rem; align-items: center; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  border-bottom: 1px solid transparent;
  transition: background-color .3s var(--ease), border-color .3s var(--ease);
}
.site-header.is-stuck {
  background: rgba(11, 11, 18, .8);
  backdrop-filter: blur(18px) saturate(170%);
  -webkit-backdrop-filter: blur(18px) saturate(170%);
  border-bottom-color: var(--line);
}
.nav { display: flex; align-items: center; height: 5.25rem; gap: 1.25rem; }
.nav-logo img { width: 200px; }
.nav-links { display: flex; align-items: center; gap: 1.75rem; margin-left: auto; }
.nav-links a:not(.btn) {
  font-family: var(--mono); font-size: .8125rem; letter-spacing: .1em;
  text-transform: uppercase; color: var(--ink-3);
  transition: color .2s var(--ease);
}
.nav-links a:not(.btn):hover { color: var(--ink); }
.nav-sep { width: 1px; height: 1.25rem; background: var(--line-2); flex: none; }

@media (max-width: 720px) { .nav-links a:not(.btn), .nav-sep { display: none; } }
@media (max-width: 560px) {
  .nav { height: 4.5rem; }
  .nav-logo img { width: 150px; }
  .nav-links .btn { padding: .75rem 1.35rem; font-size: .9375rem; }
}

/* ---------- Hero ---------- */
.hero { padding-block: clamp(4rem, 9vw, 8rem) clamp(4.5rem, 9vw, 8rem); overflow: hidden; }
.hero-inner { position: relative; z-index: 2; }
.hero h1 { margin-block: 2rem 1.9rem; max-width: 16ch; }
.hero .lede { max-width: 40rem; margin-bottom: 2.75rem; }

.hero-tag {
  display: inline-flex; align-items: center; gap: .75rem;
  font-family: var(--mono); font-size: .8125rem; letter-spacing: .1em;
  text-transform: uppercase; color: var(--ink-2);
  border: 1px solid var(--brand-line);
  background: var(--brand-soft);
  border-radius: 999px;
  padding: .5rem 1.1rem;
}
.hero-tag::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: var(--brand-2); flex: none;
  animation: pulse 2.8s var(--ease) infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(254,118,100,.6); }
  70%  { box-shadow: 0 0 0 8px rgba(254,118,100,0); }
  100% { box-shadow: 0 0 0 0 rgba(254,118,100,0); }
}

/* Two glows rather than one, so the hero has a warm side and a cool side. */
.hero-glow {
  position: absolute; z-index: 0; pointer-events: none;
  top: -42%; right: -12%; width: 46rem; height: 46rem;
  background: radial-gradient(circle, rgba(245,44,80,.26) 0%, rgba(254,118,100,.09) 36%, transparent 64%);
}
.hero-glow-2 {
  position: absolute; z-index: 0; pointer-events: none;
  top: 16%; left: -16%; width: 30rem; height: 30rem;
  background: radial-gradient(circle, rgba(254,118,100,.12) 0%, rgba(245,44,80,.05) 40%, transparent 66%);
}
.hero-grid {
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    linear-gradient(to right,  rgba(255,255,255,.035) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 76px 76px;
  mask-image: radial-gradient(ellipse 72% 62% at 26% 20%, #000 5%, transparent 72%);
  -webkit-mask-image: radial-gradient(ellipse 72% 62% at 26% 20%, #000 5%, transparent 72%);
}
.hero-art {
  position: absolute; z-index: 0; pointer-events: none;
  top: 46%; right: -3vw; translate: 0 -50%;
  width: min(32vw, 25rem); aspect-ratio: 1; opacity: .06;
}
@media (max-width: 900px) { .hero-art { display: none; } }

/* ---------- Service blocks ---------- */
.svc { display: grid; gap: 1.25rem; }
.svc-row {
  display: grid; gap: 1rem 3rem;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(1.5rem, 3vw, 2.25rem);
  transition: border-color .3s var(--ease), background-color .3s var(--ease), transform .3s var(--ease);
}
@media (min-width: 900px) { .svc-row { grid-template-columns: minmax(0, 15rem) minmax(0, 1fr); } }
.svc-row:hover { border-color: var(--brand-line); background: var(--bg-3); transform: translateY(-2px); }
.svc-head h3 { color: var(--ink); }
.svc-body > p { color: var(--ink-2); max-width: 40rem; font-size: 1.0625rem; }
.svc-list { margin-top: 1.5rem; display: grid; gap: .7rem; }
@media (min-width: 620px) { .svc-list { grid-template-columns: 1fr 1fr; gap: .7rem 2rem; } }
.svc-list li {
  font-size: 1rem; color: var(--ink-3);
  padding-left: 1.4rem; position: relative;
}
.svc-list li::before {
  content: ""; position: absolute; left: 0; top: .68em;
  width: 9px; height: 2px; border-radius: 2px; background: var(--grad);
}

/* ---------- Experience cards ---------- */
.caps { display: grid; gap: 1rem; }
@media (min-width: 640px)  { .caps { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1040px) { .caps { grid-template-columns: repeat(3, 1fr); } }
.cap {
  position: relative; overflow: hidden;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.6rem 1.6rem 1.75rem;
  display: flex; flex-direction: column; gap: .55rem;
  transition: border-color .3s var(--ease), background-color .3s var(--ease), transform .3s var(--ease);
}
/* A gradient edge that lights up on hover. */
.cap::before {
  content: ""; position: absolute; inset: 0 auto 0 0; width: 2px;
  background: var(--grad); opacity: .45;
  transition: opacity .3s var(--ease);
}
.cap:hover { border-color: var(--brand-line); background: var(--bg-3); transform: translateY(-3px); }
.cap:hover::before { opacity: 1; }
.cap b { font-weight: 600; font-size: 1.0625rem; color: var(--ink); letter-spacing: -.012em; }
.cap span { font-size: .9688rem; color: var(--ink-3); line-height: 1.5; }

/* ---------- Contact ---------- */
/* No overflow:hidden here. It would make this section a scroll container,
   which changes how the sticky rail label resolves and pushes it out of
   alignment with the other sections. The ::before glow is inset:0, so it
   never overflows and needs no clipping. */
.contact { position: relative; border-top: 1px solid var(--line); }
.contact::before {
  content: ""; position: absolute; inset: 0; z-index: 0;
  background: radial-gradient(ellipse 55% 120% at 70% 110%, rgba(245,44,80,.16), transparent 68%);
}
.contact .wrap { position: relative; z-index: 1; }
.contact-email {
  display: inline-flex; align-items: center; gap: .8rem;
  font-size: clamp(1.5rem, 4vw, 2.75rem); font-weight: 200; letter-spacing: -.04em;
  line-height: 1.15; color: var(--ink); word-break: break-word;
  padding-bottom: .5rem;
  background-image: var(--grad);
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 100% 2px;
  transition: color .3s var(--ease), background-size .3s var(--ease);
}
.contact-email:hover { color: var(--brand-2); background-size: 100% 3px; }
.contact-email .arw { width: .5em; height: .5em; flex: none; transition: transform .25s var(--ease); }
.contact-email:hover .arw { transform: translate(4px, -4px); }

/* ---------- Footer ---------- */
.site-footer { padding-block: 2.75rem; border-top: 1px solid var(--line); }
.footer-bottom {
  display: flex; flex-wrap: wrap; gap: .6rem 1.5rem;
  justify-content: space-between; align-items: center;
  font-family: var(--mono); font-size: .75rem; letter-spacing: .08em;
  text-transform: uppercase; color: var(--ink-4);
}
.footer-bottom a { transition: color .2s var(--ease); }
.footer-bottom a:hover { color: var(--brand-2); }

/* ---------- Interior page hero (404) ---------- */
.page-hero { padding-block: clamp(3.5rem, 6vw, 5.5rem) clamp(2.5rem, 5vw, 4rem); position: relative; overflow: hidden; }
.page-hero-inner { position: relative; z-index: 1; max-width: 46rem; }
.page-hero h1 { font-size: clamp(2.4rem, 5.2vw, 3.9rem); margin-block: 1.4rem 1.4rem; }

/* ---------- Utilities ---------- */
.skip-link {
  position: absolute; left: 1rem; top: 1rem; z-index: 200;
  background: var(--bg-3); color: var(--ink); padding: .75rem 1.25rem;
  border: 1px solid var(--line-2); border-radius: 8px;
  transform: translateY(-180%); transition: transform .2s var(--ease);
}
.skip-link:focus { transform: none; }
.mt-lg { margin-top: clamp(2.5rem, 5vw, 3.5rem); }
