/* ============================================================
   apidaev — modern dark UI
   ============================================================ */

:root{
  /* Honey / bee palette on white */
  --bg:           #ffffff;
  --bg-2:         #fffaf0;
  --surface:      #fff7e6;
  --surface-2:    #fde9b6;
  --border:       rgba(146, 95, 17, .14);
  --border-2:     rgba(146, 95, 17, .28);

  --text:         #2a1d0a;   /* warm near-black */
  --text-dim:     #6b5325;
  --text-mute:    #a18653;

  --accent:       #f59e0b;   /* honey amber */
  --accent-2:     #d97706;   /* deep amber */
  --accent-3:     #facc15;   /* gold */
  --warn:         #b45309;

  --grad:         linear-gradient(90deg, var(--accent-3), var(--accent) 55%, var(--accent-2));
  --grad-soft:    linear-gradient(135deg, rgba(250,204,21,.22), rgba(245,158,11,.22) 60%, rgba(217,119,6,.22));

  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 22px;
  --shadow-1: 0 1px 0 rgba(255,255,255,.7) inset, 0 14px 36px -18px rgba(146,95,17,.22);
  --shadow-2: 0 1px 0 rgba(255,255,255,.8) inset, 0 28px 60px -28px rgba(245,158,11,.35);

  --max: 1200px;
  --pad: clamp(20px, 4vw, 36px);
}

*{ box-sizing: border-box }
html{ scroll-behavior: smooth; -webkit-text-size-adjust: 100% }
html, body{ margin:0; padding:0 }
body{
  font-family: 'Space Grotesk', system-ui, -apple-system, "Segoe UI", Inter, sans-serif;
  font-size: 17px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

/* ----------- Background canvas / ambient ----------- */
#bg-canvas{
  position: fixed; inset: 0; width: 100%; height: 100%;
  z-index: -2;
  background:
    radial-gradient(60% 50% at 85% 0%,  rgba(250,204,21,.18), transparent 60%),
    radial-gradient(50% 40% at 0%  18%, rgba(245,158,11,.16), transparent 65%),
    radial-gradient(40% 30% at 50% 100%, rgba(217,119,6,.10),  transparent 70%),
    var(--bg);
}

