/* ============================================================
   HQ Digital Solutions — styles.css
   Palette: White → Blue → Black. Blue (#2451FF) is the ONLY accent.
   ============================================================ */

/* ---------- Reset & tokens ---------- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --white:   #FFFFFF;
  --surface: #F6F7F9;
  --blue:    #2451FF;
  --ink:     #0B1B4D;
  --black:   #0A0A0A;
  --muted:   #6B7280;
  --hair:    #E7E9EE;

  --display: 'Space Grotesk', sans-serif;
  --serif:   'Instrument Serif', serif;
  --body:    'Inter', sans-serif;
  --mono:    ui-monospace, 'SF Mono', SFMono-Regular, Menlo, Consolas, monospace;

  --r-card: 16px;
  --r-pill: 100px;
  --shadow-soft: 0 16px 40px rgba(11, 27, 77, .08);
  --max: 1200px;
  --pad: clamp(24px, 6vw, 80px);
  --ease: cubic-bezier(.22, .61, .21, 1);
}

html { scroll-behavior: auto; scroll-padding-top: 96px; }

body {
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.65;
  color: var(--black);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg { display: block; }
a { color: inherit; }
::selection { background: var(--blue); color: #fff; }

:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Custom cursor hides the native one (fine pointers only, set by JS) */
html.has-cursor, html.has-cursor a, html.has-cursor button { cursor: none; }

/* ---------- Utilities ---------- */
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--pad); }

.section { padding: clamp(96px, 10vw, 120px) 0; }
.section--tint { background: var(--surface); }

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font: 600 11px/1 var(--body);
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 18px;
}
.eyebrow .idx { font-family: var(--mono); color: var(--blue); letter-spacing: 0; }

.serif { font-family: var(--serif); font-style: italic; font-weight: 400; letter-spacing: 0; color: var(--blue); }

.sec-title {
  font-family: var(--display); font-weight: 700;
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  line-height: 1.05; letter-spacing: -.03em;
}
.sec-head {
  display: flex; justify-content: space-between; align-items: flex-end;
  gap: 32px; margin-bottom: clamp(40px, 6vw, 64px);
}
.sec-note { max-width: 330px; color: var(--muted); font-size: 14.5px; text-align: right; }

.skip {
  position: absolute; left: 16px; top: -60px; z-index: 200;
  background: var(--black); color: #fff; padding: 10px 18px;
  border-radius: var(--r-pill); font: 600 13px var(--body);
  text-decoration: none; transition: top .3s var(--ease);
}
.skip:focus { top: 16px; }

/* ---------- Buttons & pills ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 16px 30px; border-radius: var(--r-pill);
  font: 600 14px/1 var(--body); letter-spacing: .01em;
  text-decoration: none; border: 1px solid transparent;
  transition: background .3s var(--ease), color .3s var(--ease),
              transform .3s var(--ease), box-shadow .4s var(--ease),
              border-color .3s var(--ease);
  will-change: transform;
}
.btn-black { background: var(--black); color: #fff; }
.btn-black:hover { background: var(--blue); box-shadow: var(--shadow-soft); }
.btn-sm { padding: 12px 22px; font-size: 13px; }

.pill-blue {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--blue); color: #fff;
  padding: 8px 15px; border-radius: var(--r-pill);
  font: 600 10.5px/1 var(--body); letter-spacing: .12em; text-transform: uppercase;
}

/* Pulsing status dot */
.pulse { position: relative; width: 7px; height: 7px; border-radius: 50%; background: var(--blue); flex: none; }
.pulse::after {
  content: ''; position: absolute; inset: -4px; border-radius: 50%;
  border: 1px solid var(--blue); animation: ping 1.9s var(--ease) infinite;
}
.pulse--white { background: #fff; }
.pulse--white::after { border-color: #fff; }
@keyframes ping { 0% { transform: scale(.45); opacity: .9; } 100% { transform: scale(1.5); opacity: 0; } }

/* ---------- Scroll progress + nav ---------- */
.progress {
  position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 130;
  background: var(--blue); transform: scaleX(0); transform-origin: left;
}

.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 110;
  border-bottom: 1px solid transparent;
  transition: background .35s var(--ease), border-color .35s var(--ease);
}
.nav.scrolled {
  background: rgba(255, 255, 255, .86);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-bottom-color: var(--hair);
}
.nav-inner {
  max-width: var(--max); margin: 0 auto; padding: 0 var(--pad);
  height: 78px; display: flex; align-items: center; justify-content: space-between; gap: 24px;
}

.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--black); }
.brand-mark {
  width: 38px; height: 38px; border-radius: 11px; flex: none;
  background: var(--black); color: #fff;
  display: grid; place-items: center;
  font: 700 13px var(--display); letter-spacing: -.02em;
  transition: background .3s var(--ease), transform .3s var(--ease);
}
.brand:hover .brand-mark { background: var(--blue); transform: rotate(-6deg); }
.brand-name { font: 600 14px/1.2 var(--display); letter-spacing: -.01em; }
.brand-name small {
  display: block; font: 600 9px/1 var(--body);
  letter-spacing: .16em; text-transform: uppercase;
  color: var(--muted); margin-top: 4px;
}

