/* ============================================================================
   afnanshams.com — Design System
   Near-black editorial canvas, crimson signal palette (#e4342f -> #ff6a4d),
   Plus Jakarta Sans body + Instrument Serif editorial voice.
   ========================================================================== */

:root {
  /* canvas — near-black with a warm cast */
  --bg: #0a0b0e;
  --bg-2: #101216;
  --panel: rgba(255, 255, 255, .035);
  --panel-2: rgba(255, 255, 255, .06);
  --line: rgba(255, 240, 238, .09);
  --line-2: rgba(255, 240, 238, .17);

  /* ink */
  --ink: #f6f3f2;
  --ink-2: rgba(246, 243, 242, .70);
  --ink-3: rgba(246, 243, 242, .44);

  /* signal — crimson worked through its own range */
  --tq: #e4342f;
  --tq-2: #ff8175;
  --tq-deep: #a3221d;
  --ember: #ff6a4d;
  --sand: #ffb08e;
  --rose: #ff7a6b;
  --on-tq: #220604;

  --disp: 'Instrument Serif', Georgia, serif;
  --body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --r: 20px;
  --max: 1180px;
  --ease: cubic-bezier(.16, 1, .3, 1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  overflow-x: clip;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.62;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  cursor: pointer;
  border: 0;
  background: none;
  color: inherit;
}

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

.wrap {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px;
}

.sec {
  position: relative;
  padding: 112px 0;
}

@media (max-width: 760px) {
  .sec {
    padding: 76px 0;
  }
}

main,
header,
footer {
  position: relative;
  z-index: 2;
}

/* ---------- ambience: soft light shafts + noise ---------- */
.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9998;
  opacity: .045;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='.6'/%3E%3C/svg%3E");
}

.ambient {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.shaft {
  position: absolute;
  top: -30%;
  width: 46vw;
  height: 150vh;
  filter: blur(60px);
  opacity: .5;
  transform-origin: top center;
  will-change: transform;
}

.shaft.s1 {
  left: -14vw;
  background: linear-gradient(180deg, rgba(228, 52, 47, .26), transparent 62%);
  transform: rotate(13deg);
  animation: sway1 26s ease-in-out infinite alternate;
}

.shaft.s2 {
  right: -16vw;
  top: -10%;
  background: linear-gradient(180deg, rgba(255, 106, 77, .20), transparent 60%);
  transform: rotate(-11deg);
  animation: sway2 32s ease-in-out infinite alternate;
}

.shaft.s3 {
  left: 32vw;
  top: 22%;
  width: 38vw;
  background: linear-gradient(180deg, rgba(163, 34, 29, .16), transparent 58%);
  transform: rotate(5deg);
  animation: sway3 38s ease-in-out infinite alternate;
}

@keyframes sway1 {
  to {
    transform: rotate(7deg) translate3d(5vw, 4vh, 0) scaleY(1.1);
  }
}

@keyframes sway2 {
  to {
    transform: rotate(-5deg) translate3d(-5vw, 6vh, 0) scaleY(1.12);
  }
}

@keyframes sway3 {
  to {
    transform: rotate(-2deg) translate3d(3vw, -4vh, 0);
  }
}

.rules {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: .55;
  background-image: repeating-linear-gradient(180deg, var(--line) 0 1px, transparent 1px 132px);
  -webkit-mask-image: radial-gradient(ellipse 80% 55% at 50% 22%, #000, transparent 76%);
  mask-image: radial-gradient(ellipse 80% 55% at 50% 22%, #000, transparent 76%);
}

/* ---------- curtain ---------- */
#curtain {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity .28s var(--ease), visibility .28s;
}

#curtain.gone {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.curtain-mark {
  opacity: 0;
  animation: markIn .4s var(--ease) forwards;
  display: flex;
  justify-content: center;
}

@keyframes markIn {
  to {
    opacity: 1;
  }
}

.curtain-bar {
  width: 150px;
  height: 2px;
  background: var(--line-2);
  overflow: hidden;
  margin: 20px auto 0;
  border-radius: 2px;
}

.curtain-bar i {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--tq), var(--ember));
  animation: load .45s var(--ease) forwards;
}

@keyframes load {
  to {
    width: 100%;
  }
}

#progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  width: 0;
  z-index: 9999;
  background: linear-gradient(90deg, var(--tq), var(--ember) 70%, var(--sand));
  box-shadow: 0 0 14px rgba(228, 52, 47, .55);
}

#cursor {
  position: fixed;
  top: 0;
  left: 0;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 9997;
  border: 1px solid rgba(246, 243, 242, .5);
  transform: translate(-50%, -50%);
  transition: width .3s var(--ease), height .3s var(--ease), background .3s, border-color .3s;
  mix-blend-mode: difference;
  will-change: transform;
}

#cursor.big {
  width: 58px;
  height: 58px;
  background: rgba(246, 243, 242, .92);
  border-color: transparent;
}

@media (max-width: 1024px), (pointer: coarse) {
  #cursor {
    display: none;
  }
}

/* ---------- header ---------- */
header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 900;
  transition: all .4s var(--ease);
}

header .bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  max-width: var(--max);
  margin: 0 auto;
  padding: 22px 24px;
  transition: all .4s var(--ease);
}

header.stuck {
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  background: rgba(10, 11, 14, .82);
  border-bottom: 1px solid var(--line);
}

header.stuck .bar {
  padding: 13px 24px;
}

.logo {
  display: flex;
  align-items: center;
}

nav.links {
  display: flex;
  gap: 26px;
  margin-left: auto;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ink-2);
}

nav.links a {
  position: relative;
  padding: 5px 0;
  transition: color .25s;
}

nav.links a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  height: 1.5px;
  width: 0;
  background: var(--tq);
  transition: width .35s var(--ease);
}

nav.links a:hover,
nav.links a.here {
  color: #fff;
}

nav.links a:hover::after,
nav.links a.here::after {
  width: 100%;
}

.nav-cta {
  display: flex;
  align-items: center;
  gap: 12px;
}

@media (max-width: 1080px) {
  nav.links {
    display: none;
  }
}

@media (max-width: 600px) {
  header .bar {
    gap: 12px;
    padding: 16px 16px;
  }
  header.stuck .bar {
    padding: 12px 16px;
  }
  .wrap {
    padding: 0 18px;
  }
}

/* ---------- buttons ---------- */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 15px 26px;
  border-radius: 13px;
  font-weight: 700;
  font-size: 14.5px;
  letter-spacing: -.01em;
  transition: transform .28s var(--ease), box-shadow .32s var(--ease), background .3s, color .3s;
  overflow: hidden;
  white-space: nowrap;
}

.btn span {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 9px;
}

.btn-primary {
  background: var(--tq);
  color: #fff;
  box-shadow: 0 10px 30px -10px rgba(228, 52, 47, .85);
}

.btn-primary::before,
.btn-blue::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent 20%, rgba(255, 255, 255, .55), transparent 80%);
  transform: translateX(-120%);
  transition: transform .75s var(--ease);
}

.btn-primary:hover::before,
.btn-blue:hover::before {
  transform: translateX(120%);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 46px -12px rgba(228, 52, 47, 1);
}

.btn-blue {
  background: #2e7ce4;
  color: #fff;
  box-shadow: 0 10px 30px -10px rgba(46, 124, 228, .85);
}

.btn-blue:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 46px -12px rgba(46, 124, 228, 1);
}

.btn-ghost {
  border: 1px solid var(--line-2);
  color: #fff;
  background: rgba(255, 255, 255, .03);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, .08);
  border-color: rgba(255, 240, 238, .34);
  transform: translateY(-2px);
}

.btn-ember {
  background: var(--ember);
  color: #2a0906;
  box-shadow: 0 10px 30px -10px rgba(255, 106, 77, .8);
}

.btn-ember:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 46px -12px rgba(255, 106, 77, .95);
}

.btn-sm {
  padding: 11px 19px;
  font-size: 13px;
  border-radius: 11px;
}

.btn[disabled] {
  opacity: .5;
  pointer-events: none;
}

/* ---------- type ---------- */
h1, h2, h3, h4 {
  letter-spacing: -.02em;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 10px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--ink-3);
  max-width: 100%;
}

@media (max-width: 600px) {
  .eyebrow {
    font-size: 10px;
    letter-spacing: .13em;
  }
  .eyebrow::before {
    width: 18px;
  }
}

.eyebrow::before {
  content: '';
  width: 26px;
  height: 1.5px;
  background: var(--tq);
  flex: none;
  transform-origin: left;
  transform: scaleX(0);
  transition: transform .7s var(--ease) .1s;
}

