/* =========================================================
   buildyourapp.dev — Adesh Chaudhary
   Cool paper, navy ink, one electric accent.
   ========================================================= */

:root {
  --paper:  #F2F3F6;
  --card:   #FFFFFF;
  --ink:    #0F1724;
  --ink-2:  #4A5567;
  --ink-3:  #7C8699;
  --rule:   #DDE1E8;
  --rule-2: #C7CDD8;
  --go:     #1B4DFF;
  --go-dk:  #1038C8;
  --go-wash:#E8EDFF;
  --live:   #06694A;
  --live-w: #DCF2E9;

  --display: "Bricolage Grotesque", "Helvetica Neue", Arial, sans-serif;
  --text:    "Figtree", system-ui, -apple-system, sans-serif;

  --wrap: 1140px;
  --edge: clamp(20px, 5vw, 56px);
  --gap:  clamp(56px, 7vw, 96px);
}

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

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

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--text);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
::selection { background: var(--go); color: #fff; }
:focus-visible { outline: 3px solid var(--go); outline-offset: 2px; border-radius: 2px; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--edge); }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.skip {
  position: absolute; top: -200%; left: 16px; z-index: 300;
  background: var(--ink); color: #fff; padding: 12px 20px; border-radius: 6px;
  font-weight: 600; text-decoration: none;
}
.skip:focus { top: 14px; }

/* ---------- type ---------- */
h1, h2, h3 { font-family: var(--display); font-weight: 700; line-height: 1.04; letter-spacing: -0.025em; }

h1 { font-size: clamp(2.5rem, 5.6vw, 4.15rem); letter-spacing: -0.035em; }

.lead { font-size: clamp(1.85rem, 3.4vw, 2.7rem); }
.lead-say { color: var(--ink-2); max-width: 54ch; margin-top: 12px; font-size: 1.06rem; }

