/* ============================================================
   Coastal Technology Group — styles.css
   Hand-built, dependency-free. Design system → layout → sections.
   ============================================================ */

/* ---------- Design tokens ---------- */
:root {
  --navy-950: #06121f;
  --navy-900: #081c2e;
  --navy-850: #0b2236;
  --navy-800: #0f2c44;
  --teal: #2dd4bf;
  --cyan: #38d0ee;
  --sand: #f3ebdc;
  --sand-soft: #faf6ee;
  --ink: #0b1a28;
  --ink-soft: #41525f;
  --muted-light: #5d6e7d;
  --mist: #9cb2c4;
  --white: #ffffff;
  --line-dark: rgba(255, 255, 255, .10);
  --line-light: rgba(11, 26, 40, .10);

  --grad: linear-gradient(100deg, var(--teal), var(--cyan));
  --shadow-sm: 0 2px 8px rgba(6, 18, 31, .08);
  --shadow-md: 0 16px 40px -12px rgba(6, 18, 31, .18);
  --shadow-glow: 0 18px 50px -16px rgba(45, 212, 191, .45);

  --radius: 18px;
  --radius-sm: 12px;
  --container: 1140px;
  --pad: clamp(1.25rem, 5vw, 2rem);

  --font-display: "Space Grotesk", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, sans-serif;
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--navy-950);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.08; font-weight: 600; letter-spacing: -.02em; }

.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--pad); }

.sr-only, .hp {
  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: 50%; top: -60px; transform: translateX(-50%);
  background: var(--teal); color: var(--navy-950); padding: .6rem 1.1rem; border-radius: 0 0 10px 10px;
  font-weight: 600; z-index: 200; transition: top .2s;
}
.skip-link:focus { top: 0; }

/* ---------- Buttons ---------- */
.btn {
  --b: 1px solid transparent;
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font-family: var(--font-display); font-weight: 600; font-size: .98rem;
  padding: .72rem 1.4rem; border-radius: 100px; border: var(--b); cursor: pointer;
  transition: transform .2s ease, box-shadow .25s ease, background .2s, color .2s, border-color .2s;
  white-space: nowrap;
}
.btn--primary { background: var(--grad); color: var(--navy-950); box-shadow: var(--shadow-glow); }
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 22px 54px -14px rgba(56, 208, 238, .6); }
.btn--ghost { background: transparent; color: var(--white); --b: 1px solid rgba(255,255,255,.28); }
.btn--ghost:hover { background: rgba(255,255,255,.07); border-color: rgba(255,255,255,.55); transform: translateY(-2px); }
.btn--lg { padding: .92rem 1.7rem; font-size: 1.05rem; }
.btn--sm { padding: .55rem 1.1rem; font-size: .9rem; }
.btn--block { width: 100%; }
.btn:focus-visible { outline: 3px solid var(--cyan); outline-offset: 3px; }

/* ---------- Sections & headings ---------- */
.section { padding-block: clamp(4.5rem, 9vw, 7.5rem); position: relative; }
.section--light { background: var(--sand); color: var(--ink); }
.section--dark { background: var(--navy-900); color: var(--white); }
.section--dark .section__intro { color: var(--mist); }

.section__head { max-width: 760px; margin-bottom: clamp(2.5rem, 5vw, 3.5rem); }
.section__title { font-size: clamp(1.9rem, 4.2vw, 3rem); margin-block: .35rem .6rem; }
.section__intro { font-size: 1.12rem; color: var(--ink-soft); }

.eyebrow {
  display: inline-block; font-family: var(--font-display); font-weight: 600;
  font-size: .8rem; letter-spacing: .14em; text-transform: uppercase;
  color: #0c8f7e;
}
.eyebrow--onDark { color: var(--teal); }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  transition: background .3s ease, backdrop-filter .3s ease, box-shadow .3s ease, border-color .3s;
  border-bottom: 1px solid transparent;
}
.site-header.is-scrolled {
  background: rgba(6, 18, 31, .82);
  backdrop-filter: blur(14px) saturate(150%);
  border-bottom-color: var(--line-dark);
}
.header__inner { display: flex; align-items: center; justify-content: space-between; padding-block: .85rem; }
.brand { display: inline-flex; align-items: center; gap: .65rem; color: var(--white); }
.brand__svg { width: 38px; height: 38px; }
.brand__text { display: flex; flex-direction: column; line-height: 1.05; font-family: var(--font-display); font-weight: 600; }
.brand__name { font-size: 1.02rem; letter-spacing: -.01em; }
.brand__group { font-size: 1.02rem; color: var(--teal); }