.eyebrow.in::before,
.in .eyebrow::before {
  transform: scaleX(1);
}

.eyebrow .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ember);
  box-shadow: 0 0 0 0 rgba(255, 106, 77, .7);
  animation: pulse 2.4s infinite;
}

@keyframes pulse {
  70% {
    box-shadow: 0 0 0 9px rgba(255, 106, 77, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(255, 106, 77, 0);
  }
}

h2.sh {
  font-size: clamp(30px, 4.3vw, 52px);
  line-height: 1.08;
  font-weight: 800;
  letter-spacing: -.035em;
  margin: 18px 0 16px;
}

.say {
  font-family: var(--disp);
  font-weight: 400;
  font-style: italic;
  letter-spacing: -.015em;
}

.say.tq {
  color: var(--tq-2);
}

.say.em {
  color: var(--ember);
}

p.sub {
  color: var(--ink-2);
  font-size: clamp(15px, 1.5vw, 17.5px);
  max-width: 640px;
  line-height: 1.68;
}

.center {
  text-align: center;
}

.center p.sub {
  margin-left: auto;
  margin-right: auto;
}

.mark {
  display: inline;
  white-space: nowrap;
  background-image: linear-gradient(100deg, var(--tq), var(--ember));
  background-repeat: no-repeat;
  background-position: 0 54%;
  background-size: 0 1.06em;
  transition: background-size .75s var(--ease) .25s, color .4s var(--ease) .35s;
  padding: 0 .12em;
  margin: 0 -.06em;
  border-radius: 8px;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

h1.in .mark,
.in .mark {
  background-size: 100% 1.06em;
  color: #fff;
}

/* ---------- reveal system ---------- */
.rv {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .85s var(--ease), transform .85s var(--ease);
  transition-delay: var(--d, 0s);
}

#hero .rv,
.phero .rv {
  transition: opacity .45s var(--ease), transform .45s var(--ease);
}

.rv.in {
  opacity: 1;
  transform: none;
}

.rv-l {
  opacity: 0;
  transform: translateX(-32px);
  transition: opacity .9s var(--ease), transform .9s var(--ease);
  transition-delay: var(--d, 0s);
}

.rv-l.in {
  opacity: 1;
  transform: none;
}

.rv-r {
  opacity: 0;
  transform: translateX(32px);
  transition: opacity .9s var(--ease), transform .9s var(--ease);
  transition-delay: var(--d, 0s);
}

.rv-r.in {
  opacity: 1;
  transform: none;
}

.rv-s {
  opacity: 0;
  transform: scale(.95);
  transition: opacity .9s var(--ease), transform .9s var(--ease);
  transition-delay: var(--d, 0s);
}

.rv-s.in {
  opacity: 1;
  transform: none;
}

@media (max-width: 900px) {
  .rv-l,
  .rv-r {
    transform: translateY(24px);
  }
  .rv-l.in,
  .rv-r.in {
    transform: none;
  }
}

.mask-line {
  display: block;
  overflow: visible;
  padding-bottom: .08em;
}

@keyframes lineReveal {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.mask-line > i {
  display: inline-block;
  font-style: normal;
  animation: lineReveal .5s var(--ease) var(--d, 0s) both;
}

.in .mask-line > i,
.mask-line.in > i {
  transform: none;
}

/* ---------- generic card ---------- */
.card {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--panel);
  overflow: hidden;
  transition: border-color .35s, transform .4s var(--ease), background .35s;
}

.card::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity .4s;
  pointer-events: none;
  background: radial-gradient(340px circle at var(--mx, 50%) var(--my, 50%), rgba(228, 52, 47, .10), transparent 66%);
}

.card:hover {
  border-color: var(--line-2);
  transform: translateY(-5px);
  background: var(--panel-2);
}

.card:hover::before {
  opacity: 1;
}

.glyph {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  margin-bottom: 16px;
  background: linear-gradient(140deg, rgba(228, 52, 47, .24), rgba(255, 106, 77, .2));
  border: 1px solid var(--line-2);
}

.glyph svg {
  width: 18px;
  height: 18px;
  stroke: #fff;
  stroke-width: 1.7;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------- footer ---------- */
footer {
  border-top: 1px solid var(--line);
  padding: 60px 0 40px;
  background: rgba(255, 255, 255, .012);
}

.fgrid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 32px;
}

@media (max-width: 760px) {
  .fgrid {
    grid-template-columns: 1fr 1fr;
    gap: 28px;
  }
}

.fcol h5,
.fcol-title {
  font-size: 11px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 800;
  margin-bottom: 15px;
}

.fcol a {
  display: block;
  font-size: 14px;
  color: var(--ink-2);
  padding: 5px 0;
  transition: color .25s, transform .25s var(--ease);
}

.fcol a:hover {
  color: var(--tq-2);
  transform: translateX(3px);
}

.fbot {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 46px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  font-size: 12.5px;
  color: var(--ink-3);
}

/* ---------- drawer ---------- */
.burger {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid var(--line-2);
  background: rgba(255, 255, 255, .05);
  flex: 0 0 42px;
  position: relative;
  transition: background .25s, border-color .25s;
}

.burger:hover {
  background: rgba(255, 255, 255, .12);
}

.burger i {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 17px;
  height: 2px;
  margin: -1px 0 0 -8.5px;
  border-radius: 2px;
  background: #fff;
  transition: transform .4s var(--ease), opacity .25s;
}

.burger i:nth-child(1) {
  transform: translateY(-6px);
}

.burger i:nth-child(3) {
  transform: translateY(6px);
}

body.menu-open .burger i:nth-child(1) {
  transform: rotate(45deg);
}

body.menu-open .burger i:nth-child(2) {
  opacity: 0;
}

body.menu-open .burger i:nth-child(3) {
  transform: rotate(-45deg);
}

#scrim {
  position: fixed;
  inset: 0;
  z-index: 940;
  background: rgba(7, 8, 10, .74);
  backdrop-filter: blur(6px);
  opacity: 0;
  visibility: hidden;
  transition: opacity .45s var(--ease), visibility .45s;
}

