/* =============================================
   CUSTOM PROPERTIES
   ============================================= */
:root {
  --dark:      #272D2D;
  --slate:     #394D5B;
  --slate-mid: #5c6d78;
  --accent:    #14B294;
  --accent-h:  #0e9e82;
  --light:     #F4F4F9;
  --mist:      #C9D6EA;
  --white:     #ffffff;
  --muted:     #6e7e8a;
  --grey:      #dddddd;

  --ff-head: 'Khand', 'Arial Narrow', 'Helvetica Neue', 'Segoe UI', Helvetica, Arial, sans-serif;
  --ff-body: 'Inter', 'Helvetica Neue', 'Segoe UI', Roboto, Arial, sans-serif;

  --max-w:   72rem;
  --gutter:  2.5rem;
  --ease:    cubic-bezier(.25, .46, .45, .94);
  --speed:   .2s;
}


/* =============================================
   FONTS
   ============================================= */
@font-face {
  font-family: 'Khand';
  font-weight: 500;
  font-display: swap;
  src: url('khand-500.woff2') format('woff2');
}

@font-face {
  font-family: 'Khand';
  font-weight: 700;
  font-display: swap;
  src: url('khand-700.woff2') format('woff2');
}

@font-face {
  font-family: 'Inter';
  font-weight: 400;
  font-display: swap;
  src: url('inter-400.woff2') format('woff2');
}

@font-face {
  font-family: 'Inter';
  font-weight: 600;
  font-display: swap;
  src: url('inter-600.woff2') format('woff2');
}


/* =============================================
   RESET
   ============================================= */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: var(--ff-body);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--dark);
  background: var(--light);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img,
svg {
  display: block;
  max-width: 100%;
}

ul {
  list-style: none;
}

address {
  font-style: normal;
}

::selection {
  background: var(--accent);
  color: var(--white);
}


/* =============================================
   BASE TYPOGRAPHY
   ============================================= */
h1,
h2,
h3,
h4 {
  font-family: var(--ff-head);
  font-weight: 700;
  line-height: 1.05;
  color: var(--dark);
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--speed) var(--ease);
}

a:hover,
a:focus-visible {
  color: var(--accent-h);
}


/* =============================================
   LAYOUT
   ============================================= */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}


/* =============================================
   SHARED ELEMENTS
   ============================================= */
.label {
  font-family: var(--ff-head);
  font-weight: 700;
  font-size: 1.2rem;
  text-transform: uppercase;
  letter-spacing: .14em;
  color: var(--accent);
  margin-bottom: .5rem;
}

.subtitle {
  font-size: clamp(1rem, 1.5vw, 1.1rem);
  color: var(--muted);
  line-height: 1.6;
  max-width: 36rem;
  margin-top: .75rem;
}

.accent-bar {
  width: 2rem;
  height: 3px;
  background: var(--accent);
  margin-bottom: 1rem;
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: .4em;
  font-family: var(--ff-head);
  font-weight: 700;
  font-size: .85rem;
  text-transform: uppercase;
  letter-spacing: .05em;
}

.link-arrow svg {
  width: 1.1em;
  height: 1.1em;
  transition: transform var(--speed) var(--ease);
}

.link-arrow:hover svg {
  transform: translateX(.25em);
}

.muted {
  color: var(--muted);
  font-weight: 400;
}


/* =============================================
   BUTTONS
   ============================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--ff-head);
  font-weight: 700;
  font-size: 1.2rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  line-height: 1;
  padding: .85em 2em;
  border: 3px solid transparent;
  cursor: pointer;
  transition: all var(--speed) var(--ease);
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent);
  color: var(--white);
  border-color: var(--accent);
}

.btn-primary:hover,
.btn-primary:focus-visible {
  background: var(--accent-h);
  border-color: var(--accent-h);
  color: var(--white);
}

.btn-ghost {
  background: transparent;
  color: var(--slate);
  border-color: var(--slate);
}

.btn-ghost:hover,
.btn-ghost:focus-visible {
  background: var(--slate);
  border-color: var(--slate);
  color: var(--white);
}

.btn-accent-outline {
  background: transparent;
  color: var(--accent);
  border: 3px solid var(--accent);
}

.btn-accent-outline:hover,
.btn-accent-outline:focus-visible {
  background: var(--accent);
  color: var(--white);
}

.btn-lg {
  font-size: 1rem;
  padding: 1em 2.4em;
}


/* =============================================
   HEADER
   ============================================= */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(244, 244, 249, .82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition: box-shadow var(--speed) var(--ease);
}

