/* =============================================================
   RahulTechWorks — Instagram link hub
   Single typeface: Google Sans. Light periwinkle canvas, navy ink,
   white rounded cards, deep-blue gradient bands.
   ============================================================= */

/* ============ Tokens ============ */
:root {
  /* Canvas + surfaces */
  --bg:          #edf1ff;
  --bg-soft:     #f5f7ff;
  --surface:     #ffffff;
  --surface-2:   #f3f6ff;
  --surface-3:   #e7ecff;

  /* Ink */
  --ink:         #07184f;
  --ink-2:       #3b4b85;
  --ink-dim:     #6b78a8;
  --ink-on-dark: #ffffff;
  --ink-on-dark-dim: rgba(255, 255, 255, .72);

  /* Lines */
  --line:        rgba(7, 24, 79, .10);
  --line-soft:   rgba(7, 24, 79, .06);
  --line-strong: rgba(7, 24, 79, .18);

  /* Brand */
  --brand:       #2e4be0;
  --brand-ink:   #ffffff;
  --brand-deep:  #0d1e63;
  --navy:        #0b1c57;
  --navy-2:      #122a7a;

  /* Instagram-flavoured accent, used sparingly on highlights */
  --grad-accent: linear-gradient(95deg, #f58529, #dd2a7b 42%, #8134af 72%, #515bd4);
  --grad-band:   linear-gradient(135deg, #0d2176 0%, #223fc4 48%, #5b2fa8 100%);
  --grad-brand:  linear-gradient(135deg, #2e4be0, #5b2fa8);

  /* Elevation — deliberately shallow, the way the reference stacks cards */
  --sh-1: 0 1px 2px rgba(7, 24, 79, .10);
  --sh-2: 0 2px 10px rgba(7, 24, 79, .09);
  --sh-3: 0 16px 36px -18px rgba(7, 24, 79, .42);
  --ring: 0 0 0 3px rgba(46, 75, 224, .28);

  /* Radii */
  --r-xs: 4px;
  --r-sm: 8px;
  --r-md: 16px;
  --r-lg: 24px;
  --r-xl: 32px;
  --r-full: 999px;

  /* Spacing */
  --s-1: .25rem;  --s-2: .5rem;   --s-3: .75rem;  --s-4: 1rem;
  --s-5: 1.5rem;  --s-6: 2rem;    --s-7: 2.5rem;  --s-8: 3rem;
  --s-9: 4rem;    --s-10: 5rem;   --s-11: 6rem;   --s-12: 7rem;

  /* Fluid type — 1.25 ratio */
  --step--2: clamp(.69rem, .67rem + .1vw, .75rem);
  --step--1: clamp(.82rem, .79rem + .15vw, .9rem);
  --step-0:  clamp(.95rem, .92rem + .18vw, 1.05rem);
  --step-1:  clamp(1.13rem, 1.07rem + .3vw, 1.3rem);
  --step-2:  clamp(1.35rem, 1.25rem + .5vw, 1.65rem);
  --step-3:  clamp(1.62rem, 1.45rem + .85vw, 2.1rem);
  --step-4:  clamp(1.95rem, 1.65rem + 1.5vw, 2.9rem);
  --step-5:  clamp(2.3rem, 1.75rem + 2.7vw, 4rem);

  /* Weights — Google Sans ships 400..700 variable */
  --w-regular: 400;
  --w-medium:  500;
  --w-bold:    700;

  /* Motion */
  --ease-out:    cubic-bezier(.22, 1, .36, 1);
  --ease-spring: cubic-bezier(.34, 1.4, .64, 1);
  --dur-fast: .18s;
  --dur-med:  .32s;
  --dur-slow: .6s;

  --font-sans: "Google Sans", "Google Sans Text", "Product Sans",
               system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --nav-h: 4.25rem;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 1rem);
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  font-weight: var(--w-regular);
  font-size: var(--step-0);
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  transition: background var(--dur-med) ease, color var(--dur-med) ease;
}

h1, h2, h3, h4 {
  font-weight: var(--w-bold);
  line-height: 1.18;
  letter-spacing: -.015em;
  color: var(--ink);
}

a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
ul { list-style: none; }

button, input, textarea, select {
  font: inherit;
  color: inherit;
  border: none;
  background: none;
}
button { cursor: pointer; }

:focus-visible {
  outline: none;
  box-shadow: var(--ring);
  border-radius: var(--r-sm);
}

::selection { background: rgba(46, 75, 224, .18); color: var(--ink); }

.container {
  width: min(100% - 2.5rem, 1180px);
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100000;
  background: var(--surface);
  color: var(--ink);
  padding: var(--s-3) var(--s-5);
  border-radius: var(--r-sm);
  box-shadow: var(--sh-3);
}
.skip-link:focus { left: var(--s-4); top: var(--s-4); }

/* Outlined icon system — stroke by default, a few marks opt into fill */
svg { stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
svg.icon-fill { fill: currentColor; stroke: none; }

/* ============ Buttons ============ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  font-size: var(--step--1);
  font-weight: var(--w-medium);
  padding: .68rem 1.35rem;
  border-radius: var(--r-full);
  white-space: nowrap;
  cursor: pointer;
  transition: transform var(--dur-fast) var(--ease-out),
              box-shadow var(--dur-fast) ease,
              background-color var(--dur-fast) ease,
              border-color var(--dur-fast) ease,
              color var(--dur-fast) ease;
}
.btn svg { width: 1.05em; height: 1.05em; }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--grad-brand);
  color: #fff;
  box-shadow: var(--sh-1);
}
.btn-primary:hover { box-shadow: 0 8px 20px -8px rgba(46, 75, 224, .7); }

.btn-ghost {
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line);
  box-shadow: var(--sh-1);
}
.btn-ghost:hover { border-color: var(--brand); color: var(--brand); }

.btn-block { width: 100%; }

.btn[disabled], .btn.is-loading { cursor: not-allowed; opacity: .7; transform: none; }
.btn-spinner {
  display: none;
  width: 1em; height: 1em;
  border: 2px solid rgba(255, 255, 255, .45);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
.btn.is-loading .btn-spinner { display: block; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ============ Header ============ */
.topbar {
  position: sticky;
  top: 0;
  z-index: 900;
  background: color-mix(in srgb, var(--surface) 86%, transparent);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line-soft);
  transition: box-shadow var(--dur-med) ease, border-color var(--dur-med) ease;
}
.topbar.scrolled {
  box-shadow: var(--sh-2);
  border-bottom-color: var(--line);
}

.topbar-inner {
  display: flex;
  align-items: center;
  gap: var(--s-5);
  height: var(--nav-h);
}

.brand {
  display: flex;
  align-items: center;
  gap: .6rem;
  font-size: var(--step-1);
  font-weight: var(--w-bold);
  letter-spacing: -.02em;
  margin-right: auto;
}
/* Kept as one flex item on purpose: a bare text node beside the <em> would become
   its own anonymous flex item and take the .brand gap between the two words. */
.brand-name { white-space: nowrap; }
.brand em {
  font-style: normal;
  background: var(--grad-accent);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.nav {
  display: flex;
  align-items: center;
  gap: var(--s-2);
}

.nav-link {
  position: relative;
  display: inline-block;
  padding: .45rem .9rem;
  font-size: var(--step--1);
  font-weight: var(--w-medium);
  color: var(--ink-2);
  border-radius: var(--r-full);
  transition: color var(--dur-fast) ease, background-color var(--dur-fast) ease;
}
.nav-link::after {
  content: "";
  position: absolute;
  left: 50%; right: 50%;
  bottom: .1rem;
  height: 2px;
  border-radius: var(--r-full);
  background: var(--grad-accent);
  opacity: 0;
  transition: left var(--dur-med) var(--ease-out),
              right var(--dur-med) var(--ease-out),
              opacity var(--dur-fast) ease;
}
.nav-link:hover { color: var(--ink); }
.nav-link:hover::after { left: .9rem; right: .9rem; opacity: .45; }
.nav-link.active { color: var(--ink); }
.nav-link.active::after { left: .9rem; right: .9rem; opacity: 1; }

/* Hamburger */
.hamburger {
  display: none;
  flex: none;
  width: 2.35rem; height: 2.35rem;
  border-radius: var(--r-full);
  border: 1px solid var(--line);
  background: var(--surface-2);
  padding: .6rem .55rem;
}
.hamburger .bar {
  display: block;
  height: 2px;
  border-radius: 2px;
  background: var(--ink);
  transition: transform var(--dur-med) var(--ease-out), opacity var(--dur-fast) ease;
}
.hamburger .bar + .bar { margin-top: 4px; }
.hamburger.active .bar:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.hamburger.active .bar:nth-child(2) { opacity: 0; }
.hamburger.active .bar:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* Scroll progress */
.scroll-progress {
  position: fixed;
  inset: 0 0 auto 0;
  height: 3px;
  z-index: 950;
  background: var(--grad-accent);
  transform: scaleX(0);
  transform-origin: 0 50%;
  will-change: transform;
}

/* ============ Hero band ============ */
.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: var(--grad-band);
  color: var(--ink-on-dark);
  padding: var(--s-10) 0 var(--s-11);
}
.hero::before,
.hero::after {
  content: "";
  position: absolute;
  z-index: -1;
  border-radius: 50%;
  filter: blur(10px);
  opacity: .5;
}
.hero::before {
  width: 44rem; height: 44rem;
  top: -22rem; left: -12rem;
  background: radial-gradient(circle at 35% 35%, rgba(255, 255, 255, .22), transparent 62%);
}
.hero::after {
  width: 38rem; height: 38rem;
  right: -14rem; bottom: -20rem;
  background: radial-gradient(circle at 50% 50%, rgba(221, 42, 123, .4), transparent 64%);
}

.hero h1 {
  font-size: var(--step-5);
  letter-spacing: -.03em;
  line-height: 1.1;
  text-align: center;
  color: #fff;
  max-width: 18ch;
  margin-inline: auto;
}
.hero h1 .hl {
  position: relative;
  display: inline-block;
  padding-inline: .18em;
}
.hero h1 .hl::before {
  content: "";
  position: absolute;
  inset: .1em -.02em .08em;
  z-index: -1;
  border-radius: var(--r-sm);
  background: var(--grad-accent);
  opacity: .92;
  transform: rotate(-1.2deg);
}
.hero-sub {
  margin: var(--s-4) auto 0;
  max-width: 54ch;
  text-align: center;
  font-size: var(--step-1);
  color: var(--ink-on-dark-dim);
}

/* Finder card — the white search panel that sits over the band */
.finder {
  display: flex;
  align-items: stretch;
  gap: 0;
  width: min(100%, 760px);
  margin: var(--s-7) auto 0;
  padding: var(--s-2);
  background: var(--surface);
  border-radius: var(--r-md);
  box-shadow: var(--sh-3);
}
.finder-field {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  gap: var(--s-3);
  min-width: 0;
  padding: .55rem var(--s-4);
}
.finder-field > svg {
  flex: none;
  width: 1.15rem; height: 1.15rem;
  color: var(--ink-dim);
}
.finder-field input {
  width: 100%;
  min-width: 0;
  font-size: var(--step-0);
  font-weight: var(--w-medium);
  color: var(--ink);
}
.finder-field input::placeholder { color: var(--ink-dim); font-weight: var(--w-regular); }
.finder-field input:focus-visible { box-shadow: none; }

.finder-divider {
  flex: none;
  width: 1px;
  margin: .4rem 0;
  background: var(--line);
}

.finder-select {
  flex: none;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: .3rem var(--s-4);
  min-width: 9.5rem;
}
.finder-select span {
  font-size: var(--step--2);
  color: var(--ink-dim);
  line-height: 1.3;
}
.finder-select select {
  font-size: var(--step--1);
  font-weight: var(--w-medium);
  color: var(--ink);
  cursor: pointer;
  background: transparent;
}
.finder-select select option { color: #07184f; background: #fff; }

.finder .btn {
  flex: none;
  padding-inline: 1.5rem;
  border-radius: var(--r-sm);
  background: var(--navy);
  color: #fff;
  font-weight: var(--w-bold);
}
.finder .btn:hover { background: var(--navy-2); box-shadow: var(--sh-2); }

/* Trending chips */
.trending {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: var(--s-3);
  margin-top: var(--s-5);
}
.trending-label {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  font-size: var(--step--1);
  font-weight: var(--w-bold);
  color: #fff;
}
.trending-label svg { width: 1rem; height: 1rem; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .36rem 1rem;
  font-size: var(--step--1);
  font-weight: var(--w-medium);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, .35);
  border-radius: var(--r-full);
  transition: background-color var(--dur-fast) ease, border-color var(--dur-fast) ease,
              transform var(--dur-fast) var(--ease-out);
}
.chip:hover {
  background: rgba(255, 255, 255, .16);
  border-color: rgba(255, 255, 255, .7);
  transform: translateY(-1px);
}

/* ============ Sections ============ */
.section { padding: var(--s-9) 0; }

/* Section header: bold title, hairline rule filling the gap, action on the right */
.sec-head {
  display: flex;
  align-items: center;
  gap: var(--s-4);
  margin-bottom: var(--s-6);
}
.sec-head h2 {
  flex: none;
  font-size: var(--step-2);
  font-style: italic;
  letter-spacing: -.02em;
}
.sec-head h2 .hl {
  background: var(--grad-accent);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.sec-head .rule {
  flex: 1 1 auto;
  height: 1px;
  background: var(--line-strong);
}
.sec-head .sec-action {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  font-size: var(--step--1);
  font-weight: var(--w-medium);
  color: var(--ink-2);
  transition: color var(--dur-fast) ease, gap var(--dur-fast) var(--ease-out);
}
.sec-head .sec-action svg { width: 1rem; height: 1rem; }
.sec-head .sec-action:hover { color: var(--brand); gap: .7rem; }

/* ============ Filter row ============ */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2);
  margin-bottom: var(--s-6);
}
.filter-btn {
  padding: .45rem 1.05rem;
  font-size: var(--step--1);
  font-weight: var(--w-medium);
  color: var(--ink-2);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-full);
  box-shadow: var(--sh-1);
  transition: color var(--dur-fast) ease, background-color var(--dur-fast) ease,
              border-color var(--dur-fast) ease, transform var(--dur-fast) var(--ease-out);
}
.filter-btn:hover { color: var(--ink); border-color: var(--line-strong); transform: translateY(-1px); }
.filter-btn.active {
  background: var(--navy);
  border-color: var(--navy);
  color: #fff;
}