.say { font-size: clamp(1.05rem, 1.5vw, 1.16rem); color: var(--ink-2); max-width: 50ch; margin-top: 22px; }
.aside { font-size: 0.95rem; color: var(--ink-3); margin-top: 22px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--text); font-size: 1rem; font-weight: 600;
  padding: 15px 26px; border: 2px solid transparent; border-radius: 8px;
  text-decoration: none; cursor: pointer;
  transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
}
.btn-go { background: var(--go); color: #fff; box-shadow: 0 1px 0 var(--go-dk); }
.btn-go:hover { background: var(--go-dk); }
.btn-quiet { border-color: var(--rule-2); color: var(--ink); }
.btn-quiet:hover { border-color: var(--ink); background: var(--card); }
.btn-tight { padding: 10px 18px; font-size: 0.94rem; }
.btn-wide { width: 100%; margin-top: 8px; }
.acts { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
@media (max-width: 520px) { .acts { display: grid; grid-template-columns: 1fr; } }

/* ---------- top bar ---------- */
.bar { position: sticky; top: 0; z-index: 100; background: rgba(242, 243, 246, 0.9); backdrop-filter: blur(10px); border-bottom: 1px solid var(--rule); }
.bar-in { display: flex; align-items: center; gap: 30px; min-height: 66px; }
.me { display: flex; align-items: center; gap: 10px; margin-right: auto; text-decoration: none; font-size: 1rem; }
.me img { border-radius: 7px; }
.bar-nav { display: flex; gap: 26px; }
.bar-nav a { text-decoration: none; color: var(--ink-2); font-size: 0.97rem; font-weight: 500; }
.bar-nav a:hover { color: var(--go); }
@media (max-width: 820px) {
  .bar-nav { display: none; }
  .bar-in { gap: 14px; min-height: 58px; }
  .me b { font-size: 0.95rem; white-space: nowrap; }
  .btn-tight { padding: 9px 14px; font-size: 0.88rem; white-space: nowrap; }
}
@media (max-width: 380px) { .me b { display: none; } }

/* ---------- hero ---------- */
.hero { padding: clamp(44px, 6vw, 84px) 0 var(--gap); }
.hero-in { display: grid; grid-template-columns: 1.08fr 0.92fr; gap: clamp(32px, 5vw, 72px); align-items: center; }

.hero-show { position: relative; }
.hero-show img {
  width: 100%; border-radius: 18px; border: 1px solid var(--rule);
  box-shadow: 0 24px 60px -28px rgba(15, 23, 36, 0.4);
}
.hero-show figcaption {
  margin-top: 14px; font-size: 0.9rem; color: var(--ink-3);
  display: flex; align-items: center; gap: 8px;
}
.hero-show figcaption::before {
  content: ""; width: 8px; height: 8px; border-radius: 50%;
  background: var(--live); flex: none;
}

@media (max-width: 900px) {
  /* Headline first. A visitor must know what this is before they see a screenshot. */
  .hero-in { grid-template-columns: 1fr; gap: 34px; }
  .hero-show { max-width: 420px; }
  .hero-show img { max-height: 56vh; object-fit: cover; object-position: top center; }
}

/* entrance: one orchestrated moment, then nothing automatic */
.hero-say > *, .hero-show { opacity: 0; transform: translateY(14px); }
body.ready .hero-say > *, body.ready .hero-show {
  opacity: 1; transform: none;
  transition: opacity 0.6s cubic-bezier(.2,.7,.3,1), transform 0.6s cubic-bezier(.2,.7,.3,1);
}
body.ready .hero-say > *:nth-child(1) { transition-delay: 0.04s; }
body.ready .hero-say > *:nth-child(2) { transition-delay: 0.12s; }
body.ready .hero-say > *:nth-child(3) { transition-delay: 0.2s; }
body.ready .hero-say > *:nth-child(4) { transition-delay: 0.26s; }
body.ready .hero-show { transition-delay: 0.16s; transition-duration: 0.75s; }
body.still .hero-say > *, body.still .hero-show { transition: none !important; }

/* ---------- router ---------- */
.router { padding: var(--gap) 0; border-top: 1px solid var(--rule); }
.routes { margin-top: 36px; border-top: 1px solid var(--rule-2); }

.route { border-bottom: 1px solid var(--rule-2); padding: 30px 0; }
.route-top { display: flex; align-items: baseline; gap: 20px; flex-wrap: wrap; }
.route-top h3 { font-size: clamp(1.3rem, 2.2vw, 1.75rem); flex: 1 1 340px; }
.route-price { font-family: var(--display); font-size: 1.5rem; font-weight: 700; white-space: nowrap; }
.route-price span { font-family: var(--text); font-size: 0.85rem; font-weight: 500; color: var(--ink-3); margin-right: 5px; }
.route-say { color: var(--ink-2); max-width: 62ch; margin-top: 10px; }

.more { margin-top: 16px; }
.more > summary {
  display: inline-flex; align-items: center; gap: 9px;
  font-weight: 600; color: var(--go); cursor: pointer; list-style: none;
  padding: 7px 0; font-size: 0.99rem;
}
.more > summary::-webkit-details-marker { display: none; }
.more > summary::before {
  content: ""; width: 19px; height: 19px; flex: none; border-radius: 50%;
  border: 2px solid currentColor;
  background:
    linear-gradient(currentColor, currentColor) center / 9px 2px no-repeat,
    linear-gradient(currentColor, currentColor) center / 2px 9px no-repeat;
  transition: transform 0.22s cubic-bezier(.3,.7,.3,1);
}
.more[open] > summary::before { transform: rotate(135deg); }
.more > summary:hover { color: var(--go-dk); }

.more-in { padding-top: 18px; animation: unfold 0.3s cubic-bezier(.2,.7,.3,1); }
@keyframes unfold { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .more-in { animation: none; } }

.free { color: var(--ink-2); max-width: 64ch; margin-bottom: 18px; }

/* rate tables */
.rates { width: 100%; border-collapse: collapse; background: var(--card); border: 1px solid var(--rule); border-radius: 10px; overflow: hidden; }
.rates th, .rates td { text-align: left; padding: 13px 16px; border-bottom: 1px solid var(--rule); vertical-align: top; font-size: 0.95rem; }
.rates thead th { background: var(--paper); font-weight: 600; font-size: 0.82rem; color: var(--ink-3); }
.rates tbody th { font-weight: 600; white-space: nowrap; }
.rates tbody th em { display: block; font-style: normal; font-weight: 500; font-size: 0.78rem; color: var(--go); }
.rates tr:last-child th, .rates tr:last-child td { border-bottom: 0; }
.rates .num { font-family: var(--display); font-weight: 700; white-space: nowrap; font-size: 1.02rem; }
.rates .num small { font-family: var(--text); font-weight: 500; font-size: 0.78rem; color: var(--ink-3); }
.rates .pick { background: var(--go-wash); }
.rates + .btn, .plain + .btn { margin-top: 20px; }

.plain { list-style: none; display: grid; gap: 9px; }
.plain li { position: relative; padding-left: 26px; color: var(--ink-2); }
.plain li::before {
  content: ""; position: absolute; left: 2px; top: 0.56em;
  width: 11px; height: 6px; border-left: 2px solid var(--go); border-bottom: 2px solid var(--go);
  transform: rotate(-45deg);
}

.terms { margin-top: 26px; color: var(--ink-3); font-size: 0.94rem; }

@media (max-width: 640px) {
  .rates, .rates tbody, .rates tr, .rates th, .rates td { display: block; width: 100%; }
  .rates thead { display: none; }
  .rates tr { border-bottom: 1px solid var(--rule-2); padding: 6px 0; }
  .rates th, .rates td { border: 0; padding: 5px 16px; }
  .rates tbody th { padding-top: 14px; font-size: 1.05rem; }
  .rates tr:last-child { border-bottom: 0; }
}

/* ---------- work reel ---------- */
.work { padding: var(--gap) 0 0; border-top: 1px solid var(--rule); }
.reel {
  margin-top: 32px; overflow-x: auto; overflow-y: hidden;
  scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch;
  /* without this, snapping ignores the lead-in padding and jumps the first card to the edge */
  scroll-padding-left: max(var(--edge), calc((100vw - var(--wrap)) / 2 + var(--edge)));
  scrollbar-width: none; cursor: grab;
}
.reel::-webkit-scrollbar { display: none; }
.reel.grabbing { cursor: grabbing; scroll-snap-type: none; }
.reel-in {
  display: flex; gap: 20px;
  padding-block: 4px 8px;
  padding-left: max(var(--edge), calc((100vw - var(--wrap)) / 2 + var(--edge)));
  padding-right: var(--edge);
  width: max-content;
}

.piece {
  width: 290px; flex: none; scroll-snap-align: start;
  background: var(--card); border: 1px solid var(--rule); border-radius: 14px; overflow: hidden;
  display: flex; flex-direction: column;
}
.piece img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; object-position: top center; border-bottom: 1px solid var(--rule); }
.noshot {
  aspect-ratio: 4 / 3; display: grid; place-items: center;
  background: var(--ink); border-bottom: 1px solid var(--rule);
}
.noshot span { font-family: var(--display); font-weight: 800; font-size: 1.9rem; color: var(--paper); letter-spacing: -0.02em; }
.piece figcaption { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 7px; flex: 1; }
.piece h3 { font-size: 1.17rem; }
.piece p { font-size: 0.93rem; color: var(--ink-2); line-height: 1.5; }
.piece .live {
  align-self: flex-start; background: var(--live-w); color: var(--live);
  font-size: 0.76rem; font-weight: 600; padding: 3px 9px; border-radius: 20px;
}
.piece figcaption a { margin-top: auto; padding-top: 8px; color: var(--go); font-weight: 600; font-size: 0.93rem; }

.nudge { margin-top: 16px; font-size: 0.88rem; color: var(--ink-3); }
@media (hover: none) { .nudge { display: none; } }

/* ---------- proof ---------- */
.proof { padding: var(--gap) 0; }
.proof-in {
  display: grid; grid-template-columns: 1.25fr 1fr; gap: clamp(28px, 4vw, 56px);
  align-items: start;
}
.proof blockquote { border-left: 4px solid var(--go); padding-left: 24px; }
.proof blockquote p { font-family: var(--display); font-weight: 500; font-size: clamp(1.15rem, 2vw, 1.45rem); line-height: 1.35; letter-spacing: -0.015em; }
.proof cite { display: block; margin-top: 14px; font-style: normal; font-size: 0.93rem; color: var(--ink-3); }
.check h3 { font-size: 1.12rem; }
.check ul { list-style: none; margin-top: 14px; display: grid; gap: 10px; }
.check li { padding-left: 26px; position: relative; }
.check li::before {
  content: ""; position: absolute; left: 2px; top: 0.55em;
  width: 11px; height: 6px; border-left: 2px solid var(--live); border-bottom: 2px solid var(--live);
  transform: rotate(-45deg);
}
.check a { color: var(--go); font-weight: 500; font-size: 0.97rem; }
@media (max-width: 820px) { .proof-in { grid-template-columns: 1fr; } }

/* ---------- about ---------- */
.about { padding: var(--gap) 0; border-top: 1px solid var(--rule); }
.about-in { display: grid; grid-template-columns: 1fr 0.88fr; gap: clamp(32px, 5vw, 72px); align-items: start; }
.about-say p { color: var(--ink-2); max-width: 54ch; margin-top: 16px; }
.roles { list-style: none; counter-reset: none; }
.roles li { padding: 18px 0; border-top: 1px solid var(--rule-2); }
.roles li:last-child { border-bottom: 1px solid var(--rule-2); }
.roles b { font-family: var(--display); font-size: 1.1rem; font-weight: 700; letter-spacing: -0.015em; }
.roles span { display: block; font-size: 0.88rem; color: var(--ink-3); margin-top: 2px; }
.roles p { font-size: 0.94rem; color: var(--ink-2); margin-top: 8px; }
@media (max-width: 820px) { .about-in { grid-template-columns: 1fr; } }

/* ---------- questions ---------- */
.qa { padding: var(--gap) 0; border-top: 1px solid var(--rule); }
.qa-list { margin-top: 28px; border-top: 1px solid var(--rule-2); max-width: 860px; }
.qa details { border-bottom: 1px solid var(--rule-2); }
.qa summary {
  cursor: pointer; list-style: none; padding: 19px 44px 19px 0; position: relative;
  font-weight: 600; font-size: 1.06rem;
}
.qa summary::-webkit-details-marker { display: none; }
.qa summary::after {
  content: ""; position: absolute; right: 8px; top: 50%; width: 11px; height: 11px;
  border-right: 2px solid var(--ink-3); border-bottom: 2px solid var(--ink-3);
  transform: translateY(-70%) rotate(45deg);
  transition: transform 0.22s cubic-bezier(.3,.7,.3,1), border-color 0.2s;
}
.qa details[open] summary::after { transform: translateY(-20%) rotate(-135deg); border-color: var(--go); }
.qa summary:hover { color: var(--go); }
.qa details p {
  padding: 0 20px 22px 0; color: var(--ink-2); max-width: 70ch;
  animation: unfold 0.28s cubic-bezier(.2,.7,.3,1);
}
@media (prefers-reduced-motion: reduce) { .qa details p { animation: none; } }

/* ---------- contact ---------- */
.talk { padding: var(--gap) 0; border-top: 1px solid var(--rule); }
.talk-in { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 5vw, 64px); align-items: start; }
.talk-say p { color: var(--ink-2); max-width: 46ch; margin-top: 16px; }
.ways { list-style: none; margin-top: 26px; display: grid; gap: 12px; }
.ways a { color: var(--go); font-weight: 600; }

