/* =================================================================
   ULTRABASIC LABS — Single-scroll one-pager
   Clean · light · Hanken Grotesk · lime accent
   ================================================================= */

:root {
  --cream:  #ffffff;
  --paper:  #ffffff;
  --ink:    #16160f;
  --mute:   #57564e;
  --line:   rgba(22,22,15,0.12);
  --lime:   #e9f6a3;

  --maxw: 1100px;
  --gut: clamp(22px, 5vw, 72px);
  --font: 'Google Sans', system-ui, -apple-system, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; scroll-behavior: smooth; }
body { font-family: var(--font); background: var(--cream); color: var(--ink); font-size: 18px; line-height: 1.55; }
a { color: inherit; text-decoration: none; }
::selection { background: var(--lime); color: var(--ink); }

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gut); }

/* ---------- Reveal ---------- */
[data-rv] { opacity: 0; transform: translateY(30px); transition: opacity 1s var(--ease), transform 1s var(--ease); }
[data-rv].in { opacity: 1; transform: none; }
[data-d="1"]{transition-delay:.08s}[data-d="2"]{transition-delay:.16s}[data-d="3"]{transition-delay:.24s}[data-d="4"]{transition-delay:.32s}[data-d="5"]{transition-delay:.4s}[data-d="6"]{transition-delay:.48s}
@media (prefers-reduced-motion: reduce){ [data-rv]{opacity:1!important;transform:none!important} html{scroll-behavior:auto} }

/* ---------- Top bar ---------- */
.bar { display: flex; align-items: center; justify-content: flex-end; padding: 26px 0; }
/* logo: pinned & blending, aligned to the centred content column */
.brand { position: fixed; top: 30px; left: max(var(--gut), calc(50vw - var(--maxw) / 2 + var(--gut))); z-index: 100; display: flex; align-items: center; gap: 12px; color: #fff; mix-blend-mode: difference; }
.brand .logo { height: clamp(15px, 1.55vw, 18px); width: auto; display: block; }
.bar .mail { font-weight: 500; font-size: 16px; border-bottom: 2px solid var(--lime); padding-bottom: 2px; transition: border-color 0.3s; }
.bar .mail:hover { border-color: var(--ink); }

/* ---------- Eyebrow ---------- */
.eyebrow { display: inline-flex; align-items: center; gap: 11px; font-weight: 500; font-size: 14px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--mute); }
.eyebrow::before { content: ""; width: 24px; height: 2px; background: var(--ink); }

