/* ==========================================================================
   Clear Skies — site.css
   Design system: "Sky & Light"
   ========================================================================== */

/* --- Tokens ------------------------------------------------------------- */
:root {
  /* Brand */
  --brand:        #0860B9;
  --brand-deep:   #05468A;
  --brand-lift:   #2B7FD4;
  --horizon:      #8FC0EB;
  --accent:       #C08A4E;

  /* Surfaces */
  --paper:        #FBFCFE;
  --paper-2:      #F1F6FC;
  --paper-3:      #E6EEF8;
  --card:         #FFFFFF;

  /* Ink */
  --ink:          #0C1B2A;
  --ink-2:        #3D5268;
  --ink-3:        #74889D;

  --line:         rgba(12, 27, 42, 0.10);
  --line-2:       rgba(12, 27, 42, 0.06);

  --shadow-sm:    0 1px 2px rgba(12,27,42,.05), 0 2px 8px rgba(12,27,42,.04);
  --shadow-md:    0 2px 4px rgba(12,27,42,.04), 0 12px 32px rgba(12,27,42,.07);
  --shadow-lg:    0 4px 8px rgba(12,27,42,.05), 0 28px 64px rgba(12,27,42,.10);

  /* Type */
  --display: "Instrument Serif", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  /* Metrics */
  --wrap: 1180px;
  --gutter: clamp(20px, 5vw, 48px);
  --radius: 16px;
  --radius-lg: 24px;
  --nav-h: 72px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --brand:      #5AA1EE;
    --brand-deep: #8CC0F5;
    --brand-lift: #7DB6F2;
    --horizon:    #2C4E77;
    --accent:     #D9A96E;

    --paper:      #080D14;
    --paper-2:    #0D1622;
    --paper-3:    #142031;
    --card:       #101A28;

    --ink:        #EAF1F9;
    --ink-2:      #A9BCD1;
    --ink-3:      #7288A0;

    --line:       rgba(234, 241, 249, 0.12);
    --line-2:     rgba(234, 241, 249, 0.07);

    --shadow-sm:  0 1px 2px rgba(0,0,0,.4);
    --shadow-md:  0 12px 32px rgba(0,0,0,.45);
    --shadow-lg:  0 28px 64px rgba(0,0,0,.55);
  }
}

/* --- Reset -------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink-2);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 400;
  color: var(--ink);
  letter-spacing: -0.015em;
  line-height: 1.08;
  margin: 0;
  text-wrap: balance;
}

p { margin: 0 0 1.1em; text-wrap: pretty; }
p:last-child { margin-bottom: 0; }

::selection { background: var(--brand); color: #fff; }

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

/* --- Layout ------------------------------------------------------------- */
.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.wrap--narrow { max-width: 780px; }

.section { padding-block: clamp(72px, 11vw, 140px); position: relative; }
.section--tint { background: var(--paper-2); }
.section--edge { border-top: 1px solid var(--line-2); }

.eyebrow {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--brand);
  margin: 0 0 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.eyebrow::before {
  content: "";
  width: 28px;
  height: 1px;
  background: currentColor;
  opacity: .5;
  flex: none;
}

.section-head { max-width: 720px; margin-bottom: clamp(40px, 6vw, 72px); }
.section-head h2 { font-size: clamp(34px, 5vw, 54px); margin-bottom: 20px; }
.section-head p { font-size: clamp(17px, 1.6vw, 19px); color: var(--ink-2); }

.lede { font-size: clamp(18px, 2vw, 21px); line-height: 1.6; color: var(--ink-2); }