.nav-links { display: flex; gap: 34px; }
.nav-links a {
  font: 500 14px var(--body); text-decoration: none; color: var(--black);
  position: relative; padding: 6px 0; transition: color .25s;
}
.nav-links a::after {
  content: ''; position: absolute; left: 0; bottom: 0; height: 1.5px; width: 100%;
  background: var(--blue); transform: scaleX(0); transform-origin: right;
  transition: transform .35s var(--ease);
}
.nav-links a:hover { color: var(--blue); }
.nav-links a:hover::after { transform: scaleX(1); transform-origin: left; }

.nav-right { display: flex; align-items: center; gap: 16px; }

/* Hamburger */
.menu-btn {
  display: none; width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid var(--hair); background: #fff;
  flex-direction: column; align-items: center; justify-content: center; gap: 5px;
  transition: border-color .3s;
}
.menu-btn span {
  width: 16px; height: 1.6px; background: var(--black); border-radius: 2px;
  transition: transform .4s var(--ease);
}
.menu-btn:hover { border-color: var(--blue); }
body.menu-open .menu-btn span:first-child { transform: translateY(3.3px) rotate(45deg); }
body.menu-open .menu-btn span:last-child  { transform: translateY(-3.3px) rotate(-45deg); }

/* Mobile menu overlay */
.mobile-menu {
  position: fixed; inset: 0; z-index: 105; background: var(--white);
  display: flex; flex-direction: column; justify-content: center;
  padding: 100px var(--pad) 48px;
  transform: translateY(-102%);
  transition: transform .6s var(--ease);
  visibility: hidden;
}
body.menu-open .mobile-menu { transform: translateY(0); visibility: visible; }
.mm-link {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 22px 0; border-bottom: 1px solid var(--hair);
  font: 600 clamp(2rem, 8vw, 3rem)/1.1 var(--display); letter-spacing: -.02em;
  color: var(--black); text-decoration: none;
  opacity: 0; transform: translateY(24px);
  transition: opacity .5s var(--ease), transform .5s var(--ease), color .25s;
}
.mm-link i { font: 500 12px var(--mono); color: var(--muted); font-style: normal; }
.mm-link:hover { color: var(--blue); }
body.menu-open .mm-link { opacity: 1; transform: none; }
body.menu-open .mm-link:nth-child(1) { transition-delay: .12s; }
body.menu-open .mm-link:nth-child(2) { transition-delay: .18s; }
body.menu-open .mm-link:nth-child(3) { transition-delay: .24s; }
body.menu-open .mm-link:nth-child(4) { transition-delay: .30s; }
.mm-meta {
  margin-top: 36px; font: 500 11px var(--mono); letter-spacing: .06em;
  text-transform: uppercase; color: var(--muted);
  opacity: 0; transition: opacity .5s .4s;
}
body.menu-open .mm-meta { opacity: 1; }

