/* ============================================================
   Mak Agency Inc. — "Bright Beach" theme
   Airy white-sand page, clear turquoise water, sunny gold and
   coral accents. Light hero with lapping waves at the shore.
   Type: Fraunces (warm editorial serif) for headings,
   DM Sans for body and UI.
   Accessibility: WCAG 2.1 AA — all text/background pairs meet
   4.5:1 (normal) / 3:1 (large & UI), visible focus indicators,
   reduced-motion support, rem-based sizing, 44px touch targets.
   Responsive: mobile-first, nav collapses below 820px.
   ============================================================ */

:root {
  /* Beach palette */
  --water: #0e7490;        /* turquoise — primary action (5.4:1 w/ white) */
  --water-deep: #0a4f63;   /* deep water — CTA band, hovers */
  --ocean-ink: #0f3a47;    /* headings & dark text (12.4:1 on white) */
  --ink: #22404c;          /* body text (9.6:1 on white) */
  --ink-soft: #46626d;     /* secondary text (5.9:1 on white) */
  --coral: #ba4a33;        /* coral — eyebrows, accents (5.1:1 on white) */
  --sun: #f4b942;          /* sunshine gold (decorative) */
  --sun-soft: #ffe9bf;
  --sky: #eafcfa;          /* hero sky */
  --aqua: #bfeeea;         /* shallow water tint */
  --foam: #f2fbfa;         /* pale aqua section background */
  --sand: #faf3e7;         /* warm sand section background */
  --white: #ffffff;

  --radius: 18px;
  /* Depth tiers: base (none) → elevated → floating, color-tinted and layered */
  --shadow: 0 1px 2px rgba(15, 58, 71, 0.05), 0 10px 28px rgba(15, 58, 71, 0.1);
  --shadow-float: 0 2px 6px rgba(15, 58, 71, 0.07), 0 14px 28px rgba(15, 58, 71, 0.1), 0 26px 52px rgba(15, 58, 71, 0.12);
  --font-head: "Fraunces", Georgia, serif;
  --font-body: "DM Sans", "Segoe UI", sans-serif;
}

/* ---------- Reset & base ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--ink);
  background: var(--white);
}

h1, h2, h3 {
  font-family: var(--font-head);
  font-weight: 600;
  line-height: 1.12;
  color: var(--ocean-ink);
  margin: 0 0 0.6em;
}

h1 { font-size: clamp(2.4rem, 6vw, 3.8rem); letter-spacing: -0.015em; }
h2 { font-size: clamp(1.8rem, 4.2vw, 2.6rem); letter-spacing: -0.01em; }
h3 { font-size: 1.35rem; letter-spacing: 0; }

.accent-word {
  font-style: italic;
  color: var(--coral);
}

p { margin: 0 0 1em; }

img, svg { max-width: 100%; height: auto; }

a { color: var(--water); }
a:hover { color: var(--water-deep); }

address { font-style: normal; }

ul[role="list"] {
  list-style: none;
  margin: 0;
  padding: 0;
}

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

.section { padding: clamp(3.5rem, 8vw, 6rem) 0; }

.section-alt { background: var(--foam); }

.section-head {
  max-width: 44rem;
  margin: 0 auto clamp(2rem, 5vw, 3rem);
  text-align: center;
}

.section-intro { color: var(--ink-soft); font-size: 1.125rem; }

.eyebrow {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--coral);
  margin-bottom: 0.75rem;
}

.eyebrow-light { color: var(--sun); }

/* ---------- Focus visibility (WCAG 2.4.7) ---------- */
:focus-visible {
  outline: 3px solid var(--coral);
  outline-offset: 3px;
  border-radius: 4px;
}

.section-cta :focus-visible,
.site-footer :focus-visible {
  outline-color: var(--sun);
}

/* ---------- Skip link (WCAG 2.4.1) ---------- */
.skip-link {
  position: absolute;
  left: 1rem;
  top: 0;
  z-index: 100;
  padding: 0.75rem 1.25rem;
  background: var(--water-deep);
  color: var(--white);
  font-weight: 700;
  text-decoration: none;
  border-radius: 0 0 12px 12px;
  transform: translateY(-130%);
  transition: transform 0.2s ease;
}

.skip-link:focus { transform: translateY(0); }