.ask { background: var(--card); border: 1px solid var(--rule); border-radius: 14px; padding: 24px; }
.ask-note { font-size: 0.93rem; color: var(--ink-3); margin-bottom: 18px; }
.field { margin-bottom: 14px; }
.field label { display: block; font-weight: 600; font-size: 0.9rem; margin-bottom: 6px; }
.field label small { font-weight: 400; color: var(--ink-3); }
.ask input, .ask select, .ask textarea {
  width: 100%; font-family: var(--text); font-size: 1rem; color: var(--ink);
  background: var(--paper); border: 2px solid var(--rule-2); border-radius: 8px;
  padding: 11px 13px; transition: border-color 0.16s, background 0.16s;
}
.ask input:focus, .ask select:focus, .ask textarea:focus {
  outline: none; border-color: var(--go); background: var(--card);
}
.ask textarea { resize: vertical; min-height: 84px; }
.ask select { appearance: none; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, var(--ink-2) 50%), linear-gradient(135deg, var(--ink-2) 50%, transparent 50%);
  background-position: calc(100% - 20px) 52%, calc(100% - 14px) 52%;
  background-size: 6px 6px, 6px 6px; background-repeat: no-repeat;
}
@media (max-width: 820px) { .talk-in { grid-template-columns: 1fr; } }