/* ---------- Hero ---------- */
.hero {
  min-height: 100svh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 150px var(--pad) 90px;
  position: relative;
}
.hero-pill {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 10px 18px; border-radius: var(--r-pill);
  border: 1px solid var(--hair); background: var(--white);
  font: 600 11px/1 var(--body); letter-spacing: .14em; text-transform: uppercase;
  color: var(--black); margin-bottom: clamp(28px, 4vh, 44px);
  box-shadow: 0 8px 24px rgba(11, 27, 77, .05);
}
.hero h1 {
  font-family: var(--display); font-weight: 700;
  font-size: clamp(2.75rem, 11.5vw, 8rem);
  line-height: .96; letter-spacing: -.035em; color: var(--black);
  text-transform: uppercase;
}
.hero h1 .hero-line { display: block; will-change: transform; }
.hero h1 .serif {
  font-size: 1.06em; text-transform: none; letter-spacing: -.01em;
  color: var(--blue);
}
.hero-sub {
  max-width: 580px; margin: clamp(24px, 3.5vh, 36px) auto 0;
  color: var(--muted); font-size: clamp(1rem, 1.4vw, 1.125rem);
}
.hero-sub strong { color: var(--black); font-weight: 600; }
.hero-cta { display: flex; align-items: center; gap: 16px; margin-top: clamp(30px, 4.5vh, 46px); }

.scroll-cue {
  width: 46px; height: 46px; border-radius: 50%; flex: none;
  border: 1px solid var(--hair); background: var(--white);
  display: grid; place-items: center;
  transition: border-color .3s;
}
.scroll-cue span { width: 4px; height: 4px; border-radius: 50%; background: var(--black); animation: cue 1.8s var(--ease) infinite; }
.scroll-cue:hover { border-color: var(--blue); }
@keyframes cue {
  0%   { transform: translateY(-9px); opacity: 0; }
  35%  { opacity: 1; }
  100% { transform: translateY(9px);  opacity: 0; }
}

.hero-meta {
  position: absolute; left: var(--pad); right: var(--pad); bottom: 26px;
  display: flex; justify-content: space-between; gap: 16px;
  font: 500 10.5px var(--mono); letter-spacing: .08em; text-transform: uppercase;
  color: var(--muted);
}