.header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1rem;
  padding-bottom: 1rem;
}

.header-logo {
  display: block;
  width: 4.5rem;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 2.25rem;
}

.nav-list a {
  font-family: var(--ff-head);
  font-weight: 500;
  font-size: 1.2rem;
  color: var(--slate);
  letter-spacing: .03em;
}

.nav-list a:hover,
.nav-list a:focus-visible {
  color: var(--accent);
}


/* =============================================
   HAMBURGER
   ============================================= */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  width: 2.5rem;
  height: 2.5rem;
  cursor: pointer;
  position: relative;
  z-index: 210;
}

.hamburger,
.hamburger::before,
.hamburger::after {
  display: block;
  width: 1.4rem;
  height: 2px;
  background: var(--slate);
  transition: all .3s var(--ease);
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.hamburger {
  top: 50%;
  transform: translate(-50%, -50%);
}

.hamburger::before {
  content: '';
  top: -.4rem;
  left: 0;
  transform: none;
}

.hamburger::after {
  content: '';
  top: .4rem;
  left: 0;
  transform: none;
}

.nav-toggle[aria-expanded="true"] .hamburger {
  background: transparent;
}

.nav-toggle[aria-expanded="true"] .hamburger::before {
  top: 0;
  transform: rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .hamburger::after {
  top: 0;
  transform: rotate(-45deg);
}


/* =============================================
   HERO
   ============================================= */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero-content {
  position: relative;
  z-index: 2;
  width: 100%;
  padding-top: 4rem;
  padding-bottom: 4rem;
}

.hero-heading {
  font-size: clamp(3.5rem, 15vw, 8.5rem);
  font-weight: 800;
  line-height: .92;
  letter-spacing: -.015em;
  margin-bottom: 1.5rem;
}

.hero-heading em {
  font-style: normal;
  color: var(--accent);
}

.hero-sub {
  font-size: clamp(1.1rem, 1.8vw, 1.3rem);
  color: var(--muted);
  line-height: 1.55;
  max-width: 34rem;
  margin-bottom: 2.5rem;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}


/* =============================================
   HERO FLOATING SQUARES
   ============================================= */
.hero-squares {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
}

.sq {
  position: absolute;
  bottom: 0;
  background: none;
  will-change: transform;
  animation: sqFloat linear infinite both;
}

.sq::after {
  content: '';
  display: block;
  width: 100%;
  height: 100%;
  background: var(--white);
  filter: blur(var(--sq-blur, 0px));
  animation: sqSpin var(--sq-spin-dur, 20s) linear infinite both;
  animation-direction: var(--sq-spin-dir, normal);
}

@keyframes sqFloat {
  from {
    transform: translateY(10vh);
  }
  to {
    transform: translateY(-120vh);
  }
}

@keyframes sqSpin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}


/* =============================================
   SECTION SHADOWS
   ============================================= */
.services,
.how,
.contact {
  position: relative;
  z-index: 2;
}

/* Shadow at the bottom of each section,
   clipped so it only bleeds downward */
.hero::after,
.services::after,
.how::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 10%;
  right: 10%;
  height: 0;
  box-shadow: 0 5rem 5rem 5rem rgba(39, 45, 45, .2);
  pointer-events: none;
  z-index: 3;
}

.how::after {
  box-shadow: 0 5rem 5rem 5rem rgba(39, 45, 45, .4);
}


/* =============================================
   SERVICES — canvas texture
   ============================================= */
