/* ================================================================
   budi.css — Main stylesheet for Budi Learning website
   ================================================================ */

/* ── TOKENS ── */
:root {
  --r:   #EC233D;
  --rd:  #C41831;
  --ink: #0F0A0A;
  --ink2:#3A3230;
  --mu:  #8C8480;
  --rule:#DDD8D3;
  --cr:  #F8F5F2;
  --wh:  #FFFFFF;
  --mx:  1100px;
  --g:   clamp(20px, 5vw, 64px);
}

/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 68px; }
body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--cr);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a   { color: inherit; text-decoration: none; }


/* ================================================================
   NAV
   ================================================================ */
#nav {
  position: sticky; top: 0; z-index: 200;
  height: 68px;
  background: var(--r);
  display: flex; align-items: center;
  transition: box-shadow .3s;
}
#nav.up { box-shadow: 0 2px 28px rgba(0,0,0,.22); }
.ni {
  width: 100%; max-width: var(--mx);
  margin: 0 auto; padding: 0 var(--g);
  display: flex; align-items: center; justify-content: space-between;
}
.nav-logo { height: 28px; width: auto; display: block; }
.nc {
  font-size: 13px; font-weight: 600;
  color: var(--r); background: #fff;
  padding: 9px 20px; border-radius: 7px;
  transition: .18s; white-space: nowrap;
}
.nc:hover { background: var(--cr); transform: translateY(-1px); }


/* ================================================================
   HERO  (section #hero — pinned, covered by #cover on scroll)
   ================================================================ */
#hero {
  min-height: calc(100svh - 68px);
  background: var(--r);
  display: flex; flex-direction: column;
  position: relative; overflow: hidden;
  /* hero stays in its natural stacking position; cover slides over it */
}

/* Decorative rings */
.ring {
  position: absolute; border-radius: 50%;
  border: 1px solid rgba(255,255,255,.1);
  pointer-events: none;
  top: 50%; right: clamp(-280px,-18vw,-60px);
  transform: translateY(-50%);
}
.r1 { width: clamp(360px,64vw,860px); height: clamp(360px,64vw,860px); }
.r2 { width: clamp(240px,44vw,600px); height: clamp(240px,44vw,600px); border-color: rgba(255,255,255,.07); }
.r3 { width: clamp(130px,24vw,360px); height: clamp(130px,24vw,360px); border-color: rgba(255,255,255,.05); }

/* Noise texture */
.noise {
  position: absolute; inset: 0; pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
  opacity: .032;
}

/* Hero inner content */
.hi {
  flex: 1; max-width: var(--mx); width: 100%;
  margin: 0 auto;
  padding: clamp(52px,8vh,96px) var(--g) clamp(28px,3vh,48px);
  display: flex; flex-direction: column; justify-content: center;
  position: relative; z-index: 2;
}

/* Headline */
.hh {
  font-family: 'Fraunces', serif;
  font-size: clamp(50px, 8.5vw, 112px);
  font-weight: 900; font-optical-sizing: auto;
  line-height: 1.03; letter-spacing: -.024em;
  color: #fff;
  margin-bottom: clamp(20px,3vh,34px);
  max-width: 600px;
}
.hh em { font-style: italic; font-weight: 700; color: rgba(252,248,2,.89); }

/* Shutter lines */
.shutter-line { display: block; overflow: hidden; }
.shutter-inner {
  display: block;
  transform: translateY(100%);
  transition: transform .72s cubic-bezier(.22,1,.36,1);
}
.shutter-line.phase1 .shutter-inner { transform: translateY(0); }
.shutter-line.open   .shutter-inner { transform: translateY(0); }
.shutter-line.delay-1 .shutter-inner { transition-delay: .08s; }
.shutter-line.delay-2 .shutter-inner { transition-delay: .16s; }
.shutter-line.delay-3 .shutter-inner { transition-delay: .28s; }
.shutter-line.delay-4 .shutter-inner { transition-delay: .36s; }