/* ---------- About ---------- */
.about-grid {
  display: grid; grid-template-columns: minmax(260px, 4fr) 7fr;
  gap: clamp(40px, 6vw, 96px); align-items: start;
}
.about-aside { position: sticky; top: 118px; }
.about-mark {
  width: 88px; height: 88px; border-radius: 22px; margin-bottom: 22px;
  border: 1px solid var(--hair); color: var(--blue);
  display: grid; place-items: center;
  font: italic 400 42px/1 var(--serif);
  background: var(--white);
}
.facts {
  border: 1px solid var(--hair); border-radius: var(--r-card);
  background: var(--surface); overflow: hidden; margin-top: 22px;
}
.fact { padding: 15px 20px; border-bottom: 1px solid var(--hair); transition: background .25s; }
.fact:last-child { border-bottom: 0; }
.fact:hover { background: #fff; }
.fact dt {
  font: 600 10px/1 var(--body); letter-spacing: .14em;
  text-transform: uppercase; color: var(--blue); margin-bottom: 6px;
}
.fact dd { font: 500 13.5px/1.45 var(--body); color: var(--black); }
.aside-note { margin-top: 14px; font: 400 12px var(--mono); color: var(--muted); }

.about-statement {
  font-family: var(--display); font-weight: 600;
  font-size: clamp(1.75rem, 3.2vw, 2.5rem);
  line-height: 1.25; letter-spacing: -.02em; margin-bottom: 34px;
}
.about-p {
  color: rgba(10, 10, 10, .78); font-size: 16.5px; max-width: 62ch;
}
.about-p + .about-p { margin-top: 20px; }

.tags { list-style: none; display: flex; flex-wrap: wrap; gap: 10px; margin-top: 36px; }
.tag {
  padding: 9px 18px; border: 1px solid var(--hair); border-radius: var(--r-pill);
  background: var(--white); font: 500 12.5px var(--body); color: var(--black);
  transition: border-color .3s, color .3s, transform .3s var(--ease);
  text-align: center;
}
.tag:hover { border-color: var(--blue); color: var(--blue); transform: translateY(-2px); }

/* ---------- Focus cards ---------- */
.focus-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.focus-card {
  position: relative; background: var(--white);
  border: 1px solid var(--hair); border-radius: var(--r-card);
  padding: 28px 28px 26px;
  transition: transform .5s var(--ease), border-color .3s, box-shadow .5s var(--ease);
}
.focus-card:hover {
  transform: translateY(-6px);
  border-color: rgba(36, 81, 255, .35);
  box-shadow: var(--shadow-soft);
}
.fc-top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 52px; }
.fc-icon {
  width: 46px; height: 46px; border-radius: 13px;
  border: 1px solid var(--hair); background: var(--surface);
  display: grid; place-items: center; color: var(--black);
  transition: color .3s, border-color .3s, background .3s;
}
.focus-card:hover .fc-icon { color: var(--blue); border-color: rgba(36, 81, 255, .35); background: #fff; }
.fc-idx { font: 500 12px var(--mono); color: var(--muted); }
.focus-card h3 {
  font: 600 20px/1.2 var(--display); letter-spacing: -.01em; margin-bottom: 10px;
}
.focus-card p { font-size: 14.5px; color: var(--muted); margin-bottom: 22px; }
.fc-tags { font: 500 11px var(--mono); letter-spacing: .05em; color: var(--muted); }
.fc-arrow {
  position: absolute; right: 24px; bottom: 22px; color: var(--blue);
  opacity: 0; transform: translate(-8px, 8px);
  transition: opacity .35s var(--ease), transform .35s var(--ease);
}
.focus-card:hover .fc-arrow { opacity: 1; transform: translate(0, 0); }

/* ---------- Credentials strip ---------- */
.creds { border-top: 1px solid var(--hair); border-bottom: 1px solid var(--hair); }
.creds-grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.cred { padding: 30px 26px; border-left: 1px solid var(--hair); }
.cred:first-child { border-left: 0; padding-left: 0; }
.cred dt {
  font: 600 10px/1 var(--body); letter-spacing: .16em;
  text-transform: uppercase; color: var(--muted); margin-bottom: 9px;
}
.cred dd {
  font: 500 14px/1.45 var(--body); color: var(--black);
  display: flex; align-items: flex-start; gap: 8px;
}
.cred-check { color: var(--blue); flex: none; margin-top: 2px; }

/* ---------- Lab / glass card ---------- */
.lab-stage {
  position: relative; overflow: hidden;
  border: 1px solid var(--hair); border-radius: 24px;
  background: var(--surface);
  padding: clamp(56px, 9vw, 104px) clamp(20px, 5vw, 72px);
}
.wash { position: absolute; inset: -25%; pointer-events: none; will-change: transform; }
.wash-a {
  background: radial-gradient(38% 42% at 30% 36%, rgba(36, 81, 255, .16), transparent 70%);
}
.wash-b {
  background: radial-gradient(44% 48% at 72% 68%, rgba(11, 27, 77, .12), transparent 72%);
}
.plus { position: absolute; width: 15px; height: 15px; color: var(--muted); opacity: .55; }
.plus::before, .plus::after { content: ''; position: absolute; background: currentColor; }
.plus::before { left: 50%; top: 0; width: 1px; height: 100%; transform: translateX(-50%); }
.plus::after  { top: 50%; left: 0; height: 1px; width: 100%; transform: translateY(-50%); }
.p-tl { top: 16px; left: 16px; } .p-tr { top: 16px; right: 16px; }
.p-bl { bottom: 16px; left: 16px; } .p-br { bottom: 16px; right: 16px; }

.glass {
  position: relative; max-width: 680px; margin: 0 auto;
  background: rgba(255, 255, 255, .55);
  -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
  border: 1px solid rgba(11, 27, 77, .08);
  border-radius: 24px;
  padding: clamp(28px, 5vw, 48px);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .4), 0 28px 70px rgba(11, 27, 77, .12);
  will-change: transform, opacity;
}
.glass::before { /* top sheen */
  content: ''; position: absolute; inset: 0 0 auto; height: 42%;
  border-radius: 24px 24px 0 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(255, 255, 255, .55), transparent);
}
.glass > * { position: relative; }