.services {
  padding: 6rem 0;
  overflow: hidden;
  background-color: #edeeef;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24'%3E%3Crect width='24' height='24' fill='%23edeeef'/%3E%3Ccircle cx='3' cy='5' r='.6' fill='%23d4d6d9' fill-opacity='.6'/%3E%3Ccircle cx='15' cy='11' r='.5' fill='%23cccfd3' fill-opacity='.5'/%3E%3Ccircle cx='8' cy='20' r='.7' fill='%23d0d2d5' fill-opacity='.55'/%3E%3Ccircle cx='21' cy='3' r='.5' fill='%23d6d8db' fill-opacity='.45'/%3E%3Ccircle cx='12' cy='17' r='.4' fill='%23ced0d4' fill-opacity='.5'/%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60'%3E%3Cline x1='0' y1='0' x2='60' y2='60' stroke='%23c8cacd' stroke-width='.3' stroke-opacity='.3'/%3E%3Cline x1='60' y1='0' x2='0' y2='60' stroke='%23c8cacd' stroke-width='.3' stroke-opacity='.25'/%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.55' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)' opacity='.09'/%3E%3C/svg%3E");
}

.services h2 {
  font-size: clamp(2.5rem, 4vw, 3rem);
  margin-bottom: .5rem;
}

.services .subtitle {
  margin-bottom: 3.5rem;
}


/* =============================================
   SERVICE ITEMS
   ============================================= */
.services-list {
  display: flex;
  flex-direction: column;
}

.service-item {
  display: grid;
  grid-template-columns: 5rem 1fr;
  gap: 1.5rem;
  padding: 2.75rem 0;
  border-top: 1px solid var(--grey);
}

.service-num {
  font-family: var(--ff-head);
  font-weight: 700;
  font-size: clamp(2.5rem, 4vw, 4rem);
  line-height: 1;
  color: var(--dark);
  opacity: .1;
}

.service-icon {
  width: 2.5rem;
  height: 2.5rem;
  color: var(--accent);
  margin-bottom: .75rem;
}

.service-body h3 {
  font-size: clamp(1.25rem, 2.2vw, 1.5rem);
  margin-bottom: .5rem;
}

.service-body > p {
  color: var(--slate-mid);
  line-height: 1.6;
  max-width: 38rem;
  margin-bottom: 1rem;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  margin-bottom: 1.25rem;
}

.tags li {
  font-family: var(--ff-head);
  font-weight: 500;
  font-size: .7rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  padding: .35em .8em;
  border: 2px solid var(--dark);
  color: var(--dark);
  opacity: .5;
}


/* =============================================
   HOW WE WORK
   ============================================= */
.how {
  padding: 6rem 0;
}

.how h2 {
  font-size: clamp(2.5rem, 4vw, 3rem);
  margin-bottom: 3rem;
}

.how-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3rem;
}

.how-step h3 {
  font-size: 1.5rem;
  margin-bottom: .5rem;
}

.how-step p {
  font-size: .95rem;
  color: var(--muted);
  line-height: 1.6;
}


/* =============================================
   CONTACT
   ============================================= */
.contact {
  padding: 0 0 6rem 0;
  background: var(--slate);
  color: rgba(255, 255, 255, .7);
  overflow: hidden;
}

.contact h2 {
  color: var(--white);
  font-size: clamp(2.5rem, 4.5vw, 3.2rem);
  margin-bottom: 0;
}

.contact h2 em {
  font-style: normal;
  color: var(--accent);
}


/* =============================================
   CONTACT TOP — heading with inline blocks
   ============================================= */
.contact-top {
  margin-bottom: 3rem;
}

.contact-top h2 {
  padding-top: 6rem;
}

.contact-intro p {
  color: rgba(255, 255, 255, .5);
  font-size: 1.15rem;
  max-width: 28rem;
  margin-top: .5rem;
}

.contact-heading-row {
  display: flex;
  align-items: stretch;
}

.contact-heading-row h2 {
  white-space: nowrap;
  align-self: flex-end;
}

.contact-blocks {
  position: relative;
  width: 3.5rem;
  flex-shrink: 0;
  margin-left: 1rem;
  margin-bottom: 0.5rem;
  overflow: hidden;
}

