/* ==========================================================================
   CAREY AGENCY — style.css
   Palette derived directly from icon-logo.png:
   logo circle navy #0A1529 (hue ≈ 219°) → every blue in this file keeps that hue.
   ========================================================================== */

/* ---------- Design tokens ---------- */
:root {
  /* brand blues (single hue family ≈ 219°) */
  --navy-950: #050D1C;
  --navy-900: #0A1529;   /* exact logo circle color */
  --primary:   #0E2148;  /* buttons / strong accents */
  --primary-strong: #173E7C;
  --accent:    #2E5FA8;  /* icons, links */
  --accent-bright: #4E82D0;

  /* tints & borders */
  --bg-tint:    #F6F9FE;
  --bg-tint-2:  #EAF2FB;
  --accent-soft:#E3EEFB;
  --border:     #DCE7F5;
  --border-soft:#E7EFFA;
  --border-strong:#C7DAF3;

  /* text */
  --ink:    #0B1830;
  --body:   #46536D;
  --muted:  #67758F;

  /* effects */
  --shadow-sm:   0 2px 10px rgba(11, 24, 48, .06);
  --shadow-md:   0 14px 34px -14px rgba(14, 33, 72, .16);
  --shadow-lg:   0 24px 60px -24px rgba(14, 33, 72, .22);
  --shadow-blue: 0 16px 34px -14px rgba(46, 95, 168, .45);

  --radius: 20px;
  --header-h: 76px;

  --ease: cubic-bezier(.22, .61, .36, 1);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
  -webkit-text-size-adjust: 100%;
}

html, body { overflow-x: hidden; overflow-x: clip; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--body);
  background: #FFFFFF;
  min-height: 100vh;
}

img, svg { display: block; max-width: 100%; }

a { color: var(--accent); text-decoration: none; }

ul, ol { list-style: none; }

h1, h2, h3 {
  color: var(--ink);
  line-height: 1.15;
  letter-spacing: -0.02em;
  font-weight: 700;
}

::selection { background: var(--accent-soft); color: var(--navy-900); }

/* ---------- Accessibility helpers ---------- */
.skip-link {
  position: absolute;
  top: -60px;
  left: 16px;
  z-index: 300;
  padding: 10px 18px;
  border-radius: 12px;
  background: var(--primary);
  color: #fff;
  font-weight: 600;
  transition: top .2s var(--ease);
}
.skip-link:focus { top: 12px; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

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

.icon {
  width: 1.35em;
  height: 1.35em;
  stroke: currentColor;
  stroke-width: 1.8;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  padding: 15px 30px;
  border-radius: 999px;
  font-weight: 600;
  font-size: .98rem;
  line-height: 1.2;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background .25s var(--ease), color .25s var(--ease),
              border-color .25s var(--ease), transform .25s var(--ease),
              box-shadow .25s var(--ease);
}

.btn .icon { transition: transform .25s var(--ease); }
.btn:hover .icon { transform: translateX(4px); }

.btn-primary {
  background: var(--primary);
  color: #fff;
}
.btn-primary:hover {
  background: var(--primary-strong);
  transform: translateY(-2px);
  box-shadow: var(--shadow-blue);
}

.btn-ghost {
  background: #fff;
  color: var(--ink);
  border-color: var(--border-strong);
}
.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--primary);
  background: var(--bg-tint);
  transform: translateY(-2px);
}

.btn-sm { padding: 11px 22px; font-size: .92rem; }

/* ==========================================================================
   NAVIGATION
   ========================================================================== */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  height: var(--header-h);
  background: rgba(255, 255, 255, .82);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: box-shadow .3s var(--ease), border-color .3s var(--ease), height .3s var(--ease);
}

.site-header.scrolled {
  border-bottom-color: var(--border-soft);
  box-shadow: var(--shadow-sm);
}

.nav {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

/* brand lockup */
.brand {
  display: inline-flex;
  align-items: center;
  gap: .7rem;
}
.brand-logo {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  transition: transform .35s var(--ease);
}
.brand:hover .brand-logo { transform: rotate(-6deg) scale(1.04); }
.brand-text b {
  display: block;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: .14em;
  color: var(--ink);
  line-height: 1.2;
}
.brand-text span {
  display: block;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: .38em;
  color: var(--muted);
  margin-top: 1px;
}

/* desktop links */
.nav-links { display: flex; align-items: center; gap: .4rem; }

.nav-link {
  position: relative;
  display: inline-block;
  padding: 8px 14px;
  font-size: .95rem;
  font-weight: 500;
  color: var(--body);
  border-radius: 10px;
  transition: color .25s var(--ease);
}
.nav-link::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 3px;
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .3s var(--ease);
}
.nav-link:hover,
.nav-link.is-active { color: var(--primary); }
.nav-link:hover::after,
.nav-link.is-active::after { transform: scaleX(1); }