/* Sub-headline & CTA */
.hs {
  font-size: clamp(15px,1.7vw,18px); line-height: 1.73;
  color: #fff; max-width: 500px;
  margin-bottom: clamp(34px,5vh,58px);
}
.acts { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: clamp(52px,8vh,96px); }
.btn {
  display: inline-block; border: none; cursor: pointer;
  font-family: 'Inter', sans-serif; font-size: 14px; font-weight: 600;
  padding: 14px 30px; border-radius: 8px;
  transition: transform .18s, box-shadow .18s, background .18s;
  white-space: nowrap; text-align: center;
}
.btn:hover { transform: translateY(-2px); }
.bw { background: #fff; color: var(--r); }
.bw:hover { box-shadow: 0 8px 28px rgba(0,0,0,.2); }
.bo { background: transparent; color: #fff; border: 1.5px solid rgba(255,255,255,.32); }
.bo:hover { border-color: rgba(255,255,255,.68); background: rgba(255,255,255,.06); }

/* Ticker tape */
.tw {
  border-top: 1px solid rgba(255,255,255,.13);
  padding: 18px 0; overflow: hidden;
  position: relative; z-index: 2;
  mask-image: linear-gradient(90deg,transparent,#000 5%,#000 95%,transparent);
  -webkit-mask-image: linear-gradient(90deg,transparent,#000 5%,#000 95%,transparent);
}
.tt { display: flex; width: max-content; animation: tk 30s linear infinite; }
.tt:hover { animation-play-state: paused; }
@keyframes tk { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.ti {
  font-family: 'Fraunces', serif;
  font-size: clamp(12px,1.3vw,15px); font-weight: 300; font-style: italic;
  letter-spacing: .13em; color: #fff;
  padding: 0 clamp(20px,3vw,48px); white-space: nowrap;
}
.ti.dot {
  font-family: 'Inter', sans-serif; font-style: normal; font-weight: 700;
  font-size: clamp(10px,1vw,12px); letter-spacing: .22em; color: rgba(255,255,255,.55);
}


/* ================================================================
   COVER SECTION  (#cover — slides up over #hero on scroll)
   ================================================================ */
#cover {
  /* Same red background as hero */
  background: var(--r);
  /* Full viewport height, minus nav */
  min-height: calc(100svh - 68px);
  /* Stacks directly after hero in normal flow */
  position: relative;
  z-index: 100;
  display: flex; align-items: center; justify-content: center;
  /* The "slide-up cover" effect:
     We use a sticky wrapper technique — the section itself scrolls normally,
     but a fixed-position inner panel is revealed as we scroll into this section.
     Achieved via: section is position:sticky, top:0, so it pins to the top
     of the viewport as soon as it enters. Combined with the hero being a normal
     block above it, this gives the appearance of the red panel sliding up
     to swallow the hero. */
  position: sticky;
  top: 0;
  /* Cover must sit above hero while sliding */
  z-index: 150;
  overflow: hidden;
}

/* The heading inside cover */
.cover-inner {
  text-align: center;
  padding: var(--g);
  position: relative; z-index: 2;
}
.cover-heading {
  font-family: 'Fraunces', serif;
  font-size: clamp(40px, 7vw, 96px);
  font-weight: 900; font-optical-sizing: auto;
  line-height: 1.05; letter-spacing: -.024em;
  color: #fff;
}
.cover-heading em {
  font-style: italic; font-weight: 700;
  color: rgba(252,248,2,.89);
}

/* Cover noise (matches hero atmosphere) */
.cover-noise {
  position: absolute; inset: 0; pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
  opacity: .032;
}

/* Slide-up animation for the heading text */
.cover-heading-line { display: block; overflow: hidden; }
.cover-heading-inner {
  display: block;
  transform: translateY(60px);
  opacity: 0;
  transition: transform .8s cubic-bezier(.22,1,.36,1), opacity .6s ease;
}
#cover.cover-revealed .cover-heading-inner {
  transform: translateY(0);
  opacity: 1;
}
#cover.cover-revealed .cover-heading-line:nth-child(2) .cover-heading-inner {
  transition-delay: .1s;
}
#cover.cover-revealed .cover-heading-line:nth-child(3) .cover-heading-inner {
  transition-delay: .2s;
}


/* ================================================================
   STATEMENT
   ================================================================ */
#stmt {
  background: var(--ink);
  padding: clamp(80px,11vw,148px) var(--g);
  position: relative; overflow: hidden;
  /* Must sit above cover's sticky in the paint order */
  z-index: 200;
}
#stmt::after {
  content: ''; position: absolute;
  bottom: -150px; right: -100px;
  width: 440px; height: 440px; border-radius: 50%;
  background: radial-gradient(circle,rgba(236,35,61,.13) 0%,transparent 70%);
  pointer-events: none;
}
.si {
  max-width: var(--mx); margin: 0 auto;
  display: grid; grid-template-columns: 200px 1fr;
  gap: clamp(36px,7vw,96px); align-items: start;
}
.ss { position: sticky; top: 84px; padding-top: 4px; }
.slbl {
  font-size: 11px; font-weight: 600; letter-spacing: .18em;
  text-transform: uppercase; color: var(--r);
  display: block; margin-bottom: 18px;
}
.stag {
  font-family: 'Fraunces', serif; font-style: italic;
  font-size: clamp(14px,1.3vw,15px); font-weight: 300;
  color: #fff; line-height: 1.65;
}
.sls { display: flex; flex-direction: column; }
.sl { padding: clamp(32px,5vw,54px) 0; border-bottom: 1px solid rgba(255,255,255,.06); }
.sl:first-child { padding-top: 0; }
.sl:last-child  { border-bottom: none; }
.sn { font-size: 26px; font-weight: 500; color: #fff; letter-spacing: .1em; margin-bottom: 13px; display: block; }
.sh2 {
  font-family: 'Fraunces', serif;
  font-size: clamp(26px,4vw,52px); font-weight: 700;
  line-height: 1.1; letter-spacing: -.015em;
  color: #fff; margin-bottom: 13px;
}
.sh2 em { font-style: italic; font-weight: 300; color: rgba(252,248,2,.89); }
.sp { font-size: clamp(14px,1.3vw,15px); line-height: 1.78; color: rgba(255,255,255,.74); max-width: 530px; }


/* ================================================================
   CONTACT
   ================================================================ */
#contact {
  background: var(--cr);
  padding: clamp(80px,10vw,140px) var(--g);
  position: relative; z-index: 200;
}
#contact::before {
  content: ''; position: absolute;
  top: 0; left: var(--g); right: var(--g);
  height: 1px; background: var(--rule);
}
.coi {
  max-width: var(--mx); margin: 0 auto;
  display: grid; grid-template-columns: 1fr 1fr;
  gap: clamp(44px,8vw,104px); align-items: start;
}
.ce { font-size: 11px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: var(--r); display: block; margin-bottom: 18px; }
.ch {
  font-family: 'Fraunces', serif;
  font-size: clamp(38px,6vw,74px); font-weight: 900; font-optical-sizing: auto;
  line-height: 1.0; letter-spacing: -.025em;
  color: var(--ink); margin-bottom: clamp(16px,2.5vw,26px);
}
.ch em { font-style: italic; font-weight: 700; color: var(--r); }
.cb2 { font-size: clamp(14px,1.4vw,16px); line-height: 1.78; color: var(--ink2); margin-bottom: clamp(34px,4.5vw,50px); max-width: 380px; }
.cds { display: flex; flex-direction: column; gap: 20px; }
.cd2 { display: flex; gap: 14px; align-items: flex-start; }
.cdb { width: 2px; flex-shrink: 0; border-radius: 2px; background: var(--r); margin-top: 3px; min-height: 30px; }
.cdl { font-size: 10px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--mu); display: block; margin-bottom: 3px; }
.cdv { font-family: 'Fraunces', serif; font-size: clamp(16px,1.7vw,20px); font-weight: 700; color: var(--ink); line-height: 1.2; }
a.cdv:hover { color: var(--r); }

