/* styles.css */

/* =========================
   TOKENS
========================= */
:root{
  --bg0:#05060a;
  --bg1:#07090c;
  --text: rgba(255,255,255,.90);

  /* Beam palette */
  --c0: rgba(248, 247, 245, 1);
  --c1: rgba(232, 222, 205, 1);
  --c2: rgba(245, 175, 105, 0.96);
  --c3: rgba(220, 140, 80, 0.78);
  --c4: rgba(185, 110, 60, 0.58);
  --c5: rgba(120, 95, 70, 0.25);
  --c6: rgba(95, 75, 55, 0.12);
  --c7: rgba(6, 16, 43, 0.06);
  --c8: rgba(6, 16, 43, 0.00);

  --beamOpacity: 0.88;
  --beamBlur: 16px;
}

::selection{
  background: rgba(180, 200, 255, 0.22);
  color: inherit;
}

::-moz-selection{
  background: rgba(180, 200, 255, 0.22);
  color: inherit;
}

*{ box-sizing:border-box; }
html, body{ height:100%; }

body{
  margin:0;
  font-family:"Plus Jakarta Sans", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background:
    radial-gradient(1200px 900px at 70% 40%, rgba(255,255,255,0.03), transparent 60%),
    radial-gradient(1000px 700px at 18% 80%, rgba(214,188,152,0.05), transparent 60%),
    linear-gradient(180deg, var(--bg0), var(--bg1));
  color: var(--text);
  overflow:hidden;
}

/* Subtle grain */
body::after{
  content:"";
  position:fixed;
  inset:0;
  pointer-events:none;
  background-image: repeating-linear-gradient(
    0deg,
    rgba(255,255,255,0.018),
    rgba(255,255,255,0.018) 1px,
    transparent 1px,
    transparent 3px
  );
  opacity:.09;
  mix-blend-mode: overlay;
}

.wrap{
  position:relative;
  height:100dvh;
  width:100%;
  /* keep as you have it (padding). If you truly want 0 padding, set padding:0; */
  padding:
    max(18px, env(safe-area-inset-top))
    max(18px, env(safe-area-inset-right))
    max(18px, env(safe-area-inset-bottom))
    max(18px, env(safe-area-inset-left));
}

/* Vignette */
.vignette{
  position:absolute;
  inset:-20%;
  pointer-events:none;
  background: radial-gradient(60% 60% at 70% 45%, transparent 35%, rgba(0,0,0,0.62) 100%);
}

/* ===== Beam (Desktop: left → right) ===== */
.beam-wrap{
  position:absolute;
  inset:0;
  pointer-events:none;
  opacity: var(--beamOpacity);

  /* Desktop beam emits from LEFT */
  transform: scaleX(-1);
  transform-origin: 50% 50%;
}

.beam-disk{
  position:absolute;
  left:50%;
  top: calc(50% - 1px);
  width: 140vmax;
  height: 140vmax;
  transform: translate(-50%, -50%);
  border-radius: 9999px;

  background: conic-gradient(
    from 90deg at 55% 50%,
    var(--c0) 0deg,
    var(--c1) 3.2deg,
    var(--c0) 4.0deg,
    var(--c2) 7.2deg,
    var(--c3) 9.6deg,
    var(--c4) 12deg,
    var(--c5) 18deg,
    var(--c6) 24deg,
    var(--c7) 45deg,
    var(--c8) 90deg,
    rgba(255,255,255,0) 360deg
  );
}

.beam-blur{
  filter: blur(var(--beamBlur));
  -webkit-mask-image: radial-gradient(circle at 60% 50%, transparent 0%, rgba(255,255,255,1) 20%);
  mask-image: radial-gradient(circle at 60% 50%, transparent 0%, rgba(255,255,255,1) 20%);
}

.flip-y{
  transform: translate(-50%, -50%) scaleY(-1);
}

/* Bright core line INSIDE the beam (this was missing in your file) */
.beam-core{
  position:absolute;
  left:50%;
  top: calc(50% - 1px);
  width: 140vmax;
  height: 140vmax;
  transform: translate(-50%, -50%);
  border-radius: 9999px;

  background: conic-gradient(
    from 90deg at 55% 50%,
    rgba(248,247,245,1) 0deg,
    rgba(248,247,245,0.82) 0.55deg,
    rgba(248,247,245,0.24) 1.05deg,
    rgba(248,247,245,0.00) 1.9deg,
    rgba(255,255,255,0.00) 360deg
  );

  mix-blend-mode: screen;
  opacity: 0.90;
}

