/**
 * MYME TECHIES — base, header, buttons, shared components, footer
 */

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

html { scroll-behavior: smooth; scroll-padding-top: var(--nav-offset); }
html, body { overflow-x: clip; }

body {
  font-family: var(--font-body);
  font-size: var(--fs-md);
  line-height: var(--lh-body);
  color: var(--text);
  background: var(--cream);
  min-height: 100%;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.is-locked { overflow: hidden; }

img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; }
button { background: none; border: none; cursor: pointer; color: inherit; }
ul, ol { list-style: none; }

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 700;
  letter-spacing: var(--track-tight);
  line-height: var(--lh-tight);
  color: var(--text);
}

:focus-visible { outline: 2px solid var(--teal-600); outline-offset: 3px; border-radius: 4px; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: 1rem; top: -4rem; z-index: 2000;
  padding: 0.7rem 1rem; background: var(--charcoal); color: var(--white); font-weight: 600;
  border-radius: var(--radius-sm);
}
.skip-link:focus { top: 0.75rem; }

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

.section { position: relative; padding: var(--space-9) 0; }
.bg-white { background: var(--white); }
.bg-cream { background: var(--cream); }
.bg-beige { background: var(--beige); }
.bg-dark { background: var(--charcoal); color: var(--text-on-dark); }

/* ---------- Typographic helpers ---------- */

.section-kicker {
  display: inline-flex; align-items: center; gap: 0.7rem;
  margin-bottom: 1rem;
  font-size: 0.72rem; font-weight: 600; letter-spacing: var(--track-wide);
  text-transform: uppercase; color: var(--teal-deep);
}
.section-kicker::before { content: ""; width: 26px; height: 1px; background: currentColor; opacity: 0.7; }

.on-dark .section-kicker, .section-kicker.is-light { color: var(--teal); }

.section-title { font-size: var(--fs-3xl); max-width: 18ch; }
.section-lead { max-width: 36rem; color: var(--text-soft); font-size: var(--fs-lg); }

.section-head {
  display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: var(--space-6); align-items: end; margin-bottom: var(--space-7);
}
.section-head .section-lead { justify-self: end; }
.section-head .head-side { display: grid; gap: 1.1rem; justify-items: end; }
.section-head .head-side .section-lead { font-size: 1rem; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.6rem;
  min-height: 46px; padding: 0 1.4rem;
  border-radius: var(--radius-pill);
  font-family: var(--font-heading); font-size: 0.92rem; font-weight: 700; letter-spacing: -0.01em;
  border: 1px solid transparent;
  transition: transform var(--t), background-color var(--t), color var(--t), border-color var(--t), box-shadow var(--t);
  white-space: nowrap;
}
.btn svg { width: 17px; height: 17px; flex: none; }
.btn .arrow { transition: transform var(--t); }
.btn:hover .arrow { transform: translateX(4px); }