/* ---------- Hero ---------- */
.hero { padding: clamp(48px, 9vw, 110px) 0 clamp(56px, 9vw, 120px); }
.hero h1 { font-weight: 500; font-size: clamp(2.5rem, 6.4vw, 5.4rem); line-height: 1.02; letter-spacing: -0.03em; margin-top: 28px; max-width: 18ch; text-wrap: balance; }
.hero h1 .hl { background: var(--lime); padding: 0.02em 0.14em; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.hero .sub { font-size: clamp(1.15rem, 1.7vw, 1.45rem); line-height: 1.5; color: var(--mute); max-width: 52ch; margin-top: 30px; }
.hero .cta { margin-top: 38px; display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }

.btn { display: inline-flex; align-items: center; gap: 10px; font-weight: 500; font-size: 16px; padding: 15px 28px; border-radius: 100px; background: var(--ink); color: var(--cream); transition: transform 0.3s var(--ease); }
.btn:hover { transform: translateY(-2px); }
.btn .ar { transition: transform 0.3s var(--ease); }
.btn:hover .ar { transform: translateX(4px); }
.btn.lime { background: var(--lime); color: var(--ink); }
.tlink { font-weight: 500; font-size: 16px; border-bottom: 2px solid var(--line); padding-bottom: 2px; transition: border-color 0.3s; }
.tlink:hover { border-color: var(--ink); }

/* ---------- Section ---------- */
.section { padding: clamp(48px, 8vw, 100px) 0; border-top: 1px solid var(--line); }
.section .head { max-width: 40ch; margin-bottom: clamp(36px, 5vw, 56px); }
.section .head h2 { font-weight: 500; font-size: clamp(1.9rem, 3.6vw, 3rem); letter-spacing: -0.025em; line-height: 1.05; margin-top: 20px; }

/* what we do — full-width horizontal cards, stacked vertically */
.dogrid { display: grid; gap: clamp(14px, 1.6vw, 20px); }
.do { display: grid; grid-template-columns: 64px minmax(150px, 0.8fr) 1.6fr; gap: clamp(18px, 3vw, 52px); align-items: center; padding: clamp(26px, 2.6vw, 40px) clamp(28px, 2.8vw, 48px); background: #fff; border: 1px solid var(--line); border-radius: 22px; position: relative; overflow: hidden; transition: transform 0.4s var(--ease), border-color 0.4s, box-shadow 0.4s; }
.do::after { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--lime); transform: scaleY(0); transform-origin: top; transition: transform 0.5s var(--ease); }
.do:hover { transform: translateY(-4px); border-color: var(--ink); box-shadow: 0 20px 44px -26px rgba(0,0,0,0.28); }
.do:hover::after { transform: scaleY(1); }
.do .num { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 13px; background: var(--lime); font-weight: 700; font-size: 16px; }
.do h3 { font-weight: 500; font-size: clamp(1.4rem, 2vw, 1.85rem); letter-spacing: -0.02em; }
.do .info p { color: var(--mute); font-size: clamp(1rem, 1.25vw, 1.1rem); line-height: 1.5; }
.do .info .tags { margin-top: 16px; display: flex; flex-wrap: wrap; gap: 8px; }
.do .info .tags span { font-size: 13px; font-weight: 500; color: var(--ink); background: rgba(22,22,15,0.05); padding: 7px 13px; border-radius: 100px; }
.do .arr { color: var(--ink); font-size: 20px; transition: transform 0.4s var(--ease); }
.do:hover .arr { transform: translate(4px, -4px); }

/* who we are */
.who { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 90px); align-items: start; }
.who-title { font-weight: 500; font-size: clamp(1.8rem, 3.4vw, 2.9rem); letter-spacing: -0.025em; line-height: 1.12; margin-top: 18px; }
.who-title .hl { background: var(--lime); padding: 0.02em 0.1em; }
.who .col p { color: var(--mute); margin-bottom: 18px; font-size: clamp(1.02rem,1.4vw,1.15rem); }
.who-stats { display: grid; grid-template-columns: repeat(4, 1fr); margin-top: clamp(48px, 6vw, 82px); border-top: 1px solid var(--line); }
.who-stats .stat { padding: clamp(26px,3vw,40px) clamp(18px,2vw,28px) 0; border-left: 1px solid var(--line); }
.who-stats .stat:first-child { border-left: 0; padding-left: 0; }
.who-stats .stat .mk { display: block; width: 12px; height: 12px; border-radius: 3px; background: var(--lime); margin-bottom: clamp(18px,2vw,26px); }
.who-stats .stat .n { font-weight: 500; font-size: clamp(2.2rem,3.8vw,3.3rem); letter-spacing: -0.03em; line-height: 1; }
.who-stats .stat .l { color: var(--mute); font-size: 14px; font-weight: 500; margin-top: 12px; }

/* contact */
.contact { text-align: left; }
.contact h2 { font-weight: 500; font-size: clamp(2.4rem, 6vw, 5rem); letter-spacing: -0.03em; line-height: 1.0; }
.contact h2 a { border-bottom: 4px solid var(--lime); }
.contact h2 a:hover { border-color: var(--ink); }
.contact .row { display: flex; gap: 36px; flex-wrap: wrap; margin-top: 40px; color: var(--mute); }
.contact .row a { font-weight: 500; color: var(--ink); }

/* footer */
.foot { border-top: 1px solid var(--line); padding: clamp(56px, 7vw, 100px) 0 40px; }
.foot-logo { width: 100%; height: auto; display: block; color: var(--ink); opacity: 0.1; }
.foot-bot { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 14px; color: var(--mute); font-size: 15px; margin-top: clamp(22px, 3vw, 44px); }

@media (max-width: 820px) { .do { grid-template-columns: 1fr; gap: 14px; align-items: start; } .do .arr { display: none; } }
@media (max-width: 760px) {
  .who { grid-template-columns: 1fr; gap: 24px; }
  .who-stats { grid-template-columns: 1fr 1fr; }
  .who-stats .stat { border-left: 0; padding-left: 0; }
  .bar .mail { display: none; }
}