.nav { display: flex; align-items: center; }
.nav__menu { display: flex; align-items: center; gap: 1.9rem; }
.nav__menu a { color: rgba(255,255,255,.82); font-weight: 500; font-size: .98rem; transition: color .2s; }
.nav__menu a:hover { color: var(--white); }
.nav__menu .btn { color: var(--navy-950); }
.nav__toggle { display: none; }

/* ---------- Hero ---------- */
.hero {
  position: relative; isolation: isolate; overflow: hidden;
  background: radial-gradient(120% 120% at 80% -10%, #0e3350 0%, var(--navy-950) 55%);
  color: var(--white); padding-block: clamp(4rem, 11vw, 8rem) clamp(7rem, 12vw, 10rem);
}
.hero__bg { position: absolute; inset: 0; z-index: -1; }
.blob { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .5; }
.blob--1 { width: 42vw; height: 42vw; left: -8vw; top: -10vw; background: radial-gradient(circle, rgba(45,212,191,.55), transparent 70%); }
.blob--2 { width: 40vw; height: 40vw; right: -6vw; top: 8vw; background: radial-gradient(circle, rgba(56,144,238,.45), transparent 70%); animation: drift 16s ease-in-out infinite alternate; }
.grid {
  position: absolute; inset: 0;
  background-image: linear-gradient(var(--line-dark) 1px, transparent 1px), linear-gradient(90deg, var(--line-dark) 1px, transparent 1px);
  background-size: 60px 60px; mask-image: radial-gradient(100% 80% at 50% 0%, #000 30%, transparent 75%); opacity: .5;
}
@keyframes drift { to { transform: translate(-3vw, 3vw) scale(1.08); } }

.hero__inner { position: relative; max-width: 880px; }
.hero__title { font-size: clamp(2.6rem, 7vw, 4.6rem); font-weight: 700; margin-block: 1.1rem 1.3rem; }
.hero__lead { font-size: clamp(1.08rem, 2.2vw, 1.3rem); color: #cdddeb; max-width: 660px; }
.hero__cta { display: flex; flex-wrap: wrap; gap: .9rem; margin-top: 2.1rem; }
.hero__trust { display: flex; flex-wrap: wrap; gap: 1.5rem; margin-top: 2.6rem; color: var(--mist); font-size: .92rem; }
.hero__trust li { position: relative; padding-left: 1.4rem; }
.hero__trust li::before { content: "✓"; position: absolute; left: 0; color: var(--teal); font-weight: 700; }
.hero__wave { position: absolute; left: 0; right: 0; bottom: -1px; width: 100%; height: clamp(50px, 8vw, 110px); }

/* ---------- Problem ---------- */
.problem__list { display: grid; gap: 1rem; max-width: 880px; }
.problem__item {
  display: flex; gap: 1rem; align-items: flex-start;
  background: var(--white); border: 1px solid var(--line-light); border-radius: var(--radius-sm);
  padding: 1.1rem 1.3rem; box-shadow: var(--shadow-sm);
}
.problem__item p { font-size: 1.05rem; color: var(--ink); margin: 0; }
.xmark {
  flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center;
  background: #ffe2e2; color: #d6443f; font-size: .8rem; font-weight: 700; margin-top: .15rem;
}
.problem__close { margin-top: 2rem; font-size: 1.15rem; }
.problem__close a { color: #0c8f7e; font-weight: 600; border-bottom: 2px solid rgba(12,143,126,.3); }
.problem__close a:hover { border-color: #0c8f7e; }

/* ---------- Featured transformation (before/after) ---------- */
.device {
  max-width: 920px; margin-inline: auto; border-radius: 16px; overflow: hidden;
  box-shadow: 0 40px 90px -30px rgba(0,0,0,.7); border: 1px solid var(--line-dark);
  background: #fff; container-type: inline-size;
}
.device__bar {
  display: flex; align-items: center; gap: .5rem; padding: .7rem 1rem; background: #11161c;
}
.device__bar .dot { width: 11px; height: 11px; border-radius: 50%; background: #3a424c; }
.device__bar .dot:nth-child(1) { background: #ff5f57; } .device__bar .dot:nth-child(2) { background: #febc2e; } .device__bar .dot:nth-child(3) { background: #28c840; }
.device__url { margin-left: .8rem; font-size: .8rem; color: #8c98a4; background: #1c232b; padding: .25rem .9rem; border-radius: 100px; }

.ba { position: relative; aspect-ratio: 16 / 10; overflow: hidden; user-select: none; }
.ba__panel { position: absolute; inset: 0; overflow: hidden; }
.old { z-index: 2; clip-path: inset(0 calc(100% - var(--pos)) 0 0); }
.new { z-index: 1; }
.ba__divider { position: absolute; top: 0; bottom: 0; left: var(--pos); width: 2px; background: #fff; z-index: 4; transform: translateX(-1px); box-shadow: 0 0 0 1px rgba(0,0,0,.08); pointer-events: none; }
.ba__handle {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 42px; height: 42px; border-radius: 50%; background: #fff; color: var(--navy-900);
  display: grid; place-items: center; font-size: 1rem; font-weight: 700; letter-spacing: -1px;
  box-shadow: 0 4px 14px rgba(0,0,0,.3);
}
.ba__range { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; z-index: 5; opacity: 0; cursor: ew-resize; }
.ba__range:focus-visible + .ba__tag,
.ba__range:focus-visible { outline: none; }
.ba__range:focus-visible ~ .ba__divider .ba__handle { box-shadow: 0 0 0 4px var(--cyan); }
.ba__tag {
  position: absolute; top: .8rem; z-index: 3; font-family: var(--font-display); font-weight: 600;
  font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; padding: .3rem .7rem; border-radius: 100px; color: #fff;
}
.ba__tag--before { left: .8rem; background: rgba(20,28,36,.72); }
.ba__tag--after { right: .8rem; background: rgba(45,212,191,.92); color: var(--navy-950); }

/* --- "Before" mock (dated) --- */
.old { background: #fbfaf7; color: #4a4a44; font-family: Georgia, "Times New Roman", serif; }
.old__nav { display: flex; flex-direction: column; gap: .3cqi; align-items: center; padding: 2.4cqi 2cqi; border-bottom: 1px solid #e3e0d6; background: #f0ede3; }
.old__logo { font-size: 4cqi; font-weight: 700; color: #9c2b2b; }
.old__links { font-size: 2.2cqi; color: #7a7a70; text-align: center; }
.old__hero { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 1.6cqi; padding: 6cqi 8cqi; }
.old__welcome { font-size: 2.6cqi; font-style: italic; color: #a89a78; }
.old__h { font-size: 6cqi; font-weight: 700; color: #6b6b60; }
.old__text { font-size: 2.7cqi; line-height: 1.5; color: #8a8a80; max-width: 78cqi; }
.old__link { font-size: 2.6cqi; color: #2a5db0; text-decoration: underline; }

/* --- "After" mock (redesigned) --- */
.new { background: linear-gradient(160deg, #fff5ef 0%, #ffe9e4 100%); color: #2a1414; font-family: var(--font-body); }
.new__nav { display: flex; align-items: center; justify-content: space-between; padding: 3cqi 4cqi; }
.new__logo { font-family: var(--font-display); font-weight: 700; font-size: 3.4cqi; color: #e23744; }
.new__links { display: inline-flex; align-items: center; gap: 2cqi; font-size: 2.5cqi; color: #6a4a44; }
.new__order { background: #e23744; color: #fff; padding: 1cqi 2.6cqi; border-radius: 100px; font-weight: 600; }
.new__hero { display: flex; align-items: center; gap: 2cqi; padding: 3cqi 4cqi 5cqi; }
.new__copy { display: flex; flex-direction: column; align-items: flex-start; gap: 2cqi; flex: 1.3; }
.new__eyebrow { font-family: var(--font-display); font-weight: 600; font-size: 2.1cqi; letter-spacing: .08em; text-transform: uppercase; color: #e2890e; }
.new__h { font-family: var(--font-display); font-weight: 700; font-size: 5.4cqi; line-height: 1.05; color: #3a1410; }
.new__btns { display: inline-flex; gap: 1.6cqi; flex-wrap: wrap; }
.new__btn { font-size: 2.5cqi; font-weight: 600; padding: 1.6cqi 3cqi; border-radius: 100px; }
.new__btn--solid { background: #e23744; color: #fff; }
.new__btn--ghost { background: transparent; color: #b23; border: 1px solid #e2a; border-color: rgba(226,55,68,.4); }
.new__meta { font-size: 2.2cqi; color: #8a5a52; }
.new__art { flex: none; width: 26cqi; }

/* ---------- Compare lists ---------- */
.compare { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1.5rem, 4vw, 3rem); margin-top: clamp(2.5rem, 5vw, 3.5rem); }
.compare__h { font-size: 1.15rem; margin-bottom: 1rem; display: flex; align-items: center; gap: .5rem; }
.compare__h--bad { color: #ff9a93; } .compare__h--good { color: var(--teal); }
.ticks { display: grid; gap: .7rem; }
.tick { position: relative; padding-left: 2rem; color: #cdddeb; font-size: 1.02rem; }
.tick::before { position: absolute; left: 0; font-weight: 700; }
.tick--bad::before { content: "✕"; color: #ff7a72; }
.tick--good::before { content: "✓"; color: var(--teal); }
.work__note { text-align: center; margin-top: 2.6rem; color: var(--mist); }
.work__note a { color: var(--teal); font-weight: 600; }
.work__note a:hover { text-decoration: underline; }

/* ---------- Services ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1.3rem; }
.card {
  background: var(--white); border: 1px solid var(--line-light); border-radius: var(--radius);
  padding: 1.8rem; box-shadow: var(--shadow-sm); transition: transform .25s ease, box-shadow .25s ease;
}
.card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); }
.card__icon { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 14px; background: linear-gradient(150deg, #e6fbf6, #d6f1ff); margin-bottom: 1.1rem; }
.card__icon svg { width: 26px; height: 26px; fill: none; stroke: #0c8f7e; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.card h3 { font-size: 1.25rem; margin-bottom: .5rem; }
.card p { color: var(--ink-soft); font-size: 1rem; }

/* ---------- Process ---------- */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.4rem; counter-reset: step; }
.step { background: var(--navy-850); border: 1px solid var(--line-dark); border-radius: var(--radius); padding: 1.8rem; position: relative; overflow: hidden; }
.step::after { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: var(--grad); transform: scaleX(0); transform-origin: left; transition: transform .35s ease; }
.step:hover::after { transform: scaleX(1); }
.step__num { font-family: var(--font-display); font-weight: 700; font-size: 2rem; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.step h3 { font-size: 1.2rem; margin-block: .5rem .45rem; color: var(--white); }
.step p { color: var(--mist); font-size: .98rem; }

/* ---------- About ---------- */
.about__inner { display: grid; grid-template-columns: 1.5fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.about__text p { color: var(--ink-soft); font-size: 1.08rem; margin-top: 1rem; }
.about__text em { color: var(--ink); font-style: italic; font-weight: 600; }
.about__points { display: grid; gap: .6rem; margin-top: 1.6rem; }
.about__points li { position: relative; padding-left: 1.7rem; font-weight: 500; color: var(--ink); }
.about__points li::before { content: "✓"; position: absolute; left: 0; color: #0c8f7e; font-weight: 700; }
.about__card { background: linear-gradient(165deg, var(--navy-800), var(--navy-950)); color: #fff; border-radius: var(--radius); padding: 2.4rem; text-align: center; box-shadow: var(--shadow-md); }
.about__mark { display: inline-grid; place-items: center; width: 64px; height: 64px; border-radius: 16px; background: rgba(45,212,191,.12); margin-bottom: 1.2rem; }
.about__mark svg { width: 38px; }
.about__cardLabel { color: var(--mist); font-size: .9rem; }
.about__cardBig { font-family: var(--font-display); font-weight: 700; font-size: 1.7rem; margin-block: .1rem .7rem; }
.about__cardSub { color: var(--mist); font-size: .95rem; }

/* ---------- Contact ---------- */
.contact { background: radial-gradient(120% 120% at 0% 0%, #0e3350 0%, var(--navy-950) 55%); }
.contact__inner { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.contact__lead { color: var(--mist); font-size: 1.12rem; margin-top: 1rem; max-width: 460px; }
.contact__direct { display: flex; flex-direction: column; gap: .4rem; margin-top: 1.8rem; font-family: var(--font-display); }
.contact__email { font-size: 1.3rem; font-weight: 600; color: var(--teal); }
.contact__email:hover { text-decoration: underline; }
.contact__phone { color: #cdddeb; }
.contact__form { background: rgba(255,255,255,.04); border: 1px solid var(--line-dark); border-radius: var(--radius); padding: clamp(1.5rem, 4vw, 2.2rem); display: grid; gap: 1.1rem; }
.field { display: grid; gap: .4rem; }
.field label { font-size: .9rem; font-weight: 600; color: #cdddeb; }
.field__opt { color: var(--mist); font-weight: 400; }
.field input, .field textarea {
  font-family: var(--font-body); font-size: 1rem; color: #fff; background: rgba(6,18,31,.5);
  border: 1px solid rgba(255,255,255,.16); border-radius: 10px; padding: .75rem .9rem; width: 100%; resize: vertical;
  transition: border-color .2s, box-shadow .2s;
}
.field input::placeholder { color: #67788a; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px rgba(45,212,191,.18); }
.form__status { margin-top: .3rem; font-size: .92rem; color: var(--teal); min-height: 1.1em; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-950); color: var(--mist); padding-block: clamp(3rem, 6vw, 4.5rem) 2rem; border-top: 1px solid var(--line-dark); }
.footer__inner { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 2rem; align-items: start; }
.footer__tag { margin-top: 1rem; max-width: 280px; font-size: .96rem; }
.footer__nav { display: grid; gap: .55rem; }
.footer__nav a:hover, .footer__contact a:hover { color: var(--white); }
.footer__contact { display: grid; gap: .55rem; font-family: var(--font-display); }
.footer__meta { text-align: center; margin-top: 3rem; padding-top: 1.6rem; border-top: 1px solid var(--line-dark); font-size: .88rem; }

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s ease, transform .7s cubic-bezier(.2,.7,.2,1); }
.reveal.is-visible { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .nav__toggle {
    display: inline-flex; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 8px; z-index: 110;
  }
  .nav__toggle span { width: 26px; height: 2px; background: #fff; border-radius: 2px; transition: transform .3s, opacity .3s; }
  .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); }
  .nav__menu {
    position: fixed; inset: 0 0 0 auto; width: min(82vw, 320px); flex-direction: column; align-items: flex-start; justify-content: center;
    gap: 1.6rem; padding: 2rem 2.2rem; background: rgba(8, 22, 36, .97); backdrop-filter: blur(12px);
    transform: translateX(100%); transition: transform .35s cubic-bezier(.2,.7,.2,1); box-shadow: -20px 0 60px rgba(0,0,0,.4);
  }
  .nav__menu.is-open { transform: translateX(0); }
  .nav__menu a { font-size: 1.25rem; }
  body.nav-open { overflow: hidden; }
  .about__inner, .contact__inner { grid-template-columns: 1fr; }
  .compare { grid-template-columns: 1fr; }
  .footer__inner { grid-template-columns: 1fr 1fr; }
  .footer__brand { grid-column: 1 / -1; }
}
@media (max-width: 540px) {
  .footer__inner { grid-template-columns: 1fr; }
  .hero__cta .btn { flex: 1 1 auto; }
}

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