/* ============ Link cards ============ */
.link-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: var(--s-5);
}

.link-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-md);
  box-shadow: var(--sh-1);
  padding: var(--s-4);
  transition: transform var(--dur-med) var(--ease-out),
              box-shadow var(--dur-med) ease,
              border-color var(--dur-med) ease;
}
.link-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--sh-3);
  border-color: var(--line-strong);
}
.link-card.hide { display: none; }

.card-thumb {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 16 / 10;
  margin-bottom: var(--s-4);
  border-radius: var(--r-sm);
  background: var(--surface-2);
  border: 1px solid var(--line-soft);
  color: var(--brand);
  overflow: hidden;
}
.card-thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--grad-accent);
  opacity: .07;
  transition: opacity var(--dur-med) ease;
}
.link-card:hover .card-thumb::after { opacity: .16; }
.card-thumb svg { width: 2.4rem; height: 2.4rem; stroke-width: 1.5; }

.card-badge {
  position: absolute;
  top: var(--s-2);
  right: var(--s-2);
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  padding: .18rem .55rem;
  font-size: var(--step--2);
  font-weight: var(--w-medium);
  color: var(--ink-2);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-full);
}
.card-badge svg { width: .8rem; height: .8rem; }

.link-card h3 {
  font-size: var(--step-1);
  margin-bottom: var(--s-2);
}
.link-card p {
  font-size: var(--step--1);
  color: var(--ink-dim);
  line-height: 1.6;
  margin-bottom: var(--s-4);
}