.beam-core.blur{
  filter: blur(10px);
  opacity: 0.55;
}

/* ===== Content ===== */
.content{
  position:relative;
  z-index:2;
  height:100%;
  display:grid;
  grid-template-columns: 1fr 1fr;
  align-items:center;
  padding: clamp(18px, 3.6vw, 48px);
}

.right{
  justify-self:end;
  max-width: 550px;
  text-align:left;
  padding-right: clamp(0px, 1.2vw, 14px);
  margin-top: -24px;
}

.kicker{
  margin: 0 0 36px;
  font-size: 11px;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.42);
  font-weight: 400;
}

.title{
  margin: 0 0 14px -4px;
  font-family: "Cormorant Garamond", serif;
  font-weight: 500;
  letter-spacing: -0.01em;

  line-height: 1.08;
  padding-bottom: 0.10em;
  overflow: visible;

  font-size: clamp(46px, 6.2vw, 92px);

  /* low -> bright (subtle, compressed) */
  background: linear-gradient(
    270deg,
    rgba(255,255,255,0.22) 0%,
    rgba(255,255,255,0.26) 35%,
    rgba(255,255,255,0.65) 100%
  );
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;

  filter: drop-shadow(0 1px 0 rgba(0,0,0,0.35));
}

.subtitle{
  margin: 0;
  font-size: 15px;
  line-height: 1.55;
  color: rgba(255,255,255,0.50);
  max-width: 48ch;
  letter-spacing: 0.005em;
  text-transform: none;
}

/* Footer */
.footer{
  position:absolute;
  left: max(18px, env(safe-area-inset-left));
  bottom: max(14px, env(safe-area-inset-bottom));
  z-index:3;
  font-size: 12px;
  color: rgba(255,255,255,0.46);
  display:flex;
  align-items:center;
  gap: 6px;
  flex-wrap: wrap;
  text-wrap: nowrap;
  width: 100%;
}

.footer .sep{
  opacity: .70;
  font-size: 16px;
  line-height: 0;
  transform: translateY(-1px);
  display:inline-block;
}

.footer .brand{
  letter-spacing: .08em;
  color: rgba(255,255,255,0.46);
}

.footer a{
  color: rgba(255,255,255,0.46);
  text-decoration:none;
  padding-bottom: 2px;
}
.footer a:hover{
  color: rgba(255,255,255,0.60);
}

/* ===== Mobile: rotate beam to top → bottom + re-balance layout ===== */