.glass-top { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 26px; }
.glass-id { font: 500 11.5px var(--mono); letter-spacing: .08em; color: var(--muted); }
.glass-title {
  font: 600 clamp(1.5rem, 3vw, 2.1rem)/1.15 var(--display);
  letter-spacing: -.02em; margin-bottom: 14px;
}
.glass-desc { color: var(--muted); font-size: 15.5px; max-width: 56ch; margin-bottom: 26px; }

.glass-meta { list-style: none; border-top: 1px solid rgba(11, 27, 77, .1); margin-bottom: 26px; }
.glass-meta li {
  display: flex; justify-content: space-between; align-items: baseline; gap: 20px;
  padding: 12px 0; border-bottom: 1px solid rgba(11, 27, 77, .1);
}
.glass-meta span { font: 500 11px var(--mono); letter-spacing: .08em; color: var(--muted); }
.glass-meta b { font: 500 12.5px var(--mono); letter-spacing: .02em; color: var(--black); text-align: right; }

.glass-link {
  display: inline-flex; align-items: center; gap: 8px;
  font: 600 14px var(--body); color: var(--blue); text-decoration: none;
  border-bottom: 1.5px solid rgba(36, 81, 255, .3); padding-bottom: 3px;
  transition: border-color .3s, gap .3s var(--ease);
}
.glass-link:hover { border-color: var(--blue); gap: 12px; }

.lab-caption {
  margin-top: 22px; text-align: center;
  font: 400 12.5px var(--mono); color: var(--muted);
}

/* ---------- Contact ---------- */
.contact-title {
  font-family: var(--display); font-weight: 700;
  font-size: clamp(2.7rem, 5.8vw, 4.9rem);
  line-height: 1.04; letter-spacing: -.032em;
  margin-bottom: clamp(24px, 3.4vw, 34px);
  max-width: 690px;
}
.contact-grid {
  display: grid; grid-template-columns: minmax(360px, .9fr) minmax(0, 1.1fr);
  gap: clamp(34px, 4.6vw, 62px); align-items: start;
}
.contact-copy { color: rgba(10, 10, 10, .78); font-size: 16px; max-width: 50ch; }
.contact-meta {
  margin-top: 20px; font: 500 11.5px var(--mono);
  letter-spacing: .08em; text-transform: uppercase; color: var(--muted);
}
.contact-note {
  display: flex; gap: 12px; align-items: flex-start;
  max-width: 43ch; margin-top: 22px; padding: 16px 18px;
  border: 1px solid rgba(36, 81, 255, .18); border-radius: var(--r-card);
  background: linear-gradient(135deg, rgba(36, 81, 255, .07), rgba(255, 255, 255, .76));
  color: rgba(10, 10, 10, .72); font-size: 13.5px; line-height: 1.55;
}
.contact-note .pulse { margin-top: 7px; }
.contact-note strong { color: var(--blue); font-family: var(--mono); font-size: .92em; }
.contact-cta { display: flex; flex-direction: column; align-items: flex-end; gap: 22px; }
.btn-mail { font-family: var(--mono); font-size: 13.5px; letter-spacing: 0; }
.socials { display: flex; gap: 28px; }
.soc {
  display: inline-flex; align-items: center; gap: 7px;
  font: 500 14px var(--body); color: var(--black); text-decoration: none;
  border-bottom: 1px solid var(--hair); padding-bottom: 3px;
  transition: color .25s, border-color .25s;
}
.soc svg { transition: transform .3s var(--ease); }
.soc:hover { color: var(--blue); border-color: var(--blue); }
.soc:hover svg { transform: translate(2px, -2px); }