.card-foot {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  margin-top: auto;
  padding-top: var(--s-3);
  border-top: 1px solid var(--line-soft);
}
.tag {
  padding: .2rem .6rem;
  font-size: var(--step--2);
  font-weight: var(--w-medium);
  color: var(--ink-2);
  background: var(--surface-2);
  border-radius: var(--r-xs);
}
.card-go {
  margin-left: auto;
  display: grid;
  place-items: center;
  width: 1.9rem; height: 1.9rem;
  border-radius: var(--r-full);
  color: var(--ink-dim);
  background: var(--surface-2);
  transition: color var(--dur-fast) ease, background-color var(--dur-fast) ease,
              transform var(--dur-fast) var(--ease-out);
}
.card-go svg { width: .95rem; height: .95rem; }
.link-card:hover .card-go {
  color: #fff;
  background: var(--navy);
  transform: translate(2px, -2px);
}

/* Empty state for the search */
.empty-state {
  display: none;
  text-align: center;
  padding: var(--s-9) var(--s-5);
  background: var(--surface);
  border: 1px dashed var(--line-strong);
  border-radius: var(--r-md);
  color: var(--ink-dim);
}
.empty-state.show { display: block; }
.empty-state svg {
  width: 2.5rem; height: 2.5rem;
  margin: 0 auto var(--s-4);
  color: var(--ink-dim);
}
.empty-state h3 { font-size: var(--step-1); margin-bottom: var(--s-2); }
.empty-state p { font-size: var(--step--1); margin-bottom: var(--s-5); }