/* --- Buttons ------------------------------------------------------------ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 24px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  border: 1px solid transparent;
  transition: transform .2s cubic-bezier(.2,.8,.3,1), background-color .2s, border-color .2s, color .2s, box-shadow .2s;
  white-space: nowrap;
}
.btn svg { width: 15px; height: 15px; transition: transform .25s cubic-bezier(.2,.8,.3,1); }
.btn:hover svg { transform: translateX(3px); }

.btn--primary { background: var(--brand); color: #fff; box-shadow: var(--shadow-sm); }
.btn--primary:hover { background: var(--brand-deep); transform: translateY(-1px); box-shadow: var(--shadow-md); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn--primary { color: #06131F; } }

.btn--ghost { border-color: var(--line); color: var(--ink); background: transparent; }
.btn--ghost:hover { border-color: var(--brand); color: var(--brand); transform: translateY(-1px); }

.link-arrow {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--brand); text-decoration: none;
  font-size: 15px; font-weight: 500;
}
.link-arrow svg { width: 14px; height: 14px; transition: transform .25s cubic-bezier(.2,.8,.3,1); }
.link-arrow:hover svg { transform: translateX(4px); }

/* --- Nav ---------------------------------------------------------------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  height: var(--nav-h);
  display: flex; align-items: center;
  transition: background-color .35s, border-color .35s, backdrop-filter .35s;
  border-bottom: 1px solid transparent;
}
.nav.is-stuck {
  background: color-mix(in srgb, var(--paper) 82%, transparent);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom-color: var(--line-2);
}
.nav .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; }

.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
/* The logo is a wordmark in a blue square, so the lockup pairs it with the
   descriptor rather than repeating "Clear Skies" in text beside it. */
.brand__mark {
  width: 42px; height: 42px;
  border-radius: 3px;
  flex: none;
  display: block;
  box-shadow: var(--shadow-sm);
}
.brand__word {
  font-family: var(--sans);
  font-size: 10.5px; font-weight: 600;
  letter-spacing: .15em; text-transform: uppercase;
  color: var(--ink-3); line-height: 1.35;
  padding-left: 14px;
  border-left: 1px solid var(--line);
}
@media (max-width: 420px) { .brand__word { display: none; } }

.nav__links { display: flex; align-items: center; gap: 32px; }
.nav__links a {
  text-decoration: none; font-size: 15px; color: var(--ink-2);
  transition: color .2s; position: relative;
}
.nav__links a::after {
  content:""; position:absolute; left:0; right:0; bottom:-6px; height:1px;
  background: var(--brand); transform: scaleX(0); transform-origin: left;
  transition: transform .3s cubic-bezier(.2,.8,.3,1);
}
.nav__links a:hover { color: var(--ink); }
.nav__links a:hover::after { transform: scaleX(1); }
.nav__links a.is-active { color: var(--ink); }
.nav__links a.is-active::after { transform: scaleX(1); }

.nav__cta { display: inline-flex; }
.nav__toggle {
  display: none; background: none; border: 0; padding: 8px; cursor: pointer;
  color: var(--ink);
}
.nav__toggle svg { width: 22px; height: 22px; }

@media (max-width: 860px) {
  .nav__links {
    position: fixed; inset: var(--nav-h) 0 auto 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    padding: 8px var(--gutter) 24px;
    transform: translateY(-8px);
    opacity: 0; pointer-events: none;
    transition: opacity .25s, transform .25s;
    box-shadow: var(--shadow-md);
  }
  .nav__links.is-open { opacity: 1; transform: none; pointer-events: auto; }
  .nav__links a { padding: 14px 0; border-bottom: 1px solid var(--line-2); font-size: 17px; }
  .nav__links a::after { display: none; }
  .nav__cta { display: none; }
  .nav__toggle { display: block; }
}