/* Form card */
.fc {
  background: var(--wh); border: 1px solid var(--rule);
  border-radius: 16px; padding: clamp(22px,3.5vw,40px);
  box-shadow: 0 4px 40px rgba(0,0,0,.06);
}
.fh { margin-bottom: 24px; padding-bottom: 20px; border-bottom: 1px solid var(--rule); }
.ft { font-family: 'Fraunces', serif; font-size: clamp(19px,2.2vw,26px); font-weight: 700; color: var(--ink); margin-bottom: 4px; }
.fs { font-size: 13px; color: var(--mu); }
.f  { margin-bottom: 14px; }
.f label { display: block; font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ink2); margin-bottom: 6px; }
.f input, .f select, .f textarea {
  width: 100%; padding: 12px 15px;
  border: 1.5px solid var(--rule); border-radius: 8px;
  background: var(--cr); font-family: 'Inter', sans-serif;
  font-size: 14px; color: var(--ink); outline: none;
  transition: border-color .18s, background .18s; appearance: none;
}
.f input::placeholder, .f textarea::placeholder { color: var(--mu); }
.f input:focus, .f select:focus, .f textarea:focus { border-color: var(--r); background: #fff; }
.f input.err, .f select.err { border-color: var(--r) !important; background: rgba(236,35,61,.04) !important; }
.f select {
  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='%238C8480' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center;
  background-color: var(--cr); padding-right: 36px; cursor: pointer;
}
.f select:focus { background-color: #fff; }
.f select option { background: var(--wh); color: var(--ink); }
.f textarea { resize: none; height: 88px; }
.f2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.fsub {
  width: 100%; padding: 15px;
  background: var(--r); color: #fff; border: none; border-radius: 8px;
  font-family: 'Inter', sans-serif; font-size: 15px; font-weight: 600;
  cursor: pointer; margin-top: 6px;
  transition: background .18s, transform .18s, box-shadow .18s;
}
.fsub:hover  { background: var(--rd); transform: translateY(-1px); box-shadow: 0 6px 24px rgba(236,35,61,.35); }
.fsub:active { transform: none; box-shadow: none; }
.fsub:disabled { opacity: .6; cursor: not-allowed; transform: none; box-shadow: none; }
.fn { font-size: 11px; color: var(--mu); text-align: center; margin-top: 10px; line-height: 1.6; }


/* ================================================================
   FOOTER
   ================================================================ */
footer { background: var(--ink); padding: clamp(34px,5vw,52px) var(--g); position: relative; z-index: 200; }
.fi {
  max-width: var(--mx); margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 24px;
}
.fl { display: flex; flex-direction: column; gap: 10px; }
.footer-brand { display: flex; align-items: center; gap: 14px; }
.footer-logo-wrap {
  background: var(--r); border-radius: 10px;
  width: 52px; height: 52px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.footer-logo-wrap img { height: 26px; width: auto; filter: brightness(0) invert(1); }
.footer-caption { font-family: 'Fraunces', serif; font-style: italic; font-size: 13px; font-weight: 300; color: rgb(255, 255, 255); line-height: 1.5; }
.footer-brand-label { display: inline-block; font-size: 10px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: var(--r); margin-bottom: 2px; }
.fc2 { font-size: 12px; color: rgb(255, 255, 255); margin-top: 6px; }
.sr  { display: flex; gap: 9px; }
.soc {
  width: 40px; height: 40px; border-radius: 9px;
  background: rgba(236, 5, 5, 0.06); border: 1px solid rgb(255, 255, 255);
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,.38); transition: .18s;
}
.soc:hover { background: var(--r); color: #fff; border-color: var(--r); transform: translateY(-2px); }


/* ================================================================
   TOAST
   ================================================================ */
.toast {
  position: fixed; bottom: 24px; left: 50%;
  transform: translateX(-50%) translateY(14px);
  background: var(--ink); color: var(--wh);
  padding: 13px 24px; border-radius: 100px;
  font-size: 13px; font-weight: 600;
  border-left: 3px solid var(--r);
  box-shadow: 0 8px 32px rgba(255, 255, 255, 0.38);
  opacity: 0; pointer-events: none; white-space: nowrap; z-index: 999;
  transition: opacity .32s, transform .32s;
}
.toast.on { opacity: 1; transform: translateX(-50%) translateY(0); }


/* ================================================================
   SCROLL REVEAL (stmt + contact)
   ================================================================ */
.rv { opacity: 0; transform: translateY(22px); transition: opacity .65s ease, transform .65s ease; }
.rv.in { opacity: 1; transform: none; }
.d1 { transition-delay: .1s; }
.d2 { transition-delay: .2s; }


/* ================================================================
   RESPONSIVE
   ================================================================ */
@media (max-width: 860px) {
  .si  { grid-template-columns: 1fr; gap: 28px; }
  .ss  { position: static; }
  .coi { grid-template-columns: 1fr; }
  .cb2 { max-width: none; }
  .fi  { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 520px) {
  h1.hh  { letter-spacing: -.012em; }
  .acts  { flex-direction: column; align-items: stretch; }
  .f2    { grid-template-columns: 1fr; }
  .r1, .r2, .r3 { display: none; }
}

/* ================================================================
   REDUCED MOTION
   ================================================================ */
@media (prefers-reduced-motion: reduce) {
  .shutter-inner             { transition: none; transform: translateY(0) !important; }
  .cover-heading-inner       { transition: none; transform: translateY(0) !important; opacity: 1 !important; }
  .rv                        { opacity: 1; transform: none; transition: none; }
  .tt                        { animation: none; }
}