/* ============ Dark band (contact) ============ */
.band {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: var(--navy);
  color: var(--ink-on-dark);
  padding: var(--s-9) 0;
}

.band::after {
  content: "";
  position: absolute;
  z-index: -1;
  width: 34rem; height: 34rem;
  right: -12rem; top: -16rem;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 50%, rgba(129, 52, 175, .45), transparent 65%);
}
.band .sec-head h2 { color: #fff; }
.band .sec-head .rule { background: rgba(255, 255, 255, .25); }
.band .sec-head .sec-action { color: var(--ink-on-dark-dim); }
.band .sec-head .sec-action:hover { color: #fff; }

.contact-grid {
  display: grid;
  grid-template-columns: .85fr 1.15fr;
  gap: var(--s-8);
  align-items: start;
}

.connect-card,
.form-card {
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-md);
  box-shadow: var(--sh-2);
  padding: var(--s-6);
  color: var(--ink);
}
.connect-card h3,
.form-card h3 {
  font-size: var(--step-1);
  margin-bottom: var(--s-5);
}

.connect-list { display: grid; gap: var(--s-2); }
.connect-item {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  padding: .6rem .75rem;
  font-size: var(--step--1);
  font-weight: var(--w-medium);
  color: var(--ink-2);
  border-radius: var(--r-sm);
  transition: background-color var(--dur-fast) ease, color var(--dur-fast) ease;
}
.connect-item:hover { background: var(--surface-2); color: var(--ink); }
.connect-icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 2rem; height: 2rem;
  border-radius: var(--r-sm);
  background: var(--surface-2);
  color: var(--brand);
}
.connect-item:hover .connect-icon { background: var(--grad-brand); color: #fff; }
.connect-icon svg { width: 1rem; height: 1rem; }

.availability {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  margin-top: var(--s-5);
  padding: .4rem .9rem;
  font-size: var(--step--2);
  font-weight: var(--w-medium);
  color: #1a7f4b;
  background: rgba(26, 127, 75, .1);
  border-radius: var(--r-full);
}
.dot-pulse {
  width: .5rem; height: .5rem;
  border-radius: 50%;
  background: currentColor;
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .4; transform: scale(.75); }
}