/* --- Hero --------------------------------------------------------------- */
.hero {
  position: relative;
  min-height: min(92vh, 860px);
  display: flex; align-items: center;
  padding-block: calc(var(--nav-h) + 64px) 96px;
  overflow: hidden;
  isolation: isolate;
}
.sky {
  position: absolute; inset: -20% -10% auto -10%; height: 140%;
  z-index: -1;
  background:
    radial-gradient(58% 44% at 18% 8%,  color-mix(in srgb, var(--horizon) 55%, transparent) 0%, transparent 62%),
    radial-gradient(46% 38% at 88% 14%, color-mix(in srgb, var(--brand) 22%, transparent) 0%, transparent 60%),
    radial-gradient(70% 50% at 55% 100%, color-mix(in srgb, var(--accent) 14%, transparent) 0%, transparent 65%);
  filter: blur(26px);
  opacity: 1;
  animation: drift 26s ease-in-out infinite alternate;
}
.sky::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(to bottom, transparent 55%, var(--paper) 100%);
}
@keyframes drift {
  from { transform: translate3d(0,0,0) scale(1); }
  to   { transform: translate3d(-3%, 2%, 0) scale(1.08); }
}
@media (prefers-reduced-motion: reduce) { .sky { animation: none; } }

.hero__inner { max-width: 860px; }
.hero__eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 12px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase;
  color: var(--brand);
  background: color-mix(in srgb, var(--card) 70%, transparent);
  border: 1px solid var(--line);
  padding: 7px 16px; border-radius: 999px;
  margin-bottom: 28px;
  backdrop-filter: blur(8px);
}
.hero__eyebrow i {
  width: 6px; height: 6px; border-radius: 50%; background: var(--brand);
  display: block;
}
.hero h1 {
  font-size: clamp(46px, 8.2vw, 92px);
  line-height: 1.02;
  margin-bottom: 28px;
}
.hero h1 em { font-style: italic; color: var(--brand); }
.hero__lede { font-size: clamp(18px, 2.1vw, 23px); line-height: 1.55; color: var(--ink-2); max-width: 620px; margin-bottom: 40px; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }

.hero__meta {
  margin-top: clamp(56px, 8vw, 88px);
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px 32px;
  border-top: 1px solid var(--line);
  padding-top: 28px;
  max-width: 760px;
}
.hero__meta div strong {
  display: block;
  font-family: var(--display); font-weight: 400;
  font-size: clamp(30px, 4vw, 40px); color: var(--ink); line-height: 1.1;
}
.hero__meta div span { font-size: 13px; color: var(--ink-3); letter-spacing: .02em; }

/* --- Pillars ------------------------------------------------------------ */
.pillars { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(20px, 3vw, 28px); }
@media (max-width: 1040px) { .pillars { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px)  { .pillars { grid-template-columns: 1fr; } }
.pillar {
  padding: 32px 28px;
  background: var(--card);
  border: 1px solid var(--line-2);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: transform .3s cubic-bezier(.2,.8,.3,1), box-shadow .3s, border-color .3s;
}
.pillar:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--line); }
.pillar__icon {
  width: 44px; height: 44px; border-radius: 12px;
  background: color-mix(in srgb, var(--brand) 10%, transparent);
  color: var(--brand);
  display: grid; place-items: center; margin-bottom: 22px;
}
.pillar__icon svg { width: 21px; height: 21px; }
.pillar h3 { font-size: 25px; margin-bottom: 12px; }
.pillar p { font-size: 16px; color: var(--ink-2); }

/* --- Steps -------------------------------------------------------------- */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: clamp(24px, 3vw, 40px); counter-reset: step; }
.step { position: relative; padding-top: 30px; border-top: 1px solid var(--line); counter-increment: step; }
.step::before {
  content: "0" counter(step);
  position: absolute; top: -1px; left: 0;
  font-family: var(--sans); font-size: 12px; font-weight: 600; letter-spacing: .14em;
  color: var(--brand);
  background: var(--paper-2);
  padding-right: 14px;
  transform: translateY(-50%);
}
.section:not(.section--tint) .step::before { background: var(--paper); }
.step h3 { font-size: 22px; margin-bottom: 10px; }
.step p { font-size: 15.5px; color: var(--ink-2); }

/* --- Portfolio cards ---------------------------------------------------- */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 40px; }
.filter {
  appearance: none; cursor: pointer;
  font-family: var(--sans); font-size: 14px; font-weight: 500;
  padding: 9px 18px; border-radius: 999px;
  border: 1px solid var(--line);
  background: transparent; color: var(--ink-2);
  transition: all .2s;
}
.filter:hover { border-color: var(--brand); color: var(--brand); }
.filter.is-active { background: var(--ink); border-color: var(--ink); color: var(--paper); }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: clamp(18px, 2.2vw, 26px);
}