.block {
  position: absolute;
  background: var(--accent);
}

.block-1 {
  width: 1.5rem;
  height: 1.5rem;
  left: 0;
  bottom: 0;
  animation: dropB1 .7s var(--ease) both;
  animation-play-state: paused;
}

.block-2 {
  width: 1.7rem;
  height: 1.7rem;
  left: 1.6rem;
  bottom: 0;
  animation: dropB2 .7s var(--ease) .2s both;
  animation-play-state: paused;
}

.block-3 {
  width: 1.5rem;
  height: 1.5rem;
  left: 0.9rem;
  bottom: 1.7rem;
  transform-origin: center bottom;
  animation: dropB3 .65s var(--ease) .5s both;
  animation-play-state: paused;
}

@keyframes dropB1 {
  0% {
    transform: translateY(-8rem) rotate(-8deg);
    opacity: 0;
  }
  1% {
    transform: translateY(-8rem) rotate(-8deg);
    opacity: 1;
  }
  55% {
    transform: translateY(.12rem) rotate(1deg);
  }
  80% {
    transform: translateY(-.04rem) rotate(0deg);
  }
  100% {
    transform: translateY(0) rotate(0deg);
  }
}

@keyframes dropB2 {
  0% {
    transform: translateY(-7rem) rotate(12deg);
    opacity: 0;
  }
  1% {
    transform: translateY(-7rem) rotate(12deg);
    opacity: 1;
  }
  55% {
    transform: translateY(.1rem) rotate(-1deg);
  }
  80% {
    transform: translateY(-.03rem) rotate(0deg);
  }
  100% {
    transform: translateY(0) rotate(0deg);
  }
}

@keyframes dropB3 {
  0% {
    transform: translateY(-6rem) rotate(15deg);
    opacity: 0;
  }
  1% {
    transform: translateY(-6rem) rotate(15deg);
    opacity: 1;
  }
  50% {
    transform: translateY(.08rem) rotate(-5deg);
  }
  70% {
    transform: translateY(-.04rem) rotate(4deg);
  }
  85% {
    transform: translateY(.01rem) rotate(-7.5deg);
  }
  100% {
    transform: translateY(0) rotate(-10deg);
  }
}


/* =============================================
   CONTACT FORM
   ============================================= */
.form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
}

.form-left,
.form-right {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.form-right {
  justify-content: space-between;
}

.form-field-grow {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.form-field-grow textarea {
  flex: 1;
  min-height: 5rem;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: .3rem;
}

.form label {
  font-family: var(--ff-head);
  font-weight: 500;
  font-size: .9rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: rgba(255, 255, 255, .55);
}

.form input,
.form select,
.form textarea {
  font-family: var(--ff-body);
  font-size: 1rem;
  color: var(--white);
  background: rgba(255, 255, 255, .06);
  border: 2px solid rgba(255, 255, 255, .2);
  padding: .7em .9em;
  transition: border-color var(--speed) var(--ease);
  width: 100%;
}

.form input:focus,
.form select:focus,
.form textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.form input::placeholder,
.form textarea::placeholder {
  color: rgba(255, 255, 255, .25);
}

.form select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' fill='%23ffffff'%3E%3Cpath d='M3 5l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right .9em center;
  padding-right: 2.5em;
  cursor: pointer;
}

.form select option {
  background: var(--slate);
  color: var(--white);
}

.form textarea {
  resize: vertical;
}

/* Checkboxes */
.form-checks {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  margin-top: .15rem;
}

.check {
  display: inline-flex;
  align-items: center;
  gap: .4em;
  cursor: pointer;
  font-size: .8rem;
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  color: rgba(255, 255, 255, .5);
  background: rgba(255, 255, 255, .04);
  padding: .45em .85em;
  border: 2px solid rgba(255, 255, 255, .1);
  transition: all var(--speed) var(--ease);
}

.check:hover {
  border-color: rgba(255, 255, 255, .25);
}

.check input[type="checkbox"] {
  accent-color: var(--accent);
  width: .85em;
  height: .85em;
}

.check:has(input:checked) {
  border-color: var(--accent);
  background: rgba(20, 178, 148, .1);
  color: var(--white);
}

.check span {
  margin-bottom: -0.3em;
}


/* =============================================
   FOOTER
   ============================================= */
.footer {
  position: relative;
  z-index: 2;
  background: var(--dark);
  color: rgba(255, 255, 255, .55);
  padding-top: 3.5rem;
}

.footer h4 {
  font-family: var(--ff-head);
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--white);
  margin-bottom: .75rem;
}