.nav-actions { display: flex; align-items: center; gap: .8rem; }

/* hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
}
.nav-toggle .bar {
  width: 100%;
  height: 2px;
  border-radius: 2px;
  background: var(--ink);
  transition: transform .3s var(--ease), opacity .25s var(--ease);
}
.nav-toggle[aria-expanded="true"] .bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* mobile menu */
.nav-backdrop {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(11, 24, 48, .38);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
}
.nav-menu {
  position: fixed;
  top: calc(var(--header-h) + 10px);
  left: 16px;
  right: 16px;
  z-index: 95;
  display: none;
  flex-direction: column;
  gap: 1.1rem;
  padding: 1.4rem 1.4rem 1.6rem;
  background: #fff;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
}
.nav-menu.open { animation: menuIn .32s var(--ease) both; }
.nav-menu ul { display: flex; flex-direction: column; gap: .15rem; }
.nav-menu .nav-link {
  display: block;
  padding: 12px 14px;
  font-size: 1.08rem;
  font-weight: 600;
  color: var(--ink);
  border-radius: 12px;
}
.nav-menu .nav-link:hover { background: var(--bg-tint); color: var(--primary); }
.nav-menu .nav-link::after { display: none; }
.nav-menu-cta { justify-content: center; }

@keyframes menuIn {
  from { opacity: 0; transform: translateY(-10px) scale(.985); }
  to   { opacity: 1; transform: none; }
}

/* ==========================================================================
   HERO
   ========================================================================== */
.hero {
  position: relative;
  isolation: isolate;
  padding: calc(var(--header-h) + clamp(2.5rem, 6vw, 4.5rem)) 0 clamp(3.5rem, 7vw, 6rem);
  overflow: hidden;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1.04fr .96fr;
  align-items: center;
  gap: clamp(2rem, 5vw, 4rem);
}

/* soft blue ambient shapes */
.bg-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  pointer-events: none;
  z-index: -1;
}
.bg-blob-1 { width: 460px; height: 460px; top: -160px; right: -120px; background: #E7F0FB; opacity: .75; }
.bg-blob-2 { width: 380px; height: 380px; bottom: -180px; left: -140px; background: #EAF2FB; opacity: .65; }
.bg-blob-3 { width: 420px; height: 420px; top: 40px; left: -180px; background: #EAF2FB; opacity: .6; }

.pill {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--accent-soft);
  border: 1px solid var(--border);
  color: var(--primary);
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.pill::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-bright);
}

.hero-title {
  margin: 1.4rem 0 1.2rem;
  font-size: clamp(2.5rem, 5.6vw, 4.1rem);
  font-weight: 800;
  letter-spacing: -0.032em;
}

.highlight {
  position: relative;
  display: inline-block;
  color: var(--primary-strong);
  white-space: nowrap;
}
.hl-svg {
  position: absolute;
  left: 2%;
  bottom: -0.16em;
  width: 96%;
  height: .24em;
  overflow: visible;
}
.hl-svg path {
  stroke-dasharray: 230;
  stroke-dashoffset: 230;
  animation: drawSwash 1s var(--ease) .55s forwards;
}

@keyframes drawSwash {
  to { stroke-dashoffset: 0; }
}

.hero-lead {
  max-width: 33em;
  font-size: clamp(1.05rem, 1.5vw, 1.17rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .9rem;
  margin-top: 2rem;
}

.hero-chips {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
  margin-top: 2.2rem;
}
.hero-chips li {
  padding: 7px 15px;
  border-radius: 999px;
  border: 1px solid var(--border-soft);
  background: var(--bg-tint);
  color: var(--muted);
  font-size: .82rem;
  font-weight: 600;
}

.hero-visual { justify-self: center; width: 100%; max-width: 545px; }
.hero-illustration { width: 100%; height: auto; }

/* character motion */
.float { animation: floatY 6s ease-in-out infinite; }
.float-d1 { animation-delay: .6s; }
.float-d2 { animation-delay: 1.4s; }
.float-d3 { animation-delay: 2.2s; }
.eyes { animation: blink 5.2s infinite; transform-box: fill-box; transform-origin: center; }

@keyframes floatY {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-11px); }
}
@keyframes blink {
  0%, 90%, 100% { transform: scaleY(1); }
  94%           { transform: scaleY(.12); }
}