/* ----------- NAV ----------- */
.nav{
  position: fixed; inset: 0 0 auto 0;
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: 14px var(--pad);
  z-index: 20;
  background: transparent;
  transition: background .35s ease, backdrop-filter .35s ease, border-color .35s ease;
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled{
  background: rgba(255,250,240,.78);
  backdrop-filter: blur(14px) saturate(1.4);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  border-bottom-color: var(--border);
}
.nav__brand{
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 700; letter-spacing: -.01em; font-size: 1.05rem;
}
.nav__brand img{ width: 28px; height: 28px; border-radius: 6px }
.nav__links{ display: flex; align-items: center; gap: 6px }
.nav__links a{
  padding: 9px 14px; border-radius: 999px;
  font-weight: 500; color: var(--text-dim);
  transition: color .2s, background .2s;
}
.nav__links a:hover{ color: var(--text); background: rgba(255,255,255,.04) }
.nav__cta{
  background: var(--grad); color: #2a1d0a !important; font-weight: 600;
  box-shadow: 0 8px 24px -10px rgba(245,158,11,.45);
}
.nav__cta:hover{ filter: brightness(1.05) }

.nav__burger{ display: none; width: 40px; height: 40px; position: relative }
.nav__burger span{
  position: absolute; left: 8px; right: 8px; height: 2px; background: var(--text);
  border-radius: 2px; transition: transform .25s, opacity .25s, top .25s;
}
.nav__burger span:nth-child(1){ top: 12px }
.nav__burger span:nth-child(2){ top: 19px }
.nav__burger span:nth-child(3){ top: 26px }

/* ----------- HERO ----------- */
.hero{
  position: relative;
  min-height: 100vh;
  display: flex; align-items: center;
  padding: 120px var(--pad) 80px;
  overflow: hidden;
}
.hero__grid{
  position: absolute; inset: -10%;
  background-image:
    linear-gradient(rgba(146,95,17,.10) 1px, transparent 1px),
    linear-gradient(90deg, rgba(146,95,17,.10) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(60% 50% at 50% 40%, #000 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(60% 50% at 50% 40%, #000 30%, transparent 80%);
  z-index: -1;
  animation: drift 24s linear infinite;
}
@keyframes drift{
  0%   { transform: translate(0,0) }
  100% { transform: translate(56px,56px) }
}

.hero__inner{ max-width: 980px; margin: 0 auto; width: 100%; text-align: center }

.hero__eyebrow{
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px;
  border: 1px solid var(--border-2);
  background: rgba(255,255,255,.03);
  border-radius: 999px;
  font-size: .9rem; color: var(--text-dim);
  margin: 0 0 22px;
}
.hero__eyebrow .dot{
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 rgba(245,158,11,.7);
  animation: pulse 2s infinite;
}
@keyframes pulse{
  0%   { box-shadow: 0 0 0 0 rgba(245,158,11,.55) }
  70%  { box-shadow: 0 0 0 12px rgba(245,158,11,0) }
  100% { box-shadow: 0 0 0 0 rgba(245,158,11,0) }
}

.hero__title{
  font-size: clamp(2.2rem, 5.5vw, 4.6rem);
  line-height: 1.05;
  letter-spacing: -.025em;
  font-weight: 700;
  margin: 0 0 22px;
}
.grad{
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  background-size: 200% auto;
  animation: gradshift 6s linear infinite;
}
@keyframes gradshift{
  0%   { background-position: 0% 50% }
  100% { background-position: 200% 50% }
}

.hero__lede{
  font-size: clamp(1.05rem, 1.5vw, 1.2rem);
  color: var(--text-dim);
  max-width: 720px; margin: 0 auto 26px;
}
.hero__lede em{ color: var(--text); font-style: normal; font-weight: 600 }

.hero__typed{
  display: inline-flex; align-items: center;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: .98rem;
  color: var(--accent-2);
  background: rgba(245,158,11,.08);
  border: 1px solid rgba(245,158,11,.28);
  padding: 10px 16px; border-radius: 10px;
  margin: 0 0 32px;
  min-height: 44px;
}
.hero__typed .prompt{ color: var(--text-mute) }
.hero__typed .caret{ animation: blink 1s steps(1) infinite; color: var(--accent) }
@keyframes blink{ 50%{ opacity: 0 } }

.hero__ctas{ display: inline-flex; gap: 12px; flex-wrap: wrap; justify-content: center }

.btn{
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 22px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 1rem;
  transition: transform .15s ease, box-shadow .25s ease, background .25s ease;
}
.btn:active{ transform: translateY(1px) }
.btn--primary{
  background: var(--grad);
  color: #2a1d0a;
  box-shadow: 0 14px 30px -10px rgba(245,158,11,.45);
}
.btn--primary:hover{ box-shadow: 0 18px 40px -10px rgba(245,158,11,.6) }
.btn--ghost{
  border: 1px solid var(--border-2);
  color: var(--text);
  background: rgba(255,255,255,.02);
}
.btn--ghost:hover{ background: rgba(255,255,255,.05) }
.btn--block{ width: 100%; justify-content: center }

.hero__metrics{
  list-style: none; padding: 0; margin: 60px 0 0;
  display: flex; gap: 36px; justify-content: center; flex-wrap: wrap;
}
.hero__metrics li{
  display: flex; flex-direction: column; align-items: center; gap: 4px;
}
.hero__metrics b{
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 700;
}
.hero__metrics span{ font-size: .82rem; color: var(--text-mute); text-transform: uppercase; letter-spacing: .12em }

.hero__scroll{
  position: absolute; bottom: 22px; left: 50%; transform: translateX(-50%);
  font-family: 'JetBrains Mono', monospace; font-size: .78rem;
  color: var(--text-mute); letter-spacing: .2em; text-transform: uppercase;
  opacity: .8;
}
.hero__scroll span{ display: inline-block; margin-left: 6px; animation: bounce 2s infinite }
@keyframes bounce{
  0%, 100% { transform: translateY(0) }
  50%      { transform: translateY(4px) }
}

/* ----------- SECTIONS ----------- */
.section{ padding: clamp(70px, 9vw, 130px) 0 }
.section--alt{
  background:
    linear-gradient(180deg, transparent, rgba(255,255,255,.015) 10%, rgba(255,255,255,.015) 90%, transparent);
}
.container{ width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--pad) }

.section__tag{
  display: inline-block;
  font-family: 'JetBrains Mono', monospace;
  font-size: .82rem;
  color: var(--accent);
  margin: 0 0 14px;
  letter-spacing: .06em;
}
.section__title{
  font-size: clamp(1.8rem, 3.4vw, 2.6rem);
  line-height: 1.15; letter-spacing: -.02em;
  margin: 0 0 14px;
}
.section__sub{ color: var(--text-dim); max-width: 640px; margin: 0 }
.section__head{ text-align: center; margin: 0 auto 56px; max-width: 760px }
.section__head .section__sub{ margin: 8px auto 0 }

.two-col{
  display: grid; gap: 40px;
  grid-template-columns: 1fr 1fr;
  align-items: start;
}
.two-col h2{ margin-top: 0 }
.lede{ font-size: 1.1rem; color: var(--text-dim) }
.lede + p{ color: var(--text-dim) }

/* ----------- CARDS (expertise) ----------- */
.cards{
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}
.card{
  position: relative;
  padding: 28px 26px;
  background: linear-gradient(180deg, rgba(255,255,255,.025), rgba(255,255,255,.005));
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  transform-style: preserve-3d;
  transition: transform .2s ease, border-color .25s ease, box-shadow .25s ease;
}
.card::before{
  content: '';
  position: absolute; inset: -1px;
  border-radius: inherit;
  background: var(--grad-soft);
  opacity: 0; transition: opacity .35s ease;
  pointer-events: none;
  z-index: -1;
}
.card:hover{
  border-color: var(--border-2);
  box-shadow: var(--shadow-2);
}
.card:hover::before{ opacity: 1 }

.card__icon{
  width: 52px; height: 52px;
  display: grid; place-items: center;
  font-size: 26px;
  border: 1px solid var(--border-2);
  border-radius: 14px;
  background: rgba(255,255,255,.03);
  margin: 0 0 18px;
}
.card h3{ margin: 0 0 8px; font-size: 1.18rem; letter-spacing: -.01em }
.card p { margin: 0 0 16px; color: var(--text-dim); font-size: .98rem }
.card__chips{
  display: flex; flex-wrap: wrap; gap: 6px;
  list-style: none; padding: 0; margin: 0;
}
.card__chips li{
  font-family: 'JetBrains Mono', monospace;
  font-size: .74rem; letter-spacing: .04em;
  padding: 4px 9px;
  border-radius: 6px;
  background: rgba(255,255,255,.04);
  border: 1px solid var(--border);
  color: var(--text-dim);
}

/* ----------- PROCESS STEPS ----------- */
.steps{
  list-style: none; padding: 0; margin: 0;
  display: grid; gap: 18px;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}
.steps li{
  padding: 26px;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: rgba(255,255,255,.015);
  position: relative;
}
.steps__n{
  font-family: 'JetBrains Mono', monospace;
  font-size: .85rem; color: var(--accent);
  letter-spacing: .1em;
}
.steps h3{ margin: 6px 0 8px; font-size: 1.1rem }
.steps p { margin: 0; color: var(--text-dim); font-size: .96rem }

/* ----------- REALISATIONS ----------- */
.proj{
  display: grid; gap: 18px;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}
.proj__card{
  padding: 26px;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: linear-gradient(180deg, rgba(255,255,255,.025), rgba(255,255,255,.005));
  transition: transform .2s, border-color .25s;
}
.proj__card:hover{ transform: translateY(-3px); border-color: var(--border-2) }
.proj__meta{
  display: flex; justify-content: space-between; align-items: center;
  margin: 0 0 12px;
  font-family: 'JetBrains Mono', monospace; font-size: .8rem;
}
.proj__tag{
  padding: 3px 9px; border-radius: 6px;
  background: rgba(245,158,11,.12); color: var(--accent-2);
  border: 1px solid rgba(245,158,11,.32);
}
.proj__year{ color: var(--text-mute) }
.proj__card h3{ margin: 0 0 10px; font-size: 1.15rem }
.proj__card p { margin: 0 0 8px; color: var(--text-dim); font-size: .96rem }
.proj__link a{ color: var(--accent); font-weight: 500 }
.proj__link a:hover{ text-decoration: underline }

/* ----------- CONTACT ----------- */
.contact{
  display: grid; gap: 40px;
  grid-template-columns: 1fr 1.1fr;
  align-items: start;
}
.contact__list{
  list-style: none; padding: 0; margin: 24px 0 0;
  display: grid; gap: 12px;
}
.contact__list li{
  display: flex; justify-content: space-between; gap: 16px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: rgba(255,255,255,.015);
}
.contact__list span{ color: var(--text-mute); font-family: 'JetBrains Mono', monospace; font-size: .85rem }
.contact__list a{ color: var(--text); font-weight: 500 }
.contact__list a:hover{ color: var(--accent) }

.form{
  display: grid; gap: 14px;
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: linear-gradient(180deg, rgba(255,255,255,.025), rgba(255,255,255,.005));
  box-shadow: var(--shadow-1);
}
.form label{ display: grid; gap: 6px; font-size: .92rem; color: var(--text-dim) }
.form input, .form textarea, .form select{
  font: inherit;
  width: 100%;
  padding: 12px 14px;
  background: #ffffff;
  border: 1px solid var(--border-2);
  border-radius: 10px;
  color: var(--text);
  transition: border-color .15s, box-shadow .15s;
}
.form input:focus, .form textarea:focus, .form select:focus{
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(245,158,11,.18);
}
.form textarea{ resize: vertical; min-height: 120px }
.form__note{
  margin: 4px 0 0; font-size: .92rem;
  padding: 10px 12px; border-radius: 10px;
}
.form__note.is-ok{
  color: #2a1d0a; background: var(--accent); font-weight: 600;
}
.form__note.is-err{
  color: var(--text); background: rgba(180,83,9,.10); border: 1px solid rgba(180,83,9,.35);
}

/* ----------- FOOTER ----------- */
.foot{
  border-top: 1px solid var(--border);
  padding: 36px 0;
  color: var(--text-mute);
  font-size: .9rem;
}
.foot__inner{
  display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap;
}
.foot__build{ font-family: 'JetBrains Mono', monospace; font-size: .82rem }

/* ----------- REVEAL ANIMATIONS ----------- */
[data-reveal]{
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .8s cubic-bezier(.2,.7,.2,1), transform .8s cubic-bezier(.2,.7,.2,1);
  transition-delay: var(--reveal-delay, 0ms);
}
[data-reveal].is-in{ opacity: 1; transform: none }

@media (prefers-reduced-motion: reduce){
  *{ animation: none !important; transition: none !important }
  [data-reveal]{ opacity: 1; transform: none }
}

/* ----------- MOBILE ----------- */
@media (max-width: 860px){
  .two-col{ grid-template-columns: 1fr }
  .contact{ grid-template-columns: 1fr }
}
@media (max-width: 720px){
  .nav__links{
    position: fixed; inset: 64px 12px auto 12px;
    flex-direction: column; align-items: stretch;
    padding: 14px; gap: 4px;
    background: rgba(255,250,240,.96);
    backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    transform: translateY(-12px); opacity: 0; pointer-events: none;
    transition: transform .25s, opacity .25s;
  }
  .nav__links.is-open{ transform: none; opacity: 1; pointer-events: auto }
  .nav__links a{ padding: 12px 14px }
  .nav__burger{ display: block }

  .hero{ padding-top: 110px }
  .hero__metrics{ gap: 24px }
}