body.menu-open #scrim {
  opacity: 1;
  visibility: visible;
}

#drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(420px, 92vw);
  z-index: 941;
  background: #0c0d11;
  border-left: 1px solid var(--line);
  overflow-y: auto;
  transform: translateX(102%);
  visibility: hidden;
  transition: transform .5s var(--ease), visibility 0s linear .5s;
  box-shadow: -40px 0 90px -30px rgba(0, 0, 0, .9);
}

body.menu-open #drawer {
  transform: none;
  visibility: visible;
  transition: transform .5s var(--ease), visibility 0s linear 0s;
}

.dr-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 24px;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  background: #0c0d11;
  z-index: 2;
}

.dr-close {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  border: 1px solid var(--line-2);
  position: relative;
  font-size: 0;
  color: var(--ink-2);
  transition: background-color .25s, border-color .25s, color .25s, transform .25s;
}

.dr-close::before,
.dr-close::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 15px;
  height: 1.8px;
  border-radius: 2px;
  background: currentColor;
}

.dr-close::before {
  transform: translate(-50%, -50%) rotate(45deg);
}

.dr-close::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.dr-close:hover {
  background: rgba(255, 255, 255, .1);
  color: #fff;
}

.dr-sec {
  padding: 24px;
}

.dr-sec + .dr-sec {
  border-top: 1px solid var(--line);
}

.dr-label {
  font-size: 10.5px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 800;
  margin-bottom: 14px;
}

.dr-links a {
  display: block;
  padding: 10px 0;
  font-size: 15px;
  color: var(--ink-2);
  transition: color .22s, transform .28s var(--ease);
}

.dr-links a:hover {
  color: #fff;
  transform: translateX(5px);
}

.dr-foot {
  padding: 22px 24px 34px;
  border-top: 1px solid var(--line);
}

.dr-foot .btn {
  width: 100%;
}

.dr-social {
  display: flex;
  gap: 9px;
  margin-top: 15px;
}

.dr-social a {
  flex: 1;
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 0;
  transition: background-color .25s, border-color .25s, color .25s, transform .25s;
}

.dr-social a:hover {
  color: #fff;
  border-color: var(--line-2);
  background: rgba(255, 255, 255, .05);
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001s !important;
    transition-duration: .001s !important;
  }
  .rv, .rv-l, .rv-r, .rv-s {
    opacity: 1;
    transform: none;
  }
  .mask-line > i {
    transform: none;
  }
}