.contact-form {
  position: relative; overflow: hidden;
  display: grid; gap: 18px;
  margin-top: 30px;
  padding: clamp(22px, 4vw, 34px);
  border: 1px solid rgba(11, 27, 77, .09);
  border-radius: 24px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, .82), rgba(246, 247, 249, .58)),
    radial-gradient(56% 48% at 88% 0%, rgba(36, 81, 255, .13), transparent 70%);
  -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
  box-shadow: 0 26px 76px rgba(11, 27, 77, .12), inset 0 1px 0 rgba(255, 255, 255, .82);
}
.contact-form::before {
  content: ''; position: absolute; inset: 0 0 auto; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(36, 81, 255, .55), transparent);
}
.contact-form > * { position: relative; }
.hp-field {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.form-row--three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.field { position: relative; min-width: 0; }
.field input,
.field select,
.field textarea {
  width: 100%; min-height: 58px;
  border: 1px solid rgba(11, 27, 77, .12);
  border-radius: 14px;
  background: rgba(255, 255, 255, .72);
  color: var(--black);
  font: 500 14.5px/1.35 var(--body);
  padding: 22px 16px 10px;
  transition: border-color .25s var(--ease), box-shadow .25s var(--ease),
              background .25s var(--ease), transform .25s var(--ease);
}
.field textarea { min-height: 156px; resize: vertical; padding-top: 25px; }
.field select {
  appearance: none;
  padding-right: 38px;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--muted) 50%),
    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 21px) 27px, calc(100% - 15px) 27px;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}
.field label {
  position: absolute; left: 16px; top: 18px;
  pointer-events: none;
  color: var(--muted);
  font: 600 12px/1 var(--body);
  transition: color .22s var(--ease), transform .22s var(--ease), opacity .22s;
}
.field label span { font-weight: 500; opacity: .74; }
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: rgba(36, 81, 255, .55);
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 0 0 4px rgba(36, 81, 255, .1), 0 14px 34px rgba(11, 27, 77, .08);
  transform: translateY(-1px);
}
.field input:focus + label,
.field input:not(:placeholder-shown) + label,
.field textarea:focus + label,
.field textarea:not(:placeholder-shown) + label,
.field--select label {
  color: var(--blue);
  transform: translateY(-10px) scale(.86);
  transform-origin: left top;
}
.field-line {
  position: absolute; left: 14px; right: 14px; bottom: 0;
  height: 2px; border-radius: 2px;
  background: var(--blue);
  transform: scaleX(0); transform-origin: left;
  transition: transform .28s var(--ease);
}
.field:focus-within .field-line { transform: scaleX(1); }
.field-error {
  display: block; min-height: 16px; margin: 6px 4px 0;
  color: #C02525; font: 500 11.5px/1.35 var(--body);
}
.field.has-error input,
.field.has-error select,
.field.has-error textarea {
  border-color: rgba(192, 37, 37, .7);
  box-shadow: 0 0 0 4px rgba(192, 37, 37, .08);
  animation: fieldShake .32s var(--ease);
}
.message-meta { display: flex; justify-content: space-between; gap: 14px; align-items: flex-start; }
.char-count {
  flex: none; margin: 6px 4px 0 0;
  font: 500 11.5px var(--mono); color: var(--muted);
}
.form-status {
  display: none; align-items: center; gap: 10px;
  padding: 13px 15px; border-radius: 14px;
  font: 600 13px/1.35 var(--body);
}
.form-status.is-visible { display: flex; animation: statusIn .34s var(--ease); }
.form-status.is-success { background: rgba(36, 81, 255, .09); color: var(--blue); border: 1px solid rgba(36, 81, 255, .18); }
.form-status.is-error { background: rgba(192, 37, 37, .08); color: #A51F1F; border: 1px solid rgba(192, 37, 37, .18); }
.submit-btn {
  justify-self: start; min-width: 178px; min-height: 52px;
  justify-content: center; border: 0;
}
.submit-btn:disabled { opacity: .72; pointer-events: none; }
.submit-loader {
  display: none; width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, .45); border-top-color: #fff;
  animation: spin .8s linear infinite;
}
.submit-btn.is-loading .submit-loader { display: block; }
.submit-btn.is-loading .submit-icon { display: none; }
.submit-btn.is-success { background: var(--blue); animation: successPop .42s var(--ease); }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes statusIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
@keyframes successPop { 50% { transform: scale(1.025); } }
@keyframes fieldShake {
  25% { transform: translateX(-4px); }
  50% { transform: translateX(4px); }
  75% { transform: translateX(-2px); }
}