/* ---------- footer ---------- */
.foot { border-top: 1px solid var(--rule); padding: 40px 0 120px; }
.foot-in { display: flex; flex-wrap: wrap; gap: 20px 40px; align-items: flex-start; justify-content: space-between; }
.foot p { font-size: 0.93rem; color: var(--ink-2); line-height: 1.55; }
.foot nav { display: flex; gap: 20px; flex-wrap: wrap; }
.foot nav a { font-size: 0.93rem; color: var(--ink-2); font-weight: 500; }
.foot nav a:hover { color: var(--go); }
.foot .small { width: 100%; color: var(--ink-3); font-size: 0.86rem; padding-top: 18px; border-top: 1px solid var(--rule); }

/* ---------- mobile dock ---------- */
.dock {
  position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 90;
  background: var(--go); color: #fff; text-decoration: none;
  border-radius: 12px; padding: 12px 18px;
  display: none; flex-direction: column; align-items: center;
  box-shadow: 0 10px 28px -8px rgba(27, 77, 255, 0.55);
  transition: transform 0.26s cubic-bezier(.2,.7,.3,1), opacity 0.2s;
}
.dock span { font-weight: 700; font-size: 1.02rem; }
.dock small { font-size: 0.78rem; opacity: 0.82; }
.dock.gone { transform: translateY(150%); opacity: 0; pointer-events: none; }
@media (max-width: 820px) { .dock { display: flex; } }
@media (prefers-reduced-motion: reduce) { .dock { transition: none; } }