/* ---------- Buttons (44px+ touch targets) ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 48px;
  padding: 0.8rem 1.7rem;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  border: 2px solid transparent;
  border-radius: 999px;
  cursor: pointer;
  transition: transform 0.15s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.btn:hover { transform: translateY(-2px); }

.btn:active { transform: translateY(0) scale(0.98); }

.btn-primary {
  background: var(--water);
  color: var(--white);
  box-shadow: 0 2px 5px rgba(14, 116, 144, 0.25), 0 8px 20px rgba(14, 116, 144, 0.3);
}

.btn-primary:hover {
  background: var(--water-deep);
  color: var(--white);
}

.btn-secondary {
  background: var(--white);
  color: var(--water);
  border-color: var(--water);
}

.btn-secondary:hover {
  background: var(--sky);
  color: var(--water-deep);
}

.btn-block { width: 100%; }

/* ---------- Header & navigation ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--white);
  border-bottom: 1px solid #dff0ee;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  flex: none;
  border-radius: 50%;
  background: var(--white);
  border: 2px solid #cfe9e6;
}

.brand-mark svg { display: block; }

.brand-text { display: flex; flex-direction: column; line-height: 1.25; }

.brand-name {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--ocean-ink);
}

.brand-sub {
  font-size: 0.8rem;
  color: var(--ink-soft);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 48px;
  height: 48px;
  padding: 12px;
  background: none;
  border: 2px solid #cfe9e6;
  border-radius: 12px;
  cursor: pointer;
}

.nav-toggle-bar {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--ocean-ink);
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.primary-nav ul {
  display: flex;
  align-items: center;
  gap: 1.4rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.primary-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--ink);
  text-decoration: none;
}

.primary-nav a:not(.nav-cta) { position: relative; }

.primary-nav a:not(.nav-cta)::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 8px;
  height: 2px;
  border-radius: 2px;
  background: var(--coral);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}

.primary-nav a:not(.nav-cta):hover::after,
.primary-nav a:not(.nav-cta):focus-visible::after { transform: scaleX(1); }

.primary-nav a:hover { color: var(--water-deep); }

.primary-nav a:active { transform: scale(0.97); }

.primary-nav .nav-cta {
  padding: 0.45rem 1.2rem;
  background: var(--water);
  color: var(--white);
  border-radius: 999px;
}

.primary-nav .nav-cta:hover {
  background: var(--water-deep);
  color: var(--white);
  text-decoration: none;
}

/* ---------- Hero: a bright day at the beach ---------- */
.hero {
  position: relative;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='0.05'/%3E%3C/svg%3E") repeat,
    radial-gradient(22rem 22rem at 85% 8%, var(--sun-soft) 0%, rgba(255, 233, 191, 0) 60%),
    radial-gradient(30rem 20rem at 4% 96%, rgba(86, 196, 214, 0.22) 0%, rgba(86, 196, 214, 0) 65%),
    linear-gradient(180deg, var(--sky) 0%, #d9f7f3 55%, var(--aqua) 100%);
  color: var(--ink);
  padding: clamp(4rem, 9vw, 6.5rem) 0 clamp(7rem, 13vw, 10rem);
  overflow: hidden;
}

/* Turquoise water rolling in */
.hero::before {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: clamp(70px, 11vw, 150px);
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 150' preserveAspectRatio='none'%3E%3Cpath fill='%2356c4d6' opacity='0.55' d='M0,70 C200,30 420,95 720,70 C1020,45 1240,95 1440,55 L1440,150 L0,150 Z'/%3E%3Cpath fill='%230e7490' d='M0,100 C240,60 480,125 720,100 C960,75 1200,125 1440,85 L1440,150 L0,150 Z'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
}

/* Foam line where the water meets the sand below */
.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 -1px;
  height: clamp(26px, 4.5vw, 50px);
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 50' preserveAspectRatio='none'%3E%3Cpath fill='%23ffffff' d='M0,28 C240,48 480,8 720,24 C960,40 1200,46 1440,20 L1440,50 L0,50 Z'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
}

.hero-inner {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 3rem;
  align-items: center;
}

.hero .eyebrow { color: var(--coral); }

.hero h1 { color: var(--ocean-ink); }

.hero-lead {
  font-size: 1.2rem;
  max-width: 34rem;
  color: var(--ink);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin: 1.6rem 0;
}

.hero-trust {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 0.8rem;
  font-size: 0.95rem;
  color: var(--ink);
}

.hero-trust li {
  background: var(--white);
  padding: 0.35rem 1rem;
  border-radius: 999px;
  border: 1px solid #cfe9e6;
  box-shadow: 0 1px 2px rgba(15, 58, 71, 0.05), 0 4px 12px rgba(15, 58, 71, 0.08);
}

.hero-trust strong { color: var(--water-deep); }