/* Mobile-only shared gradient hook (inactive on desktop) */
.stack-clip{
  background: var(--stackGrad);
  background-size: var(--stackSize);
  background-position: var(--stackPos);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

@media (max-width: 820px){
  .right{
    --stackGrad: linear-gradient(
      180deg,
      rgba(255,255,255,0.18) 0%,
      rgba(255,255,255,0.26) 10%,
      rgba(255,255,255,0.72) 100%
    );
    --stackSize: 100% 140%;
    --stackPos: 50% 10%;
  }

  .kicker, .title, .subtitle{
    background: var(--stackGrad);
    background-size: var(--stackSize);
    background-position: var(--stackPos);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
  }

  /* Rotate the whole beam 90deg so it reads vertical */
  .beam-wrap{
    transform: rotate(90deg) scaleX(-1);
  }

  /* The wedge mask was tuned for desktop. After rotation, shift the mask center slightly
     so the vertical beam feels "centered" on phones. */
  .beam-blur{
    -webkit-mask-image: radial-gradient(circle at 50% 60%, transparent 0%, rgba(255,255,255,1) 20%);
    mask-image: radial-gradient(circle at 50% 60%, transparent 0%, rgba(255,255,255,1) 20%);
  }

  /* Layout: keep the text block centered, but not "bottom centered" */
  .content{
    grid-template-columns: 1fr;
    align-items: center;
    padding: 24px 18px;
  }

  .right{
    justify-self:center;
    text-align:center;
    padding-right: 0;
    margin-top: 0;

    /* Pull the text slightly upward so it sits in the calmer part of the beam */
    transform: translateY(-18px);
    max-width: 520px;
  }

  .kicker{ margin: 0 0 28px; font-weight: 400 !important}
  .title{ font-size: clamp(44px, 9vw, 74px); margin-bottom: 11px; margin-left: 0}
  .subtitle{ font-size: 15px; }

  /* Footer: center it on mobile (still compact) */
  .footer{
    left: 50%;
    transform: translateX(-50%);
    justify-content: center;
    text-align: center;
    text-wrap: nowrap;
    width: 100%;
  }
}

/* =========================
LIGHT MODE (colors only)
========================= */
@media (prefers-color-scheme: light){
  :root{
    /* Background */
    --bg0: #f6f3ee;
    --bg1: #efeae2;

    /* Default text */
    --text: rgba(10,12,16,0.88);

    /* Beam palette (softer + slightly smoky on light bg) */
    --c0: rgba(255, 255, 255, 0.92);
    --c1: rgba(245, 238, 226, 0.92);
    --c2: rgba(255, 191, 118, 0.85);
    --c3: rgba(238, 160, 92, 0.60);
    --c4: rgba(201, 120, 64, 0.40);
    --c5: rgba(150, 120, 98, 0.20);
    --c6: rgba(120, 105, 92, 0.12);
    --c7: rgba(70, 85, 115, 0.08);
    --c8: rgba(70, 85, 115, 0.00);

    /* beam tuning on light */
    --beamOpacity: 0.75;
    --beamBlur: 18px;
  }

  ::selection{
    background: rgba(10, 12, 16, 0.18); /* ink wash */
    color: inherit;
  }

  ::-moz-selection{
    background: rgba(10, 12, 16, 0.18);
    color: inherit;
  }

  body{
    color: var(--text);
    background:
      radial-gradient(1200px 900px at 70% 40%, rgba(0,0,0,0.03), transparent 60%),
      radial-gradient(1000px 700px at 18% 80%, rgba(255,170,90,0.08), transparent 60%),
      linear-gradient(180deg, var(--bg0), var(--bg1));
  }

  /* Grain: invert it (dark speckle, very subtle) */
  body::after{
    background-image: repeating-linear-gradient(
      0deg,
      rgba(0,0,0,0.020),
      rgba(0,0,0,0.020) 1px,
      transparent 1px,
      transparent 3px
    );
    opacity: .06;
    mix-blend-mode: multiply;
  }

  /* Vignette: gentle light vignette instead of black */
  .vignette{
    background: radial-gradient(60% 60% at 70% 45%, transparent 35%, rgba(255,255,255,0.55) 100%);
  }

  /* Desktop kicker/subtitle/footer become ink, not white */
  .kicker{ color: rgba(10,12,16,0.6); font-weight: 500 }
  .subtitle{ color: rgba(10,12,16,0.6); }

  .footer{
    color: rgba(10,12,16,0.52);
  }
  .footer .brand{ color: rgba(10,12,16,0.52); }
  .footer a{
    color: rgba(10,12,16,0.52);
  }
  .footer a:hover{
    color: rgba(10,12,16,0.9);
  }

  /* Title gradient: “low -> bright” but in light mode it's ink -> darker ink */
  .title{
    background: linear-gradient(
      90deg,
      rgba(10,12,16,0.55) 0%,
      rgba(10,12,16,0.62) 25%,
      rgba(10,12,16,0.92) 100%
    );
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;

    /* shadow becomes a whisper */
    filter: drop-shadow(0 1px 0 rgba(255,255,255,0.30));
  }

  /* Beam core line slightly less “white-hot” on paper */
  .beam-core{
    background: conic-gradient(
      from 90deg at 55% 50%,
      rgba(255,255,255,0.95) 0deg,
      rgba(255,255,255,0.70) 0.55deg,
      rgba(255,255,255,0.20) 1.05deg,
      rgba(255,255,255,0.00) 1.9deg,
      rgba(255,255,255,0.00) 360deg
    );
    opacity: 0.70;
  }
  .beam-core.blur{
    opacity: 0.45;
  }

  /* Mobile shared gradient (ink wash), only colors */
  @media (max-width: 820px){
    .right{
      --stackGrad: linear-gradient(
        180deg,
        rgba(10,12,16,0.48) 0%,
        rgba(10,12,16,0.62) 10%,
        rgba(10,12,16,0.92) 100%
      );
    }
  }
}