/* ---------- Footer ---------- */
.footer {
  position: relative; overflow: hidden;
  background: var(--ink); color: #fff;
  padding: clamp(64px, 8vw, 88px) 0 30px;
}
.footer-watermark {
  position: absolute; right: -2%; bottom: -14%;
  font: italic 400 clamp(220px, 32vw, 400px)/1 var(--serif);
  color: rgba(255, 255, 255, .045);
  pointer-events: none; user-select: none;
}
.footer-top {
  position: relative;
  display: flex; justify-content: space-between; align-items: center;
  gap: 36px; flex-wrap: wrap;
  padding-bottom: 44px; border-bottom: 1px solid rgba(255, 255, 255, .14);
}
.brand--light { color: #fff; }
.brand--light .brand-mark { background: #fff; color: var(--ink); }
.brand--light:hover .brand-mark { background: var(--blue); color: #fff; }
.brand--light .brand-name small { color: rgba(255, 255, 255, .5); }

.footer-links { display: flex; gap: 30px; }
.footer-links a {
  font: 500 14px var(--body); color: rgba(255, 255, 255, .72);
  text-decoration: none; transition: color .25s;
}
.footer-links a:hover { color: #fff; text-decoration: underline; text-underline-offset: 5px; text-decoration-color: var(--blue); }

.to-top {
  width: 52px; height: 52px; border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .28); background: transparent; color: #fff;
  display: grid; place-items: center;
  transition: background .3s var(--ease), border-color .3s, transform .3s var(--ease);
}
.to-top:hover { background: var(--blue); border-color: var(--blue); transform: translateY(-4px); }

.footer-bottom {
  position: relative;
  display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  padding-top: 26px;
  font: 400 12.5px var(--body); color: rgba(255, 255, 255, .55);
}

/* ---------- Custom cursor ---------- */
.cursor-dot, .cursor-ring {
  position: fixed; top: 0; left: 0; z-index: 9999;
  border-radius: 50%; pointer-events: none;
  transform: translate(-50%, -50%);
  display: none;
}
html.has-cursor .cursor-dot, html.has-cursor .cursor-ring { display: block; }
.cursor-dot { width: 6px; height: 6px; background: var(--black); }
.cursor-ring {
  width: 38px; height: 38px;
  border: 1px solid rgba(10, 10, 10, .35);
  transition: width .35s var(--ease), height .35s var(--ease),
              border-color .35s, background .35s;
}
.cursor-ring.active {
  width: 58px; height: 58px;
  border-color: var(--blue);
  background: rgba(36, 81, 255, .06);
}

html:has(.footer:hover) .cursor-dot { background: #fff; }
html:has(.footer:hover) .cursor-ring { border-color: rgba(255, 255, 255, .45); }

@media (pointer: coarse), (max-width: 1024px) {
  html.has-cursor, html.has-cursor a, html.has-cursor button { cursor: auto; }
  .cursor-dot, .cursor-ring { display: none !important; }
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .about-grid { grid-template-columns: 1fr; }
  .about-aside { position: static; }
  .focus-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; align-items: start; gap: 30px; }
  .contact-cta { align-items: flex-start; }
  .contact-copy,
  .contact-note { max-width: 64ch; }
  .contact-form { margin-top: 0; }
}

@media (max-width: 860px) {
  .nav-links { display: none; }
  .menu-btn { display: flex; }
  .nav .btn-sm { display: none; }
  .creds-grid { grid-template-columns: 1fr 1fr; }
  .cred { padding: 24px 20px; }
  .cred:nth-child(odd) { border-left: 0; padding-left: 0; }
  .cred:nth-child(n + 3) { border-top: 1px solid var(--hair); }
  .sec-head { flex-direction: column; align-items: flex-start; }
  .sec-note { text-align: left; }
}

@media (max-width: 720px) {
  .hero-meta { display: none; }
  .glass-meta li { flex-direction: column; gap: 3px; }
  .glass-meta b { text-align: left; }
  .form-row,
  .form-row--three { grid-template-columns: 1fr; }
  .contact-form { border-radius: 20px; }
  .submit-btn { width: 100%; }
  .footer-top { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 440px) {
  .contact-form { padding: 18px; }
  .field input,
  .field select,
  .field textarea { border-radius: 12px; }
  .message-meta { flex-direction: column; gap: 0; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001s !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001s !important;
  }
}
