/* ==========================================================================
   Alvankra Technologies
   Palette and usage rules come from BRAND-ASSETS.html (one level up, outside
   this repo). Contrast ratios below are measured, not estimated.
   ========================================================================== */

@font-face {
  font-family: "InterVariable";
  src: url("../fonts/InterVariable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Brand */
  --navy:   #0F2B46;
  --copper: #C97B3C;
  --cream:  #F5F2ED;

  /* Copper fails as a text colour: 2.95:1 on cream, and white on copper is
     3.29:1. So --copper is DECORATIVE ONLY (crossbar, rules, focus rings).
     These two are its accessible text substitutes. */
  --copper-text:     #9C5824;  /* 4.90:1 on cream — links, section numerals */
  --copper-on-navy:  #D28749;  /* 5.02:1 on navy  — eyebrows, descriptor */

  --ink:      #0F2B46;  /* 12.93:1 on cream */
  --ink-soft: #43535F;  /*  7.12:1 on cream */
  --rule:     #E2DCD2;
  --panel:    #FFFFFF;

  --measure: 62ch;
  --gutter: clamp(20px, 5vw, 40px);
  --shell: 1080px;

  --step-1: clamp(13px, 0.2vw + 12.4px, 14px);
  --step0:  clamp(16px, 0.25vw + 15.2px, 17px);
  --step1:  clamp(19px, 0.5vw + 17.5px, 22px);
  --step2:  clamp(24px, 1.2vw + 20px, 32px);
  --step3:  clamp(32px, 3vw + 22px, 56px);

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

/* --------------------------------------------------------------- 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; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: "InterVariable", ui-sans-serif, -apple-system, BlinkMacSystemFont,
               "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: var(--step0);
  line-height: 1.6;
  font-feature-settings: "cv05" 1, "ss03" 1; /* single-storey l, rounded quotes */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, svg { max-width: 100%; height: auto; display: block; }
h1, h2, h3, p, ul { margin: 0; }
ul { list-style: none; padding: 0; }

:where(a, button, input, textarea):focus-visible {
  outline: 2.5px solid var(--copper);
  outline-offset: 3px;
  border-radius: 3px;
}

.skip {
  position: absolute; left: -9999px;
  background: var(--navy); color: #fff;
  padding: 12px 18px; z-index: 100; border-radius: 0 0 6px 0;
  font-size: var(--step-1); font-weight: 600;
}
.skip:focus { left: 0; top: 0; }

/* env() keeps content clear of the notch and the rounded corners in landscape;
   paired with viewport-fit=cover in the document head. */
.shell {
  width: 100%; max-width: var(--shell);
  margin-inline: auto;
  padding-left:  calc(var(--gutter) + env(safe-area-inset-left,  0px));
  padding-right: calc(var(--gutter) + env(safe-area-inset-right, 0px));
}

/* ---------------------------------------------------------------- logo -- */

.lockup { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.lockup svg { flex: none; }

.wordmark { display: flex; flex-direction: column; gap: 2px; line-height: 1; }
.wordmark b {
  font-size: 17px; font-weight: 600;
  letter-spacing: .14em; text-transform: uppercase;
}
.wordmark span {
  font-size: 8.5px; font-weight: 500;
  letter-spacing: .30em; text-transform: uppercase;
}

/* -------------------------------------------------------------- header -- */

/* Sticky: the page is a single long scroll, so the way back to the CTA has to
   travel with the reader. Navy on navy in the hero, navy bar over cream after. */
.masthead {
  position: sticky; top: 0; z-index: 50;
  background: var(--navy);
  padding-block: 14px;
  padding-top: calc(14px + env(safe-area-inset-top, 0px));
  /* The crossbar again. Gives the bar a defined edge once it floats over cream. */
  border-bottom: 2px solid var(--copper);
}
.masthead .shell {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.masthead .wordmark b { color: #fff; }
.masthead .wordmark span { color: var(--copper-on-navy); }

/* 44px min height on both header controls — Apple's tap-target floor. */
.masthead .lockup { min-height: 44px; padding-block: 4px; }

.ghost {
  font: inherit; font-size: var(--step-1); font-weight: 600;
  color: #fff; text-decoration: none;
  display: inline-flex; align-items: center;
  min-height: 44px; padding: 0 20px; border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .35);
  white-space: nowrap;
  transition: background-color .18s var(--ease), border-color .18s var(--ease);
}
.ghost:hover { background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .6); }

/* ---------------------------------------------------------------- hero -- */

.hero {
  background: var(--navy);
  color: #fff;
  padding-block: clamp(64px, 11vw, 132px) clamp(72px, 12vw, 140px);
  position: relative;
}
/* The crossbar, echoed as the section edge. Decorative use of pure copper. */
.hero::after {
  content: ""; position: absolute; inset: auto 0 0 0; height: 4px;
  background: var(--copper);
}

.eyebrow {
  font-size: var(--step-1); font-weight: 600;
  letter-spacing: .18em; text-transform: uppercase;
  color: var(--copper-on-navy);
  margin-bottom: 22px;
}

.hero h1 {
  font-size: var(--step3);
  font-weight: 600; line-height: 1.1; letter-spacing: -.025em;
  max-width: 19ch; text-wrap: balance;
}

.hero p {
  margin-top: 24px; max-width: 52ch;
  font-size: var(--step1); line-height: 1.5;
  color: rgba(255, 255, 255, .76);
}

.hero .actions { margin-top: 40px; display: flex; flex-wrap: wrap; gap: 14px; }

/* Cream on navy = 12.5:1. A copper button would be 4.39:1 with navy text and
   3.29:1 with white — neither passes, so the CTA is not copper. */
.btn {
  font: inherit; font-size: var(--step-1); font-weight: 600;
  letter-spacing: .01em;
  display: inline-flex; align-items: center; gap: 9px;
  padding: 13px 26px; border-radius: 999px;
  border: 1px solid transparent; cursor: pointer;
  text-decoration: none;
  transition: transform .18s var(--ease), background-color .18s var(--ease),
              box-shadow .18s var(--ease);
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn--light { background: var(--cream); color: var(--navy); }
.btn--light:hover { background: #fff; box-shadow: 0 8px 22px -12px rgba(0, 0, 0, .6); }

.btn--navy { background: var(--navy); color: #fff; }
.btn--navy:hover { background: #16395C; box-shadow: 0 10px 24px -14px rgba(15, 43, 70, .8); }

.btn--line {
  background: transparent; color: #fff;
  border-color: rgba(255, 255, 255, .35);
}
.btn--line:hover { background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .6); }

.btn[disabled] { opacity: .55; pointer-events: none; }

/* ------------------------------------------------------------ sections -- */

.band { padding-block: clamp(56px, 9vw, 104px); }
.band + .band { border-top: 1px solid var(--rule); }

/* The sticky masthead would otherwise sit on top of whatever an anchor lands on. */
:target, [id] { scroll-margin-top: 84px; }

.band__head { display: flex; flex-direction: column; gap: 14px; margin-bottom: 44px; }

.num {
  font-size: var(--step-1); font-weight: 600;
  letter-spacing: .16em;
  color: var(--copper-text);
  font-variant-numeric: tabular-nums;
}

.band h2 {
  font-size: var(--step2);
  font-weight: 600; letter-spacing: -.02em; line-height: 1.2;
  max-width: 22ch; text-wrap: balance;
}

.lede {
  font-size: var(--step1); line-height: 1.55;
  color: var(--ink-soft); max-width: var(--measure);
}

/* --------------------------------------------------------- what we do -- */

/* Fixed 2x2 rather than auto-fit: four items in an auto-fit grid resolve to
   three columns on a wide screen and leave a dead cell. */
.services {
  display: grid; gap: 1px;
  grid-template-columns: minmax(0, 1fr);
  background: var(--rule);
  border: 1px solid var(--rule);
  border-radius: 12px; overflow: hidden;
}
@media (min-width: 620px) {
  .services { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.service {
  background: var(--cream);
  padding: 30px 28px 34px;
  display: flex; flex-direction: column; gap: 11px;
  transition: background-color .2s var(--ease);
}
.service:hover { background: var(--panel); }

.service h3 {
  font-size: var(--step1); font-weight: 600; letter-spacing: -.012em;
}
.service p { color: var(--ink-soft); font-size: var(--step-1); line-height: 1.6; }

/* ------------------------------------------------------------- product -- */

.product {
  background: var(--panel);
  border: 1px solid var(--rule);
  border-radius: 12px;
  padding: clamp(28px, 4vw, 44px);
  display: grid; gap: 26px;
  grid-template-columns: minmax(0, 1fr);
}
@media (min-width: 860px) {
  .product { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 48px; }
}

.product__name {
  display: flex; align-items: center; flex-wrap: wrap; gap: 12px;
  margin-bottom: 16px;
}
.product__name h3 {
  font-size: var(--step2); font-weight: 600; letter-spacing: -.02em;
}

/* Reads as copper, but at 4.90:1 it is legible — unlike the raw brand copper. */
.tag {
  font-size: 11.5px; font-weight: 600;
  letter-spacing: .13em; text-transform: uppercase;
  color: var(--copper-text);
  border: 1px solid currentColor;
  padding: 4px 11px; border-radius: 999px;
  white-space: nowrap;
}

.product p { color: var(--ink-soft); max-width: var(--measure); }
.product p + p { margin-top: 14px; }

.checks { display: flex; flex-direction: column; gap: 13px; }
.checks li {
  display: flex; gap: 12px; align-items: flex-start;
  font-size: var(--step-1); line-height: 1.55;
}
.checks svg { flex: none; margin-top: 3px; color: var(--copper-text); }

/* ---------------------------------------------------------- how we work -- */

.points { display: grid; gap: 34px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); }

.point { display: flex; flex-direction: column; gap: 11px; }
.point h3 { font-size: var(--step1); font-weight: 600; letter-spacing: -.012em; }
.point p { color: var(--ink-soft); font-size: var(--step-1); line-height: 1.6; }
.point::before {
  content: ""; width: 34px; height: 3px;
  background: var(--copper); border-radius: 2px;
  margin-bottom: 4px;
}

/* ------------------------------------------------------------- contact -- */

.contact { background: var(--navy); color: #fff; }
.contact .band__head { margin-bottom: 40px; }
.contact .num { color: var(--copper-on-navy); }
.contact .lede { color: rgba(255, 255, 255, .74); }

.contact__grid { display: grid; gap: 44px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 860px) {
  .contact__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 64px; }
}

.direct { display: flex; flex-direction: column; gap: 22px; }
.direct__item { display: flex; flex-direction: column; gap: 5px; }
.direct__label {
  font-size: 11.5px; font-weight: 600;
  letter-spacing: .16em; text-transform: uppercase;
  color: rgba(255, 255, 255, .5);
}
.direct a {
  color: #fff; font-size: var(--step1); font-weight: 500;
  text-decoration: none;
  display: inline-flex; align-items: center; min-height: 44px;
  border-bottom: 1.5px solid var(--copper);
  align-self: flex-start;
  transition: border-color .18s var(--ease);
}
.direct a:hover { border-color: #fff; }
.direct p { color: rgba(255, 255, 255, .7); font-size: var(--step-1); }

.steps {
  counter-reset: step;
  display: flex; flex-direction: column; gap: 11px;
  margin: 4px 0 0; padding: 0; list-style: none;
}
.steps li {
  counter-increment: step;
  display: flex; gap: 12px; align-items: flex-start;
  color: rgba(255, 255, 255, .74);
  font-size: var(--step-1); line-height: 1.5;
}
.steps li::before {
  content: counter(step);
  flex: none;
  width: 22px; height: 22px; border-radius: 999px;
  display: grid; place-items: center;
  font-size: 11px; font-weight: 700;
  color: var(--copper-on-navy);
  border: 1px solid rgba(210, 135, 73, .5);
  font-variant-numeric: tabular-nums;
  margin-top: 1px;
}

/* ---------------------------------------------------------------- form -- */

.form { display: grid; gap: 18px; }

.field { display: flex; flex-direction: column; gap: 7px; }
.field label {
  font-size: 11.5px; font-weight: 600;
  letter-spacing: .13em; text-transform: uppercase;
  color: rgba(255, 255, 255, .62);
}

.field input, .field textarea {
  font: inherit; font-size: var(--step-1);
  color: #fff;
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 8px;
  padding: 13px 15px;
  width: 100%;
  transition: border-color .18s var(--ease), background-color .18s var(--ease);
}
.field textarea { resize: vertical; min-height: 132px; line-height: 1.55; }
.field input::placeholder, .field textarea::placeholder { color: rgba(255, 255, 255, .38); }
.field input:hover, .field textarea:hover { border-color: rgba(255, 255, 255, .4); }
.field input:focus, .field textarea:focus {
  outline: none;
  border-color: var(--copper);
  background: rgba(255, 255, 255, .1);
  box-shadow: 0 0 0 3px rgba(201, 123, 60, .3);
}

/* Honeypot: off-screen rather than display:none, which some bots detect. */
.trap {
  position: absolute; left: -9999px;
  width: 1px; height: 1px; overflow: hidden;
}

.form .btn { justify-self: start; margin-top: 4px; }
.form .btn--light:hover { background: #fff; }

.status {
  font-size: var(--step-1); line-height: 1.55;
  border-radius: 8px; padding: 13px 16px;
  border: 1px solid transparent;
}
.status[hidden] { display: none; }
.status--ok {
  color: #BFEBD3;
  background: rgba(61, 220, 132, .1);
  border-color: rgba(61, 220, 132, .35);
}
.status--bad {
  color: #F6C7BC;
  background: rgba(232, 131, 111, .12);
  border-color: rgba(232, 131, 111, .4);
}

/* -------------------------------------------------------------- footer -- */

.footer {
  background: var(--navy);
  border-top: 1px solid rgba(255, 255, 255, .12);
  padding-block: 34px 40px;
  color: rgba(255, 255, 255, .58);
  font-size: var(--step-1);
}
.footer .shell {
  display: flex; flex-wrap: wrap; align-items: center;
  justify-content: space-between; gap: 18px;
}
.footer .lockup { color: rgba(255, 255, 255, .85); }
.footer .wordmark b { color: rgba(255, 255, 255, .9); font-size: 14px; }
.footer .wordmark span { color: var(--copper-on-navy); font-size: 7.5px; }
.footer a { color: rgba(255, 255, 255, .8); text-decoration: none; }
.footer a:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.footer__meta { display: flex; flex-wrap: wrap; gap: 8px 20px; align-items: center; }
.footer__meta a { display: inline-flex; align-items: center; min-height: 44px; }
.footer .lockup { min-height: 44px; }

/* -------------------------------------------------------------- mobile -- */

@media (max-width: 619px) {

  /* iOS Safari zooms the whole page when a focused input is under 16px.
     The rest of the type scale stays put; only the fields go up. */
  .field input, .field textarea { font-size: 16px; padding: 14px 15px; }
  .field textarea { min-height: 148px; }

  /* Full-bleed buttons read as deliberate on a phone and are far easier to hit
     than two ragged auto-width pills. */
  .hero .actions { flex-direction: column; align-items: stretch; gap: 11px; }
  .hero .actions .btn { width: 100%; justify-content: center; }
  .btn { min-height: 52px; padding-inline: 22px; }
  .form .btn { justify-self: stretch; width: 100%; justify-content: center; }

  /* Bigger, tighter hero. 34px is the floor where a headline still carries
     a phone screen. */
  .hero h1 { font-size: clamp(31px, 8.6vw, 40px); letter-spacing: -.03em; max-width: 16ch; }
  .hero { padding-block: 56px 64px; }
  .hero p { font-size: 16.5px; }
  .hero .actions { margin-top: 32px; }

  /* The masthead lockup carries brand recognition on the smallest screen,
     so it gets a touch more presence rather than less. */
  .masthead .wordmark b { font-size: 16px; letter-spacing: .12em; }
  .masthead .wordmark span { font-size: 8px; letter-spacing: .26em; }
  .ghost { padding-inline: 16px; font-size: 13px; }

  /* --step1 is a good intro size on a desktop column but turns a paragraph into
     seven lines on a phone. Drop it toward body size. */
  .lede { font-size: 16.5px; line-height: 1.6; }

  .band__head { margin-bottom: 32px; }
  .service { padding: 26px 22px 28px; }
  .points { gap: 30px; }
  .contact__grid { gap: 38px; }

  .direct a { font-size: 18px; }

  .footer .shell { flex-direction: column; align-items: flex-start; gap: 4px; }
  .footer__meta { flex-direction: column; align-items: flex-start; gap: 0; }
}

/* Keep the last line of the page off the home-indicator bar. */
.footer { padding-bottom: calc(40px + env(safe-area-inset-bottom, 0px)); }

/* Coarse pointers get no hover-lift; it sticks after a tap on touch devices. */
@media (hover: none) {
  .btn:hover { transform: none; box-shadow: none; }
  .service:hover { background: var(--cream); }
}

/* --------------------------------------------------------------- print -- */

@media print {
  .masthead .ghost, .form, .hero .actions { display: none; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .hero, .contact, .footer, .masthead { background: #fff !important; color: #000 !important; }

  /* Everything that was light-on-navy on screen is now black-on-white, or it
     prints as nothing at all. */
  .hero h1, .hero p, .contact .lede, .footer, .masthead .wordmark b,
  .footer .wordmark b, .direct a, .direct p, .steps li,
  .footer a, .footer__meta { color: #000 !important; }
  .eyebrow, .num, .contact .num, .masthead .wordmark span,
  .footer .wordmark span, .direct__label { color: #444 !important; }

  /* The header mark is a white fill for the navy bar — on paper it would be
     an invisible shape with a floating copper bar under it. */
  .masthead .lockup svg path { fill: #0F2B46 !important; }
  .masthead .lockup svg rect { fill: #6B6B6B !important; }
  .footer .lockup { color: #0F2B46 !important; }

  .steps li::before { color: #444 !important; border-color: #999 !important; }
  .direct a { border-bottom-color: #999 !important; }
  .tag { color: #444 !important; }

  .hero::after { display: none; }
  .band { padding-block: 18pt; }
  .band + .band { border-top: 1px solid #ccc; }

  /* Only annotate real destinations. A mailto is already spelled out in the
     link text, so appending "(mailto:…)" just prints it twice. */
  a[href^="http"]::after {
    content: " (" attr(href) ")"; font-size: 9pt; color: #555;
  }
}