.twinkle { animation: twinkle 3.4s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.tw-1 { animation-delay: .4s; }
.tw-2 { animation-delay: 1.2s; }
.tw-3 { animation-delay: 2s; }
.tw-4 { animation-delay: 2.6s; }
@keyframes twinkle {
  0%, 100% { opacity: .45; transform: scale(.85); }
  50%      { opacity: 1; transform: scale(1.12); }
}

/* ==========================================================================
   SECTIONS (shared)
   ========================================================================== */
.section { padding: clamp(4.5rem, 9vw, 7rem) 0; }

.section-head {
  max-width: 640px;
  margin: 0 auto clamp(2.5rem, 5vw, 3.75rem);
  text-align: center;
}

.eyebrow {
  display: inline-block;
  margin-bottom: 1rem;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--primary);
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.section-title {
  font-size: clamp(1.9rem, 3.6vw, 2.7rem);
  font-weight: 800;
  letter-spacing: -0.028em;
}

.section-lead { margin-top: 1rem; }

/* ==========================================================================
   ABOUT
   ========================================================================== */
.about-inner {
  display: grid;
  grid-template-columns: .8fr 1.2fr;
  align-items: center;
  gap: clamp(2.5rem, 6vw, 5rem);
}

.about-visual { justify-self: center; width: 100%; max-width: 300px; }
.about-illustration { width: 100%; height: auto; }

.about-copy .section-title { margin-bottom: 1.2rem; }
.about-copy p { max-width: 36em; }

.about-points {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  margin-top: 1.8rem;
}
.about-point {
  display: flex;
  align-items: center;
  gap: .6rem;
  font-weight: 600;
  color: var(--ink);
  font-size: .95rem;
}
.check {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
}
.check .icon { width: 14px; height: 14px; stroke-width: 2.6; }

/* ==========================================================================
   SERVICES
   ========================================================================== */
.services { background: var(--bg-tint); }

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

.service-card {
  position: relative;
  padding: 2.2rem;
  background: #fff;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .35s var(--ease);
}

.service-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-strong);
}

.icon-tile {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: var(--accent-soft);
  color: var(--primary);
  margin-bottom: 1.4rem;
  transition: background .35s var(--ease), color .35s var(--ease), transform .35s var(--ease);
}
.icon-tile .icon { width: 26px; height: 26px; }

.service-card:hover .icon-tile,
.contact-card:hover .icon-tile {
  background: var(--primary);
  color: #fff;
  transform: scale(1.05) rotate(-3deg);
}

.service-card h3 {
  font-size: 1.22rem;
  margin-bottom: .55rem;
}
.service-card p { font-size: .98rem; }

/* ==========================================================================
   HOW IT WORKS
   ========================================================================== */
.steps {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem 1.5rem;
  counter-reset: step;
}

.step {
  position: relative;
  text-align: center;
}

/* dashed connector between badges (desktop) */
.step:not(:last-child)::before {
  content: "";
  position: absolute;
  top: 31px;
  left: calc(50% + 46px);
  width: calc(100% - 92px);
  border-top: 2px dashed var(--border-strong);
}

.step-badge {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  margin: 0 auto 1.3rem;
  border-radius: 20px;
  background: #fff;
  border: 1.5px solid var(--border-strong);
  color: var(--accent);
  box-shadow: var(--shadow-sm);
  transition: background .35s var(--ease), color .35s var(--ease),
              border-color .35s var(--ease), transform .35s var(--ease);
}
.step-badge .icon { width: 28px; height: 28px; }
.step:hover .step-badge {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  transform: translateY(-4px);
}

.step-num {
  display: block;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .22em;
  color: var(--accent-bright);
  margin-bottom: .35rem;
}

.step-body h3 { font-size: 1.16rem; margin-bottom: .45rem; }
.step-body p { font-size: .95rem; max-width: 24em; margin-inline: auto; }

/* ==========================================================================
   CONTACT
   ========================================================================== */
.contact { position: relative; isolation: isolate; overflow: hidden; }

.contact-grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  max-width: 980px;
  margin-inline: auto;
}

.contact-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 2.2rem 2rem;
  background: #fff;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  color: inherit;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .35s var(--ease);
}
.contact-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-strong);
}

.contact-label {
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--muted);
}

.contact-value {
  margin-top: .4rem;
  color: var(--ink);
  font-weight: 600;
  font-size: 1.06rem;
  word-break: break-word;
}

.contact-cta {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  margin-top: 1.4rem;
  color: var(--accent);
  font-weight: 600;
  font-size: .93rem;
}
.contact-cta .icon { width: 1em; height: 1em; transition: transform .25s var(--ease); }
.contact-card:hover .contact-cta .icon { transform: translateX(4px); }

/* ==========================================================================
   FOOTER
   ========================================================================== */
.site-footer {
  background: var(--navy-950);
  color: #A8B9D6;
  margin-top: clamp(3rem, 6vw, 4rem);
}