/* Frameless form fields */
.field { position: relative; margin-bottom: var(--s-5); }
.field label {
  display: block;
  font-size: var(--step--1);
  font-weight: var(--w-medium);
  color: var(--ink);
  margin-bottom: var(--s-1);
}
.field .req { color: #dd2a7b; }
.field input,
.field textarea {
  display: block;
  width: 100%;
  background: transparent;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  padding: .65rem 0;
  font-size: var(--step-0);
  color: var(--ink);
  resize: vertical;
  transition: border-color var(--dur-fast) ease;
}
.field input::placeholder,
.field textarea::placeholder { color: var(--ink-dim); opacity: .6; }
.field input:focus-visible,
.field textarea:focus-visible { box-shadow: none; }
.field::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 2px;
  border-radius: var(--r-full);
  background: var(--grad-accent);
  transform: scaleX(0);
  transform-origin: 0 50%;
  transition: transform var(--dur-med) var(--ease-out);
}
.field:focus-within::after { transform: scaleX(1); }
.field.error::after { background: #e0455b; transform: scaleX(1); }

.form-status {
  margin-top: var(--s-4);
  font-size: var(--step--1);
  min-height: 1.3em;
  color: var(--ink-dim);
}
.form-status.success { color: #1a7f4b; }
.form-status.error { color: #e0455b; }

/* ============ Footer ============ */
.site-footer {
  background: var(--bg-soft);
  border-top: 1px solid var(--line);
  padding: var(--s-7) 0;
}
.footer-grid {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-4);
  font-size: var(--step--1);
  color: var(--ink-dim);
}
.footer-credit .credit-link {
  color: var(--ink-2);
  font-weight: var(--w-medium);
  text-decoration: underline;
  text-decoration-color: var(--line-strong);
  text-underline-offset: 3px;
  transition: color var(--dur-fast) ease, text-decoration-color var(--dur-fast) ease;
}
.footer-credit .credit-link:hover { color: var(--brand); text-decoration-color: var(--brand); }

.social { display: flex; gap: var(--s-2); }
.social a {
  display: grid;
  place-items: center;
  width: 2.2rem; height: 2.2rem;
  border-radius: var(--r-full);
  color: var(--ink-2);
  background: var(--surface);
  border: 1px solid var(--line);
  transition: color var(--dur-fast) ease, background-color var(--dur-fast) ease,
              transform var(--dur-fast) var(--ease-out);
}
.social a:hover { color: #fff; background: var(--grad-brand); transform: translateY(-2px); }
.social svg { width: 1.05rem; height: 1.05rem; }

/* Back to top */
.to-top {
  position: fixed;
  right: var(--s-5);
  bottom: var(--s-5);
  z-index: 800;
  display: grid;
  place-items: center;
  width: 2.8rem; height: 2.8rem;
  border-radius: var(--r-full);
  background: var(--navy);
  color: #fff;
  box-shadow: var(--sh-3);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity var(--dur-med) ease, transform var(--dur-med) var(--ease-out),
              visibility var(--dur-med) ease;
}
.to-top.show { opacity: 1; visibility: visible; transform: translateY(0); }
.to-top svg { width: 1.1rem; height: 1.1rem; }

/* ============ Reveal-on-scroll ============
   Scoped to html.js so the page still renders if JS never runs. */
html.js .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .6s var(--ease-out), transform .6s var(--ease-out);
  transition-delay: calc(var(--reveal-i, 0) * 60ms);
}
html.js .reveal.in-view { opacity: 1; transform: translateY(0); }

/* ============ Responsive ============ */
@media (max-width: 900px) {
  .contact-grid { grid-template-columns: 1fr; gap: var(--s-6); }
}

@media (max-width: 760px) {
  .hamburger { display: block; }

  /* The closed drawer stays at its final position and is hidden with
     opacity/visibility. Parking it off-canvas (e.g. right: -100vw) would widen
     the document and give the whole page a horizontal scroll on phones. */
  .nav {
    position: fixed;
    top: var(--nav-h);
    right: var(--s-4);
    flex-direction: column;
    align-items: stretch;
    width: min(80vw, 20rem);
    padding: var(--s-5);
    gap: var(--s-2);
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    box-shadow: var(--sh-3);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px) scale(.98);
    transform-origin: 100% 0;
    transition: opacity var(--dur-fast) ease,
                transform var(--dur-med) var(--ease-out),
                visibility var(--dur-med) ease;
  }
  .nav.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
  }
  .nav-link { padding: .6rem .9rem; font-size: var(--step-0); }
  .nav .btn { width: 100%; }

  .finder {
    flex-direction: column;
    gap: var(--s-2);
    padding: var(--s-3);
  }
  .finder-divider { width: auto; height: 1px; margin: 0 var(--s-4); }
  .finder-select { min-width: 0; }
  .finder .btn { width: 100%; }

  .sec-head { flex-wrap: wrap; }
  .sec-head .rule { order: 3; flex-basis: 100%; }

  .hero { padding: var(--s-8) 0 var(--s-9); }
  .section { padding: var(--s-8) 0; }
  .band { padding: var(--s-8) 0; }
  .connect-card, .form-card { padding: var(--s-5); }
  .footer-grid { flex-direction: column; text-align: center; }
}

@media (max-width: 560px) {
  .link-grid { grid-template-columns: 1fr; }
  .brand { font-size: var(--step-0); }
  .brand img { width: 1.75rem; height: 1.75rem; }
}

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