/* Hero entrance: staggered rise on load */
@keyframes rise {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hero-content > * { animation: rise 0.7s cubic-bezier(0.22, 1, 0.36, 1) both; }

.hero-content > .eyebrow      { animation-delay: 0.05s; }
.hero-content > h1            { animation-delay: 0.15s; }
.hero-content > .hero-lead    { animation-delay: 0.27s; }
.hero-content > .hero-actions { animation-delay: 0.39s; }
.hero-content > .hero-trust   { animation-delay: 0.51s; }

/* Beach-towel card */
@keyframes card-in {
  from { opacity: 0; transform: translateY(28px) rotate(-2deg); }
  to   { opacity: 1; transform: translateY(0) rotate(-2deg); }
}

@keyframes bob {
  from { transform: translateY(0); }
  to   { transform: translateY(-9px); }
}

@keyframes glow-pulse {
  from { opacity: 0.7; transform: scale(0.96); }
  to   { opacity: 1; transform: scale(1.04); }
}

.hero-card {
  position: relative;
  display: none;
  justify-self: center;
  transform: rotate(-2deg);
  animation: card-in 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.35s both;
}

.hero-card-glow {
  position: absolute;
  inset: -14%;
  background: radial-gradient(circle, rgba(244, 185, 66, 0.4), transparent 65%);
  filter: blur(10px);
  animation: glow-pulse 4s ease-in-out infinite alternate;
}

.hero-card-inner {
  animation: bob 5s ease-in-out 1.3s infinite alternate;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  width: 17rem;
  padding: 2.6rem 2rem;
  background: var(--white);
  border: 1px solid #d8efec;
  border-radius: 22px;
  box-shadow: var(--shadow-float);
  text-align: center;
}

.hero-card-inner::before {
  content: "";
  position: absolute;
  top: 0;
  left: 22px;
  right: 22px;
  height: 6px;
  border-radius: 0 0 6px 6px;
  background: repeating-linear-gradient(
    90deg,
    var(--water) 0 18px,
    var(--sun) 18px 36px,
    #e8a08c 36px 54px
  );
}

.hero-card-logo {
  display: block;
  width: 180px;
  height: auto;
}

.hero-card-line {
  width: 56px;
  height: 3px;
  border-radius: 3px;
  background: var(--sun);
}

.hero-card-label {
  font-family: var(--font-head);
  font-style: italic;
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--ocean-ink);
}

/* ---------- Coverage cards ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15.5rem, 1fr));
  gap: 1.4rem;
}

.card {
  position: relative;
  background: var(--white);
  border: 1px solid #dff0ee;
  border-radius: var(--radius);
  padding: 1.9rem 1.6rem 1.7rem;
  box-shadow: var(--shadow);
  transition: transform 0.18s ease;
}

.card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 1.6rem;
  width: 48px;
  height: 5px;
  border-radius: 0 0 5px 5px;
  background: linear-gradient(90deg, var(--water), var(--sun));
  transition: width 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.card:hover { transform: translateY(-4px); }

.card:hover::before { width: 96px; }

.card-icon {
  font-size: 2rem;
  display: inline-block;
  margin-bottom: 0.7rem;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.card:hover .card-icon { transform: translateY(-4px) rotate(-6deg); }

.card h3 { margin-bottom: 0.4rem; }

.card p { margin: 0; color: var(--ink-soft); }

/* ---------- Why us ---------- */
.section-alt .why-inner { align-items: center; }

.why-inner {
  display: grid;
  gap: 3rem;
  align-items: center;
}

.check-list { display: grid; gap: 0.8rem; margin-top: 1.4rem; }

.check-list li {
  position: relative;
  padding-left: 2.1rem;
  font-weight: 600;
}

.check-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0.1em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.45rem;
  height: 1.45rem;
  border-radius: 50%;
  background: var(--water);
  color: var(--white);
  font-size: 0.85rem;
  font-weight: 700;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.2rem;
}

.stat {
  background: var(--white);
  border: 1px solid #dff0ee;
  border-radius: var(--radius);
  padding: 1.7rem 1.2rem;
  text-align: center;
  box-shadow: var(--shadow);
}

.stat-num {
  display: block;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 2.4rem;
  color: var(--water);
}

.stat-label {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.9rem;
  color: var(--ink-soft);
}

/* ---------- About ---------- */
.about-inner {
  display: grid;
  gap: 2.5rem;
  align-items: start;
}

.about-aside {
  background: var(--sand);
  border: 1px solid #efe3cc;
  border-radius: var(--radius);
  padding: 2rem 1.8rem;
}

.aside-logo {
  display: block;
  width: 150px;
  height: auto;
  margin-bottom: 1.2rem;
}

.about-aside h3 { margin-bottom: 0.8rem; }

.about-aside a { font-weight: 700; }

.text-link { word-break: break-word; }