.btn-teal { background: var(--teal); color: #03211c; box-shadow: 0 0 0 0 rgba(25, 230, 200, 0); }
.btn-teal:hover { background: #4ff2da; box-shadow: 0 10px 34px -6px rgba(25, 230, 200, 0.55); transform: translateY(-2px); }

.btn-ghost { color: var(--text-on-dark); border-color: rgba(255, 255, 255, 0.4); background: rgba(255, 255, 255, 0.02); }
.btn-ghost:hover { border-color: var(--teal); color: var(--teal); transform: translateY(-2px); }

.btn-dark { background: var(--charcoal); color: var(--white); }
.btn-dark:hover { background: #1b2724; transform: translateY(-2px); }

.btn-lg { min-height: 52px; padding: 0 1.7rem; font-size: 0.97rem; }

.text-link {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-family: var(--font-heading); font-weight: 700; font-size: 0.92rem; color: var(--teal-deep);
  border-bottom: 1px solid transparent; padding-bottom: 2px;
  transition: gap var(--t), border-color var(--t), color var(--t);
}
.text-link svg { width: 15px; height: 15px; transition: transform var(--t); }
.text-link:hover { border-color: currentColor; }
.text-link:hover svg { transform: translateX(4px); }
.on-dark .text-link { color: var(--teal); }

.tag-row { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.tag {
  padding: 0.22rem 0.7rem; border-radius: var(--radius-pill);
  font-size: 0.72rem; font-weight: 500; color: var(--teal-deep);
  background: rgba(8, 128, 111, 0.09); border: 1px solid rgba(8, 128, 111, 0.16);
}

/* ---------- Header ---------- */

.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: var(--z-header);
  padding: 14px var(--gutter);
  transition: padding var(--t), transform var(--t);
  pointer-events: none;
}
/* Scroll-direction behaviour: slide the (fixed) header out of view while
   scrolling down, back in while scrolling up. The extra 64px clears the
   pill's drop shadow so no smudge remains at the viewport edge. Being fixed,
   hiding it never leaves a gap in the page flow. */
.site-header.is-hidden { transform: translate3d(0, calc(-100% - 64px), 0); }
.nav-pill {
  pointer-events: auto;
  display: flex; align-items: center; justify-content: space-between; gap: 1.5rem;
  max-width: var(--wrap-wide); margin: 0 auto;
  padding: 8px 8px 8px 20px;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  transition: background-color var(--t), border-color var(--t), box-shadow var(--t), backdrop-filter var(--t);
}
.site-header.is-scrolled .nav-pill,
.site-header.is-solid .nav-pill {
  background: rgba(8, 13, 12, 0.94);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  backdrop-filter: blur(16px) saturate(140%);
  border-color: rgba(255, 255, 255, 0.09);
  box-shadow: 0 18px 50px -20px rgba(0, 0, 0, 0.6);
}

.brand { display: inline-flex; align-items: center; gap: 0.7rem; color: var(--white); }
.brand-mark { width: 38px; height: 38px; flex: none; }
.brand-name {
  display: flex; flex-direction: column; line-height: 1;
  font-family: var(--font-heading); font-weight: 800; font-size: 1.3rem; letter-spacing: -0.02em;
}
.brand-name span {
  margin-top: 4px; font-size: 0.56rem; font-weight: 600; letter-spacing: 0.42em; color: var(--text-on-dark-soft);
}

.nav-cluster { display: flex; align-items: center; gap: 1.2rem; }
.nav-links { display: flex; align-items: center; gap: 0.2rem; }
.nav-link {
  position: relative; display: block; padding: 0.55rem 0.85rem;
  font-size: 0.86rem; font-weight: 500; color: var(--text-on-dark-soft);
  transition: color var(--t-fast);
}
.nav-link::after {
  content: ""; position: absolute; left: 0.85rem; right: 0.85rem; bottom: 0.2rem; height: 2px;
  background: var(--teal); border-radius: 2px; transform: scaleX(0); transform-origin: left; transition: transform var(--t);
}
.nav-link:hover, .nav-link[aria-current] { color: var(--white); }
.nav-link[aria-current]::after, .nav-link:hover::after { transform: scaleX(1); }

.nav-cta { min-height: 42px; padding: 0 1.15rem; font-size: 0.86rem; }

.menu-toggle {
  display: none; width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.25);
  flex-direction: column; align-items: center; justify-content: center; gap: 5px;
}
.menu-toggle span { display: block; width: 18px; height: 2px; background: var(--white); border-radius: 2px; }

.menu-overlay {
  position: fixed; inset: 0; z-index: var(--z-overlay);
  display: flex; flex-direction: column; gap: 2rem;
  padding: 1.1rem var(--gutter) 2rem;
  background: radial-gradient(900px 500px at 90% 0%, rgba(25, 230, 200, 0.16), transparent 60%), var(--ink);
  color: var(--white);
}
.menu-overlay[hidden] { display: none; }
.menu-overlay-top { display: flex; align-items: center; justify-content: space-between; }
.menu-close {
  width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, 0.25);
  font-size: 1.7rem; line-height: 1; color: var(--white);
}
.menu-overlay-links { display: grid; gap: 0.2rem; margin-top: 1rem; }
.menu-overlay-links a {
  padding: 0.7rem 0; border-bottom: 1px solid var(--line-dark);
  font-family: var(--font-heading); font-size: 1.7rem; font-weight: 700; letter-spacing: -0.02em;
}
.menu-overlay-links a:hover { color: var(--teal); }
.menu-overlay .btn { align-self: flex-start; }

/* ---------- Footer ---------- */

.site-footer {
  position: relative; overflow: hidden;
  background: var(--ink); color: var(--text-on-dark-soft);
  padding: var(--space-8) 0 var(--space-5);
}
.site-footer::before {
  content: ""; position: absolute; left: -10%; bottom: -60%; width: 60%; height: 120%;
  background: radial-gradient(closest-side, rgba(25, 230, 200, 0.1), transparent); pointer-events: none;
}
.footer-grid {
  position: relative; display: grid; gap: var(--space-6);
  grid-template-columns: 1.5fr 0.8fr 1fr 1.2fr;
  padding-bottom: var(--space-7); border-bottom: 1px solid var(--line-dark);
}
.footer-blurb { margin: 1.1rem 0 1.4rem; max-width: 22rem; font-size: 0.9rem; line-height: 1.7; }
.footer-title {
  margin-bottom: 1.1rem; font-family: var(--font-heading);
  font-size: 0.92rem; font-weight: 700; letter-spacing: 0; color: var(--white);
}
.footer-list { display: grid; gap: 0.7rem; font-size: 0.9rem; }
.footer-list a { transition: color var(--t-fast); }
.footer-list a:hover { color: var(--teal); }
.footer-contact li { display: flex; align-items: flex-start; gap: 0.7rem; }
.footer-contact svg { width: 17px; height: 17px; margin-top: 3px; color: var(--teal); flex: none; }

.social-row { display: flex; gap: 0.6rem; }
.social-link {
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.2); color: var(--white);
  transition: border-color var(--t), color var(--t), transform var(--t), background-color var(--t);
}
.social-link svg { width: 17px; height: 17px; }
.social-link:hover { border-color: var(--teal); color: var(--teal); transform: translateY(-3px); background: rgba(25, 230, 200, 0.06); }

.footer-bottom {
  position: relative; display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  padding-top: var(--space-5); font-size: 0.82rem;
}

/* ---------- Responsive ---------- */

@media (max-width: 1040px) {
  .nav-links { display: none; }
  .menu-toggle { display: flex; }
  .section-head { grid-template-columns: 1fr; align-items: start; }
  .section-head .section-lead, .section-head .head-side { justify-self: start; justify-items: start; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 560px) {
  .site-header { padding: 10px 0.7rem; }
  .nav-pill { padding-left: 14px; gap: 0.5rem; }
  .nav-cta { display: none; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; }
}
