/* ==========================================================================
   Baby Safety Inc. — Global Styles
   1. variables  2. reset  3. typography  4. layout
   5. header     6. buttons  7. sections  8. cards
   9. footer     10. animations
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Variables
   -------------------------------------------------------------------------- */
:root {
  --navy: #003b6f;
  --navy-mid: #00467f;
  --navy-dark: #002f5d;
  --navy-deep: #001e3c;
  --white: #ffffff;
  --off-white: #f5f7f9;
  --silver: #d9dee3;
  --muted: #8ea1b2;
  --text: #16324a;
  --text-body: #5c6f82;
  --text-soft: #7a8b9a;
  --focus: #1a6fb5;
  --error: #b42318;
  --success: #067647;
  --radius: 16px;
  --radius-lg: 20px;
  --radius-sm: 10px;
  --radius-btn: 8px;
  --shadow: 0 10px 30px rgba(0, 47, 93, 0.08);
  --shadow-soft: 0 6px 20px rgba(0, 47, 93, 0.06);
  --shadow-lift: 0 16px 36px rgba(0, 47, 93, 0.14);
  --container: 1220px;
  --header-h: 86px;
  --space-1: 8px;
  --space-2: 16px;
  --space-3: 24px;
  --space-4: 32px;
  --space-5: 48px;
  --space-6: 72px;
  --space-7: 96px;
  --space-8: 120px;
  --font: "Manrope", "Inter", "Segoe UI", sans-serif;
  --script: "Caveat", "Segoe Script", cursive;
  --ease: 0.28s ease;
}

/* --------------------------------------------------------------------------
   2. Reset
   -------------------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--white);
  line-height: 1.65;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body.nav-open {
  overflow: hidden;
}

img,
svg {
  max-width: 100%;
  height: auto;
  display: block;
}

img {
  object-fit: cover;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  border: 0;
  background: none;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

p,
h1,
h2,
h3,
h4 {
  margin: 0;
}

address {
  font-style: normal;
}

/* --------------------------------------------------------------------------
   3. Typography
   -------------------------------------------------------------------------- */
.eyebrow {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--navy);
  margin-bottom: 14px;
}

.eyebrow--light {
  color: rgba(255, 255, 255, 0.72);
}

h1,
.h1 {
  font-size: clamp(2.35rem, 5vw, 4rem);
  line-height: 1.08;
  font-weight: 800;
  letter-spacing: -0.035em;
  color: var(--navy-dark);
}

h2,
.h2 {
  font-size: clamp(1.85rem, 3.4vw, 2.85rem);
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--navy-dark);
}

h3,
.h3 {
  font-size: 1.15rem;
  line-height: 1.35;
  font-weight: 700;
  color: var(--navy-dark);
}

.lead {
  font-size: 1.05rem;
  color: var(--text-body);
  max-width: 38rem;
}

.body-copy {
  color: var(--text-body);
  max-width: 38rem;
}

.body-copy + .body-copy {
  margin-top: 16px;
}

.script {
  font-family: var(--script);
  font-weight: 500;
  line-height: 1.15;
  color: #6b7c8a;
}

/* --------------------------------------------------------------------------
   4. Layout
   -------------------------------------------------------------------------- */
.skip-link {
  position: absolute;
  left: 16px;
  top: -48px;
  z-index: 1000;
  background: var(--navy);
  color: var(--white);
  padding: 8px 14px;
  border-radius: 6px;
}

.skip-link:focus {
  top: 16px;
}

.container {
  width: min(var(--container), calc(100% - 48px));
  margin-inline: auto;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* --------------------------------------------------------------------------
   5. Header
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(217, 222, 227, 0.7);
  transition: box-shadow var(--ease);
}

.site-header.is-stuck {
  box-shadow: 0 8px 24px rgba(0, 47, 93, 0.08);
}

.header-inner {
  min-height: var(--header-h);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
  justify-self: start;
}

.brand img {
  height: 58px;
  width: auto;
  object-fit: contain;
}

.brand-tagline {
  font-size: 11.5px;
  line-height: 1.35;
  color: var(--muted);
  font-weight: 500;
  max-width: 128px;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 30px;
}

.nav-list a {
  position: relative;
  font-size: 15px;
  font-weight: 600;
  color: #4d6070;
  padding: 8px 0;
}

.nav-list a:hover,
.nav-list a.is-active {
  color: var(--navy-dark);
}

.nav-list a.is-active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: var(--navy);
  border-radius: 2px;
}

.header-cta {
  justify-self: end;
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--navy-dark);
  border-radius: 2px;
  transition: var(--ease);
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.site-nav .nav-mobile-cta {
  display: none;
}

.nav-backdrop {
  display: none;
}