/* ===================== Colour — lime accent only ===================== */
/* services: neutral, with a small ink marker */
.do .n { color: var(--ink); }
.do .b h3::before { content:""; display:inline-block; width:10px; height:10px; border-radius:50%; background:var(--ink); margin-right:14px; vertical-align:middle; transform:translateY(-2px); }
.do .b .tags span { background: rgba(22,22,15,0.05); color: var(--ink); }

.who .stats .s .n { color: var(--ink); }
.tlink:hover { border-color: var(--ink); }

/* contact: one bold lime block */
.section.contact { border-top: 0; padding-top: clamp(20px,4vw,48px); }
.contact-card { border-radius: clamp(20px,3vw,34px); padding: clamp(40px,6vw,88px); background: var(--lime); }
.contact-card h2 a { border-bottom-color: var(--ink); }
.contact-card .row { color: rgba(22,22,15,0.62); }
.contact-card .row a { color: var(--ink); }

/* ===================== Motion & delight ===================== */
/* hero headline — words rise out of a mask (spans injected by JS) */
.hero h1 .w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: 0.16em; margin-bottom: -0.16em; }
.hero h1 .w > span { display: inline-block; transform: translateY(120%); transition: transform 0.95s var(--ease); }
html.is-ready .hero h1 .w > span { transform: translateY(0); }

/* hero sub + CTA fade up after the headline */
html.js .hero .sub, html.js .hero .cta { opacity: 0; transform: translateY(22px); transition: opacity 0.85s var(--ease), transform 0.85s var(--ease); }
html.js.is-ready .hero .sub { opacity: 1; transform: none; transition-delay: 0.72s; }
html.js.is-ready .hero .cta { opacity: 1; transform: none; transition-delay: 0.86s; }

/* logo + email ease in */
html.js .brand, html.js .bar .mail { opacity: 0; transition: opacity 1.1s var(--ease) 0.3s; }
html.is-ready .brand, html.is-ready .bar .mail { opacity: 1; }

/* button depth on hover */
.btn { transition: transform 0.3s var(--ease), box-shadow 0.35s var(--ease); }
.btn:hover { box-shadow: 0 14px 30px -14px rgba(22,22,15,0.5); }

/* card number badge springs on hover */
.do .num { transition: transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1); }
.do:hover .num { transform: rotate(-6deg) scale(1.09); }

/* footer wordmark — always visible watermark */

@media (prefers-reduced-motion: reduce) {
  .hero h1 .w > span,
  html.js .hero .sub, html.js .hero .cta,
  html.js .brand, html.js .bar .mail { opacity: 1 !important; transform: none !important; transition: none !important; }
  html.js .foot-logo { clip-path: none !important; }
  .do:hover .num { transform: none; }
}

/* ===================== Products ===================== */
.product-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(14px, 1.6vw, 20px); }
.product { display: flex; flex-direction: column; min-height: 260px; padding: clamp(28px, 3vw, 44px); background: #fff; border: 1px solid var(--line); border-radius: 22px; position: relative; overflow: hidden; transition: transform 0.4s var(--ease), border-color 0.4s, box-shadow 0.4s; }
.product::after { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--lime); transform: scaleY(0); transform-origin: top; transition: transform 0.5s var(--ease); }
.product:hover { transform: translateY(-4px); border-color: var(--ink); box-shadow: 0 20px 44px -26px rgba(0,0,0,0.28); }
.product:hover::after { transform: scaleY(1); }
.product .pcat { align-self: flex-start; font-size: 13px; font-weight: 600; color: var(--ink); background: var(--lime); padding: 6px 13px; border-radius: 100px; }
.product .pname { font-weight: 500; font-size: clamp(1.7rem, 2.6vw, 2.4rem); letter-spacing: -0.03em; margin-top: clamp(24px, 3vw, 40px); }
.product .pdesc { color: var(--mute); margin-top: 10px; font-size: clamp(1rem, 1.25vw, 1.1rem); line-height: 1.5; }
.product .pvisit { margin-top: auto; padding-top: 24px; font-weight: 600; font-size: 15px; color: var(--ink); display: inline-flex; align-items: center; gap: 8px; }
.product .pvisit .pa { transition: transform 0.4s var(--ease); }
.product:hover .pvisit .pa { transform: translateX(4px); }
@media (max-width: 760px) { .product-grid { grid-template-columns: 1fr; } }