.co {
  position: relative;
  display: flex; flex-direction: column;
  background: var(--card);
  border: 1px solid var(--line-2);
  border-radius: var(--radius-lg);
  padding: 28px 26px 24px;
  text-decoration: none;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform .35s cubic-bezier(.2,.8,.3,1), box-shadow .35s, border-color .35s;
}
.co::before {
  content: "";
  position: absolute; inset: 0 0 auto 0; height: 3px;
  background: linear-gradient(90deg, var(--co, var(--brand)), transparent 78%);
  opacity: 0; transition: opacity .35s;
}
.co:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--line); }
.co:hover::before { opacity: 1; }

.co__top { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.co__mark {
  width: 46px; height: 46px; border-radius: 13px; flex: none;
  display: grid; place-items: center;
  font-family: var(--display); font-size: 22px; line-height: 1;
  color: #fff;
  background: linear-gradient(145deg, var(--co, var(--brand)), color-mix(in srgb, var(--co, var(--brand)) 62%, #0C1B2A));
  box-shadow: 0 4px 14px color-mix(in srgb, var(--co, var(--brand)) 30%, transparent);
  padding-top: 2px;
}
.co__tag {
  font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
  color: var(--ink-3);
  border: 1px solid var(--line);
  padding: 5px 11px; border-radius: 999px;
  white-space: nowrap;
}
.co h3 { font-size: 26px; margin-bottom: 10px; letter-spacing: -0.01em; }
.co p { font-size: 15px; line-height: 1.6; color: var(--ink-2); margin-bottom: 20px; }
.co__foot {
  margin-top: auto; padding-top: 16px; border-top: 1px solid var(--line-2);
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  font-size: 13.5px; color: var(--ink-3);
}
.co__site { display: inline-flex; align-items: center; gap: 7px; color: var(--brand); font-weight: 500; }
.co__site svg { width: 13px; height: 13px; transition: transform .25s; }
.co:hover .co__site svg { transform: translate(2px, -2px); }

.co.is-hidden { display: none; }

/* Real company logo in place of the lettermark. Logos sit on a white tile in
   both themes so dark wordmarks stay legible on the dark card. */
.co__mark--logo {
  background: #FFFFFF;
  padding: 8px;
  box-shadow: inset 0 0 0 1px rgba(12,27,42,.10), 0 2px 8px rgba(12,27,42,.07);
}
.co__mark--logo img { width: 100%; height: 100%; object-fit: contain; display: block; }

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .co__mark {
    background: linear-gradient(145deg,
      color-mix(in srgb, var(--co, var(--brand)) 74%, #E6EEF8),
      color-mix(in srgb, var(--co, var(--brand)) 48%, #22334B));
    box-shadow: 0 4px 14px rgba(0,0,0,.45), inset 0 0 0 1px rgba(255,255,255,.14);
  }
  :root:not([data-theme="light"]) .co__mark--logo {
    background: #FFFFFF;
    box-shadow: 0 2px 10px rgba(0,0,0,.45), inset 0 0 0 1px rgba(255,255,255,.20);
  }
}

/* --- About -------------------------------------------------------------- */
.about { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 80px); align-items: start; }
@media (max-width: 880px) { .about { grid-template-columns: 1fr; } }
.about h2 { font-size: clamp(32px, 4.4vw, 48px); margin-bottom: 24px; }
.about__quote {
  font-family: var(--display); font-size: clamp(24px, 3vw, 32px); line-height: 1.28;
  color: var(--ink); border-left: 2px solid var(--brand);
  padding-left: 26px; margin: 0 0 24px;
}
.about__card {
  background: var(--card); border: 1px solid var(--line-2); border-radius: var(--radius-lg);
  padding: 32px 28px; box-shadow: var(--shadow-sm);
}
.about__card h3 { font-size: 21px; margin-bottom: 6px; }
.about__card .role { font-size: 14px; color: var(--brand); margin-bottom: 20px; }
.factlist { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.factlist li { display: flex; gap: 12px; font-size: 15px; color: var(--ink-2); line-height: 1.5; }
.factlist li::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--brand); flex: none; margin-top: 9px; }

/* --- Contact ------------------------------------------------------------ */
.contact { text-align: center; max-width: 700px; margin-inline: auto; }
.contact h2 { font-size: clamp(34px, 5.2vw, 58px); margin-bottom: 20px; }
.contact p { font-size: clamp(17px, 1.8vw, 20px); margin-bottom: 34px; }
.contact__actions { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; }

/* --- Notice ------------------------------------------------------------- */
.notice {
  display: flex; gap: 14px; align-items: flex-start;
  background: var(--paper-2);
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  padding: 20px 22px;
  font-size: 14px; line-height: 1.6; color: var(--ink-3);
}
.section--tint .notice { background: var(--card); }
.notice svg { width: 17px; height: 17px; flex: none; margin-top: 3px; color: var(--ink-3); }
.notice a { color: var(--brand); text-decoration: none; }
.notice a:hover { text-decoration: underline; }

/* --- Footer ------------------------------------------------------------- */
.footer { background: var(--paper-2); border-top: 1px solid var(--line-2); padding-block: clamp(56px, 7vw, 80px) 40px; }
.footer__top { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(2, minmax(0, 1fr)); gap: 40px; margin-bottom: 48px; }
@media (max-width: 760px) { .footer__top { grid-template-columns: 1fr 1fr; } .footer__brandcol { grid-column: 1 / -1; } }
.footer__brandcol p { font-size: 15px; color: var(--ink-3); max-width: 340px; margin-top: 20px; }
.footer h4 { font-family: var(--sans); font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 18px; }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 11px; }
.footer ul a { text-decoration: none; font-size: 15px; color: var(--ink-2); transition: color .2s; }
.footer ul a:hover { color: var(--brand); }
.footer__legal {
  border-top: 1px solid var(--line-2); padding-top: 28px;
  display: flex; flex-wrap: wrap; gap: 16px 32px; justify-content: space-between;
  font-size: 13px; color: var(--ink-3);
}
.footer__disclaimer { font-size: 13px; line-height: 1.65; color: var(--ink-3); max-width: 100%; margin-bottom: 28px; }

/* --- Legal page --------------------------------------------------------- */
.legal { padding-block: calc(var(--nav-h) + 72px) 96px; }
.legal h1 { font-size: clamp(38px, 6vw, 60px); margin-bottom: 16px; }
.legal .updated { font-size: 14px; color: var(--ink-3); margin-bottom: 48px; }
.legal h2 { font-size: clamp(24px, 3vw, 30px); margin: 48px 0 16px; }
.legal p, .legal li { font-size: 16px; line-height: 1.75; color: var(--ink-2); }
.legal ul { padding-left: 20px; display: grid; gap: 10px; margin: 0 0 1.1em; }

/* --- Page header (subpages) --------------------------------------------- */
.pagehead { position: relative; padding-block: calc(var(--nav-h) + 72px) 56px; overflow: hidden; isolation: isolate; }
.pagehead .sky { height: 240%; inset: -60% -10% auto -10%; opacity: .6; }
.pagehead h1 { font-size: clamp(40px, 6.4vw, 70px); margin-bottom: 20px; }
.pagehead p { max-width: 620px; font-size: clamp(17px, 1.8vw, 20px); color: var(--ink-2); }

/* --- Reveal ------------------------------------------------------------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s cubic-bezier(.2,.8,.3,1), transform .7s cubic-bezier(.2,.8,.3,1); }
.reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--brand); color: #fff; padding: 12px 20px; border-radius: 0 0 10px 0;
  text-decoration: none; font-size: 14px;
}
.skip:focus { left: 0; }