/* --------------------------------------------------------------------------
   6. Buttons
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 12px 22px;
  border-radius: var(--radius-btn);
  font-size: 14.5px;
  font-weight: 700;
  letter-spacing: 0.01em;
  border: 1.5px solid transparent;
  transition: transform var(--ease), box-shadow var(--ease), background var(--ease), color var(--ease), border-color var(--ease);
  white-space: nowrap;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--navy);
  color: var(--white);
}

.btn-primary:hover {
  background: var(--navy-dark);
  box-shadow: 0 10px 20px rgba(0, 47, 93, 0.18);
}

.btn-secondary {
  background: var(--white);
  color: var(--navy);
  border-color: var(--navy);
}

.btn-secondary:hover {
  background: var(--off-white);
}

.btn-ghost {
  background: transparent;
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.8);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.1);
}

.btn-light {
  background: var(--white);
  color: var(--navy);
}

.btn-light:hover {
  box-shadow: var(--shadow-soft);
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.icon {
  width: 22px;
  height: 22px;
  color: var(--navy);
  flex-shrink: 0;
}

/* --------------------------------------------------------------------------
   7. Forms
   -------------------------------------------------------------------------- */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px 20px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field--full {
  grid-column: 1 / -1;
}

.field label {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--navy-dark);
}

.field input,
.field textarea,
.field select {
  width: 100%;
  border: 1px solid #c9d3dc;
  border-radius: 10px;
  padding: 12px 14px;
  background: var(--white);
  transition: border-color var(--ease), box-shadow var(--ease);
}

.field textarea {
  min-height: 140px;
  resize: vertical;
}

.field input:focus,
.field textarea:focus,
.field select:focus {
  outline: none;
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(0, 59, 111, 0.12);
}

.field.is-invalid input,
.field.is-invalid textarea,
.field.is-invalid select {
  border-color: var(--error);
}

.field-error {
  display: none;
  color: var(--error);
  font-size: 12.5px;
}

.field.is-invalid .field-error {
  display: block;
}

.form-success {
  display: none;
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: 10px;
  background: #e8f6ee;
  color: var(--success);
  font-weight: 600;
}

.form-success.is-visible {
  display: block;
}

/* --------------------------------------------------------------------------
   8. Cards
   -------------------------------------------------------------------------- */
.product-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  transition: transform var(--ease), box-shadow var(--ease);
}

.product-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lift);
}

.product-card > img {
  width: 100%;
  height: 168px;
  object-fit: cover;
}

.product-card-body .icon {
  width: 22px;
  height: 22px;
  object-fit: contain;
}

a[href^="mailto"] {
  color: var(--navy);
  font-weight: 700;
}

.product-card-body {
  padding: 20px 18px 22px;
}

.product-card-body h3 {
  margin: 10px 0 8px;
}

.product-card-body p {
  color: var(--text-body);
  font-size: 14px;
}

.address-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-soft);
}

.address-card p,
.address-card address {
  color: var(--text-body);
  font-size: 14.5px;
  line-height: 1.6;
}

/* --------------------------------------------------------------------------
   9. Footer
   -------------------------------------------------------------------------- */
.site-footer {
  background: var(--off-white);
  border-top: 1px solid var(--silver);
  padding: 64px 0 24px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr 0.9fr 1.1fr 1fr;
  gap: 32px;
}

.footer-brand p {
  margin-top: 14px;
  color: var(--text-body);
  font-size: 14.5px;
  max-width: 240px;
}

.footer-brand img {
  height: 56px;
  width: auto;
  object-fit: contain;
}

.footer-col h4 {
  font-size: 14px;
  font-weight: 800;
  color: var(--navy-dark);
  margin-bottom: 14px;
}

.footer-col a,
.footer-col p,
.footer-col address {
  display: block;
  color: var(--text-body);
  font-size: 14.5px;
  margin-bottom: 8px;
}

.footer-col a:hover {
  color: var(--navy);
}

.footer-bottom {
  margin-top: 40px;
  padding-top: 18px;
  border-top: 1px solid var(--silver);
  display: flex;
  justify-content: space-between;
  gap: 16px;
  color: var(--text-soft);
  font-size: 13.5px;
}

.footer-legal {
  display: flex;
  gap: 18px;
}

.back-to-top {
  position: fixed;
  right: 22px;
  bottom: 22px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--navy);
  color: var(--white);
  display: grid;
  place-items: center;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: var(--ease);
  z-index: 70;
}

.back-to-top.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: none;
}

/* --------------------------------------------------------------------------
   10. Animations & focus
   -------------------------------------------------------------------------- */
.reveal {
  opacity: 1;
  transform: none;
}

.js .reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.btn:focus-visible,
.nav-list a:focus-visible {
  outline-offset: 4px;
}
