/* websitesbyjp */
:root {
  --ink: #0E1726;
  --ink-2: #16223A;
  --ink-3: #1D2B47;
  --ink-4: #2A3A5C;
  --paper: #EEF1F6;
  --soft: #CBD3E1;
  --mute: #9AA6BD;
  --line: rgba(238, 241, 246, .12);
  --accent: #FF6B4A;
  --accent-ink: #2A0E06;
  --wa: #25D366;
  --r-card: 22px;
  --r-ctl: 12px;
  --f-display: "Syne", "Arial Black", sans-serif;
  --f-body: "Instrument Sans", system-ui, sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, monospace;
  --ease: cubic-bezier(.22, .8, .24, 1);
  --pad: clamp(20px, 5vw, 64px);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; -webkit-text-size-adjust: 100%; overflow-x: clip; }
body {
  margin: 0; background: var(--ink); color: var(--paper);
  font: 400 17px/1.6 var(--f-body);
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3 { margin: 0; font-weight: 700; }
p { margin: 0; }
.mono { font-family: var(--f-mono); }
.accent { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

/* fixed background environment */
.env { position: fixed; inset: 0; z-index: -1; pointer-events: none; }
.env-grid {
  position: absolute; inset: 0;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 72px 72px; opacity: .3;
  mask-image: radial-gradient(ellipse 70% 55% at 50% 40%, #000 10%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 70% 55% at 50% 40%, #000 10%, transparent 75%);
}
.env-glow {
  position: absolute; width: 70vmax; height: 70vmax; left: 50%; top: -28vmax; margin-left: -35vmax; border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 107, 74, .13), rgba(76, 125, 255, .1) 42%, transparent 66%);
  animation: drift 16s ease-in-out infinite alternate;
}
@keyframes drift { to { transform: translate(8vmax, 6vmax) scale(1.08); } }

/* nav */
.nav {
  position: fixed; inset: 0 0 auto; z-index: 50;
  display: flex; align-items: center; gap: 24px;
  padding: 16px var(--pad);
  transition: background .4s var(--ease), padding .4s var(--ease), border-color .4s;
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled { background: rgba(14, 23, 38, .82); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-color: var(--line); padding-block: 10px; }
.brand { display: inline-flex; align-items: center; gap: 4px; text-decoration: none; min-height: 44px; }
.brand-mark {
  font: 800 17px/1 var(--f-mono); letter-spacing: -.02em;
  background: var(--accent); color: var(--accent-ink); padding: 4px 7px 7px; border-radius: 8px;
}
.brand-word { font: 700 19px/1 var(--f-display); }
.nav-links { display: flex; gap: 28px; margin-left: auto; }
.nav-links a { text-decoration: none; color: var(--mute); font-size: 15px; transition: color .2s; }
.nav-links a:hover { color: var(--paper); }

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 26px; border-radius: var(--r-ctl); border: 0;
  background: var(--accent); color: var(--accent-ink);
  font: 600 16px/1 var(--f-body); text-decoration: none; cursor: pointer; white-space: nowrap;
  box-shadow: 0 10px 30px -12px rgba(255, 107, 74, .7);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), background .2s;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 0 0 6px rgba(255, 107, 74, .16), 0 16px 34px -12px rgba(255, 107, 74, .8); }