.footer a {
  color: rgba(255, 255, 255, .5);
}

.footer a:hover,
.footer a:focus-visible {
  color: var(--white);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 3rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}

.footer-logo {
  width: 5.5rem;
  margin-bottom: .75rem;
}

.footer-brand p {
  font-family: var(--ff-head);
  font-weight: 500;
  font-size: .85rem;
  color: rgba(255, 255, 255, .3);
}

.footer-nav ul {
  display: flex;
  flex-direction: column;
  gap: .5rem;
}

.footer-nav a {
  font-size: .9rem;
}

.footer-contact address {
  display: flex;
  flex-direction: column;
  gap: .4rem;
  font-size: .9rem;
}

.footer-bottom {
  padding: 1.25rem 0;
  font-size: .8rem;
  text-align: center;
  color: rgba(255, 255, 255, .2);
}


/* =============================================
   FOCUS
   ============================================= */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}


/* =============================================
   TABLET (max 64em)
   ============================================= */
@media (max-width: 64em) {
  .how-grid {
    grid-template-columns: 1fr 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .footer-brand {
    grid-column: 1 / -1;
  }
}


/* =============================================
   MOBILE (max 48em)
   ============================================= */
@media (max-width: 48em) {
  :root {
    --gutter: 1.25rem;
  }

  .header-bar {
    padding-top: .5rem;
    padding-bottom: .5rem;
  }

  .header-logo {
    width: 3.5rem;
  }

  .nav-toggle {
    display: block;
  }

  .nav-list {
    position: fixed;
    top: 0;
    right: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    z-index: 200;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    gap: 1.75rem;
    padding: 3rem 2rem;
    background: var(--light);
    transform: translateX(100%);
    visibility: hidden;
    transition: transform .35s var(--ease), visibility .35s;
  }

  .nav-list.is-open {
    transform: translateX(0);
    visibility: visible;
  }

  .nav-list a {
    font-size: 2rem;
  }

  .hero {
    min-height: 100vh;
    min-height: 100dvh;
  }

  .hero-heading {
    font-size: clamp(2.8rem, 20vw, 5rem);
  }

  .hero-actions {
    flex-direction: column;
    align-items: flex-start;
  }

  .services {
    padding: 4rem 0;
  }

  .service-item {
    grid-template-columns: 1fr;
    gap: .5rem;
    padding: 2rem 0;
  }

  .service-num {
    font-size: 2.2rem;
  }

  .how {
    padding: 4rem 0;
  }

  .how-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .contact {
    padding: 4rem 0;
  }

  .contact-heading-row {
    flex-wrap: wrap;
  }

  .contact-top h2 {
    padding-top: 0;
  }

  .contact-blocks {
    display: none;
    width: 2.8rem;
    height: 1.8rem;
    margin-left: .35rem;
  }

  .block-1 {
    width: .65rem;
    height: .65rem;
  }

  .block-2 {
    width: .8rem;
    height: .8rem;
    left: .85rem;
  }

  .block-3 {
    width: .75rem;
    height: .75rem;
    left: .2rem;
    bottom: .72rem;
  }

  .form {
    grid-template-columns: 1fr;
  }

  .form-right {
    justify-content: flex-start;
  }

  .form-checks {
    flex-direction: column;
  }

  .check {
    width: 100%;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 1.75rem;
  }
}


/* =============================================
   REDUCED MOTION
   ============================================= */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .sq,
  .sq::after {
    animation: none !important;
    display: none;
  }

  .block {
    animation: none !important;
  }

  *,
  *::before,
  *::after {
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
  }
}