/* ---------- Contact / CTA: clear deep water ---------- */
.section-cta {
  background:
    radial-gradient(46rem 24rem at 90% -20%, rgba(244, 185, 66, 0.22), transparent 60%),
    linear-gradient(180deg, var(--water) 0%, var(--water-deep) 100%);
  color: var(--white);
}

.section-cta h2 { color: var(--white); }

.section-cta .contact-text p { color: #dcf3f0; }

.contact-inner {
  display: grid;
  gap: 3rem;
  align-items: start;
}

.contact-list { display: grid; gap: 1.1rem; margin-top: 1.8rem; }

.contact-list li { display: grid; gap: 0.15rem; }

.contact-label {
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--sun);
}

.contact-list a {
  color: var(--white);
  font-weight: 700;
}

.contact-list a:hover { color: var(--sun); }

/* ---------- Quote card ---------- */
.quote-card {
  background: var(--white);
  color: var(--ink);
  border-radius: var(--radius);
  border-top: 6px solid var(--sun);
  padding: 2.4rem 2rem;
  box-shadow: 0 2px 6px rgba(5, 38, 48, 0.2), 0 10px 22px rgba(5, 38, 48, 0.25), 0 22px 44px rgba(5, 38, 48, 0.3);
}

.quote-card-logo {
  display: block;
  width: 130px;
  height: auto;
  margin-bottom: 1rem;
}

.quote-card h3 { margin-bottom: 0.8rem; }

.quote-card p { color: var(--ink-soft); }

.quote-card .btn { margin-top: 0.6rem; }

/* ---------- Scroll reveals (classes added by JS only, so no-JS
   visitors and reduced-motion users always see full content) ---------- */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition:
    opacity 0.65s ease,
    transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: var(--reveal-delay, 0s);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* Screen-reader-only text (e.g. "opens in a new tab" notes) */
.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;
}

.form-note {
  margin: 1rem 0 0;
  font-size: 0.95rem;
  color: var(--ink-soft);
  text-align: center;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--ocean-ink);
  color: #d6e8e6;
  padding: 3rem 0 1.5rem;
}

.footer-inner {
  display: grid;
  gap: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
}

.footer-brand { display: flex; align-items: center; gap: 0.8rem; }

.footer-name {
  margin: 0;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 1.15rem;
  color: var(--white);
}

.footer-tag { margin: 0; font-size: 0.9rem; }

.footer-logo {
  display: block;
  width: 195px;
  height: auto;
  margin-top: 0.9rem;
}

.footer-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.6rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-nav a,
.footer-contact a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--white);
  font-weight: 600;
}

.footer-nav a:hover,
.footer-contact a:hover { color: var(--sun); }

.footer-legal {
  padding-top: 1.4rem;
  font-size: 0.88rem;
}

.footer-legal p { margin: 0; }

/* ---------- Responsive: tablet & up ---------- */
@media (min-width: 820px) {
  .hero-inner { grid-template-columns: 1.2fr 0.8fr; }
  .hero-card { display: block; }
  .why-inner { grid-template-columns: 1.05fr 0.95fr; }
  .about-inner { grid-template-columns: 1.2fr 0.8fr; }
  .contact-inner { grid-template-columns: 1fr 1.05fr; }
  .contact-inner .contact-text { grid-column: 1; grid-row: 1; }
  .contact-inner .quote-card { grid-column: 2; grid-row: 1; }
  .footer-inner {
    grid-template-columns: auto 1fr auto;
    align-items: center;
  }
  .footer-nav { justify-self: center; }
}

/* ---------- Responsive: mobile nav ---------- */
@media (max-width: 819.98px) {
  .nav-toggle { display: flex; }

  .primary-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: none;
    background: var(--white);
    border-bottom: 1px solid #dff0ee;
    box-shadow: var(--shadow);
  }

  .site-header.nav-open .primary-nav { display: block; }

  .primary-nav ul {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.6rem 1.25rem 1.25rem;
  }

  .primary-nav li { width: 100%; }

  .primary-nav a {
    width: 100%;
    min-height: 48px;
    font-size: 1.05rem;
  }

  .primary-nav .nav-cta {
    justify-content: center;
    margin-top: 0.6rem;
  }

  /* Animated toggle icon */
  .site-header.nav-open .nav-toggle-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .site-header.nav-open .nav-toggle-bar:nth-child(2) { opacity: 0; }
  .site-header.nav-open .nav-toggle-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}

/* ---------- Reduced motion (WCAG 2.3.3 / 2.2.2) ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .btn:hover,
  .card:hover,
  .card:hover .card-icon { transform: none; }

  .hero-card-glow,
  .hero-card-inner { animation: none; }
}