.btn:active { transform: translateY(0); }
.btn-sm { min-height: 44px; padding: 0 18px; font-size: 15px; }
.nav .btn-sm { margin-left: 8px; }
.btn-block { width: 100%; }
.btn-wa { background: var(--wa); color: #06210F; box-shadow: 0 10px 30px -12px rgba(37, 211, 102, .7); }
.btn-wa:hover { box-shadow: 0 0 0 6px rgba(37, 211, 102, .14), 0 16px 34px -12px rgba(37, 211, 102, .8); }
.btn-wa svg { width: 22px; height: 22px; fill: currentColor; }
.link-arrow {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px;
  font-weight: 600; text-decoration: none; border-bottom: 1px solid var(--line); transition: border-color .2s, gap .25s var(--ease);
}
.link-arrow:hover { border-color: var(--accent); gap: 12px; }

/* hero */
.hero {
  position: relative; min-height: 100svh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 104px var(--pad) 64px; max-width: 1440px; margin: 0 auto; overflow-x: clip;
}
.hero-center { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; text-align: center; }
.hero-center::before {
  content: ""; position: absolute; z-index: -1; inset: -12% -14%;
  background: radial-gradient(closest-side, rgba(14, 23, 38, .9), rgba(14, 23, 38, .6) 55%, transparent);
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font: 500 13px/1 var(--f-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--mute);
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 0 rgba(255, 107, 74, .6); animation: ping 2.4s infinite; }
@keyframes ping { 70% { box-shadow: 0 0 0 10px rgba(255, 107, 74, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 107, 74, 0); } }
.name { margin-top: 22px; font: 800 clamp(30px, 6vw, 96px)/1 var(--f-display); letter-spacing: -.04em; white-space: nowrap; text-shadow: 0 6px 40px rgba(14, 23, 38, .9); }
.name-num { font-family: var(--f-mono); letter-spacing: -.06em; margin-left: .04em; color: var(--accent); text-shadow: 0 0 46px rgba(255, 107, 74, .45); }
.hero-ctas { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 14px 28px; margin-top: 34px; }

/* floating screens: --mx/--my follow the mouse, --sp grows as you scroll past the hero */
.stage { position: absolute; inset: 0; perspective: 1200px; pointer-events: none; }
.scr {
  position: absolute;
  transform:
    translate3d(calc(var(--mx, 0) * var(--d) * 22px + var(--sx) * var(--sp, 0)), calc(var(--my, 0) * var(--d) * 16px + var(--sy) * var(--sp, 0)), 0)
    rotateY(calc(var(--mx, 0) * var(--d) * 7deg)) rotateX(calc(var(--my, 0) * var(--d) * -6deg)) rotate(var(--r));
  transition: transform 1s var(--ease);
}
.scr-in { animation: enter 1.1s var(--ease) both, bob var(--bob, 7s) ease-in-out infinite alternate; animation-delay: var(--in), calc(var(--in) + 1.1s); }
@keyframes enter { from { opacity: 0; transform: translateY(50px) scale(.9); } }
@keyframes bob { to { transform: translateY(-14px); } }
.s-browser { border-radius: 14px; overflow: hidden; background: var(--ink-3); border: 1px solid var(--line); box-shadow: 0 40px 80px -24px rgba(0, 0, 0, .75); }
.s-browser .bar { display: flex; align-items: center; gap: 6px; padding: 9px 12px; border-bottom: 1px solid var(--line); }
.s-browser .bar i { width: 8px; height: 8px; border-radius: 50%; background: var(--ink-4); }
.s-phone { aspect-ratio: 390 / 844; border-radius: 22px; padding: 5px; background: #070C14; box-shadow: 0 0 0 3px var(--ink-4), 0 40px 70px -20px rgba(0, 0, 0, .8); }
.s-phone img { width: 100%; height: 100%; object-fit: cover; object-position: top; border-radius: 17px; }

.scr-a { width: clamp(240px, 24vw, 350px); left: 2%; top: 15%; --r: -7deg; --d: 1.3; --sx: -180px; --sy: -90px; --in: .15s; --bob: 7s; }
.scr-b { width: clamp(240px, 24vw, 350px); right: 2%; bottom: 8%; --r: 6deg; --d: 1.1; --sx: 180px; --sy: 110px; --in: .3s; --bob: 8s; }
.scr-c { width: clamp(96px, 9.5vw, 140px); left: 13%; bottom: 5%; --r: 9deg; --d: 1.7; --sx: -140px; --sy: 140px; --in: .45s; --bob: 6s; }
.scr-d { width: clamp(96px, 9.5vw, 140px); right: 13%; top: 11%; --r: -9deg; --d: 1.5; --sx: 150px; --sy: -120px; --in: .6s; --bob: 6.5s; }

/* hero entrance */
.js .hero-center > * { opacity: 0; transform: translateY(22px); animation: rise .9s var(--ease) forwards; }
.js .hero-center > :nth-child(1) { animation-delay: .1s; }
.js .hero-center > :nth-child(2) { animation-delay: .25s; }
.js .hero-center > :nth-child(3) { animation-delay: .45s; }
@keyframes rise { to { opacity: 1; transform: none; } }

/* marquee */
.marquee { overflow: hidden; border-block: 1px solid var(--line); padding: 18px 0; background: rgba(22, 34, 58, .6); }
.marquee-track { display: flex; gap: 28px; width: max-content; animation: slide 34s linear infinite; }
.marquee span { font: 700 clamp(22px, 2.6vw, 34px)/1 var(--f-display); white-space: nowrap; }
.marquee i { font-style: normal; color: var(--accent); align-self: center; }
@keyframes slide { to { transform: translateX(-50%); } }

/* sections */
.section { padding: clamp(80px, 11vw, 150px) 0; }
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 var(--pad); }
.label { font: 500 13px/1 var(--f-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--accent); margin-bottom: 22px; }
.h2 { font: 800 clamp(28px, 3.7vw, 54px)/1.06 var(--f-display); letter-spacing: -.03em; max-width: 17em; }

/* reveal */
.js .reveal { opacity: 0; transform: translateY(30px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.js .reveal.is-in { opacity: 1; transform: none; }

/* work: each card is one link to the live site */
/* minmax(0, …) + min-width: 0 let cards shrink when the phone's text size is bumped up (Instagram's browser applies it) */
.projects { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(28px, 4vw, 56px); margin-top: 64px; }
.project { display: block; min-width: 0; text-decoration: none; color: inherit; border-radius: 18px; }
.project-top { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.project-top > div { min-width: 0; overflow-wrap: anywhere; }
.project-open { flex-shrink: 0; }
.project-name { font: 800 clamp(28px, 3vw, 42px)/1 var(--f-display); letter-spacing: -.03em; }
.project-type { margin-top: 8px; font-size: 13px; color: var(--mute); }
/* the newest site gets the full row */
.project-featured { grid-column: 1 / -1; }
.project-featured .project-name { font-size: clamp(34px, 4.4vw, 60px); }
.project-featured .project-shots { padding-right: 13%; }
.project-featured .mini-phone { right: 0; width: 19%; }
.project-open { display: inline-flex; gap: 6px; font-size: 14px; color: var(--mute); transition: color .2s, gap .25s var(--ease); }
.project:hover .project-open { color: var(--accent); gap: 10px; }
.project-shots { position: relative; padding: 0 0 44px 0; }
.browser { border-radius: 16px; overflow: hidden; background: var(--ink-3); border: 1px solid var(--line); box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .7); transition: transform .6s var(--ease); }
.browser-bar { display: flex; align-items: center; gap: 7px; padding: 11px 14px; border-bottom: 1px solid var(--line); }
.browser-bar i { width: 10px; height: 10px; border-radius: 50%; background: var(--ink-4); }
.browser-bar span { min-width: 0; margin-left: 12px; font-size: 12px; color: var(--mute); background: var(--ink); padding: 4px 12px; border-radius: 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini-phone {
  position: absolute; right: -14px; bottom: 0; width: 26%; aspect-ratio: 390 / 844;
  border-radius: 22px; padding: 5px; background: #070C14; overflow: hidden;
  box-shadow: 0 0 0 4px var(--ink-4), 0 30px 50px -16px rgba(0, 0, 0, .8);
  transition: transform .6s var(--ease);
}
.mini-phone img { width: 100%; height: 100%; object-fit: cover; object-position: top; border-radius: 17px; }
.project:hover .browser { transform: translateY(-6px); }
.project:hover .mini-phone { transform: translateY(-14px) rotate(-2deg); }

/* contact */
.contact { display: flex; flex-direction: column; align-items: center; text-align: center; }
.contact .h2 { margin-inline: auto; }
.contact-cta { display: flex; flex-direction: column; align-items: center; margin-top: 30px; }
.btn-lg { min-height: 62px; padding: 0 34px; font-size: 18px; }
.contact-num { margin-top: 16px; font-size: 14px; letter-spacing: .06em; color: var(--mute); }

/* footer */
.footer { border-top: 1px solid var(--line); padding: 56px 0 120px; }
.footer-grid { display: flex; justify-content: space-between; align-items: flex-start; gap: 32px; flex-wrap: wrap; }
.footer-line { color: var(--mute); margin-top: 10px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 4px 28px; }
.footer-links a { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; color: var(--mute); }
.footer-links a:hover { color: var(--paper); }
.footer-copy { margin-top: 32px; font-size: 12px; color: #7C88A0; }

/* whatsapp float */
.wa-float {
  position: fixed; right: 20px; bottom: 20px; z-index: 60;
  display: inline-flex; align-items: center; gap: 10px; min-height: 56px; padding: 0 22px 0 18px; border-radius: 999px;
  background: var(--wa); color: #06210F; font-weight: 600; text-decoration: none;
  box-shadow: 0 14px 34px -10px rgba(37, 211, 102, .6);
  opacity: 0; transform: translateY(20px) scale(.9); pointer-events: none;
  transition: opacity .4s var(--ease), transform .4s var(--ease);
}
.wa-float svg { width: 24px; height: 24px; fill: currentColor; }
.wa-float.is-on { opacity: 1; transform: none; pointer-events: auto; }

/* responsive */
@media (max-width: 900px) {
  .nav-links { display: none; }
  .nav .btn-sm { margin-left: auto; }
  .projects { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 700px) {
  .hero { justify-content: flex-start; min-height: 0; padding: 92px var(--pad) 72px; }
  .stage { position: relative; inset: auto; width: 100%; height: 240px; margin-bottom: 10px; }
  .scr { inset: auto; }
  .scr-a { width: 200px; left: -8%; top: 10px; }
  .scr-b { width: 200px; right: -8%; top: 92px; }
  .scr-c { display: none; }
  .scr-d { width: 92px; left: 50%; top: 14px; margin-left: -46px; --r: -5deg; }
  .name { font-size: 8.4vw; margin-top: 18px; }
}
@media (max-width: 600px) {
  body { font-size: 16px; }
  .mini-phone, .project-featured .mini-phone { right: 6px; width: 30%; }
  .project-featured .project-shots { padding-right: 0; }
  .contact-cta { width: 100%; }
  .contact-cta .btn { width: 100%; }
  .wa-float { padding: 0; width: 56px; justify-content: center; }
  .wa-float span { display: none; }
  .hero-center { width: 100%; }
  .hero-ctas { width: 100%; }
  .hero-ctas .btn { width: 100%; }
}
@media (max-width: 420px) {
  .nav { gap: 12px; }
  .nav .btn-sm { padding: 0 14px; }
}
@media (max-width: 350px) {
  .brand-word { display: none; }
}
.nav.is-tight .brand-word { display: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
  .js .reveal, .js .hero-center > * { opacity: 1; transform: none; }
}