.footer-inner {
  display: grid;
  grid-template-columns: 1.4fr .8fr 1fr;
  gap: 3rem;
  padding: clamp(3.5rem, 6vw, 4.5rem) 0 3rem;
}

.brand-footer .brand-text span { color: #7E93B8; }

.footer-brand p {
  margin-top: 1.4rem;
  max-width: 22em;
  font-size: .95rem;
}

.footer-social { display: flex; gap: .8rem; margin-top: 1.6rem; }

.social-btn {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .16);
  color: #fff;
  transition: background .3s var(--ease), border-color .3s var(--ease), transform .3s var(--ease);
}
.social-btn .icon { width: 19px; height: 19px; }
.social-btn:hover {
  background: var(--primary-strong);
  border-color: var(--primary-strong);
  transform: translateY(-3px);
}

.footer-col h3 {
  color: #fff;
  font-size: .95rem;
  letter-spacing: .05em;
  margin-bottom: 1.2rem;
}

.footer-col ul { display: flex; flex-direction: column; gap: .65rem; }
.footer-col a {
  color: #A8B9D6;
  font-size: .95rem;
  transition: color .25s var(--ease);
}
.footer-col a:hover { color: #fff; }

.footer-mail,
.footer-social-link {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
}
.footer-mail .icon,
.footer-social-link .icon { width: 17px; height: 17px; }

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, .09);
  padding: 1.4rem 0;
}
.footer-bottom p {
  text-align: center;
  font-size: .86rem;
  color: #7E93B8;
}

/* ==========================================================================
   SCROLL REVEAL
   ========================================================================== */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .7s ease, transform .7s var(--ease);
  transition-delay: calc(var(--i, 0) * 80ms);
}
.reveal.in { opacity: 1; transform: none; }

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 1024px) {
  .hero-inner { gap: 2rem; }
}

@media (max-width: 900px) {
  .nav-links,
  .nav-cta { display: none; }
  .nav-toggle { display: flex; }
  .nav-menu { display: flex; }
  .nav-menu[hidden] { display: none; }

  .hero { text-align: center; }
  .hero-copy { justify-items: center; }
  .hero-inner { grid-template-columns: 1fr; }
  .hero-visual { max-width: 420px; margin-top: .5rem; }
  .hero-actions { justify-content: center; }
  .hero-chips { justify-content: center; }

  .about-inner { grid-template-columns: 1fr; }
  .about-visual { max-width: 240px; }
  .about-copy { text-align: center; }
  .about-copy p, .about-copy .section-title { margin-inline: auto; }
  .about-points { justify-content: center; }

  .steps { grid-template-columns: repeat(2, 1fr); }
  .step:not(:last-child)::before { display: none; }

  .contact-grid { grid-template-columns: 1fr; max-width: 560px; }
  .contact-card { align-items: center; text-align: center; }

  .footer-inner { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 560px) {
  .container { width: min(1160px, 100% - 2.5rem); }

  .services-grid { grid-template-columns: 1fr; }
  .service-card { padding: 1.9rem; }

  .hero-actions .btn { width: 100%; justify-content: center; }
  .hero-chips { gap: .45rem; }

  /* steps become a vertical timeline */
  .steps { grid-template-columns: 1fr; gap: 0; text-align: left; }
  .step {
    display: grid;
    grid-template-columns: 52px 1fr;
    column-gap: 1.1rem;
    padding: 0 0 1.8rem 0;
  }
  .step-badge {
    grid-row: 1 / 3;
    width: 52px;
    height: 52px;
    margin: 0;
    border-radius: 16px;
    justify-self: start;
  }
  .step-badge .icon { width: 24px; height: 24px; }
  .step:hover .step-badge { transform: translateX(4px); }
  .step-num { margin: .1rem 0 .1rem; }
  .step-body p { margin-inline: 0; }
  .step:not(:last-child)::before {
    display: block;
    top: 60px;
    left: 25px;
    width: 0;
    height: calc(100% - 68px);
    border-top: none;
    border-left: 2px dashed var(--border-strong);
  }
  .step:last-child { padding-bottom: 0; }

  .contact-card { padding: 1.9rem 1.4rem; }

  .footer-inner { grid-template-columns: 1fr; gap: 2.4rem; }
  .footer-bottom { padding: 1.2rem 0; }
}

@media (max-width: 380px) {
  .brand-text b { font-size: 13.5px; }
  .hero-title { font-size: clamp(2.1rem, 8.4vw, 2.6rem); }
}

/* ==========================================================================
   REDUCED MOTION
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    transition-delay: 0ms !important;
  }

  .reveal { opacity: 1 !important; transform: none !important; }
  .hl-svg path { animation: none !important; stroke-dashoffset: 0 !important; }
  .nav-menu.open { animation: none; }
}
