/* ============================================================
   AI Industries — aiindustries.com.ph
   Design tokens
   Palette : mineral paper, deep petrol, highlighter mint
   Type    : Bricolage Grotesque (display/UI) · Newsreader (prose)
             IBM Plex Mono (labels, source metadata)
   ============================================================ */

:root {
  --paper:      #EDF1F1;
  --surface:    #F8FAFA;
  --surface-2:  #E3EAEA;
  --ink:        #0C1A1E;
  --ink-2:      #47585C;
  --ink-3:      #6D7E82;
  --rule:       #C7D3D4;
  --deep:       #0B3A44;
  --deep-2:     #10505D;
  --deep-3:     #072A32;
  --mark:       #6FE3C8;
  --mark-soft:  rgba(111, 227, 200, 0.55);
  --mark-dim:   rgba(111, 227, 200, 0.18);

  --wrap: 1180px;
  --gap: clamp(24px, 3vw, 44px);
  --pad-section: clamp(64px, 8.5vw, 118px);

  --f-display: "Bricolage Grotesque", "Helvetica Neue", Arial, sans-serif;
  --f-body: "Newsreader", Georgia, "Times New Roman", serif;
  --f-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 96px; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: 1.0625rem;
  line-height: 1.62;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; display: block; }
a { color: inherit; }

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

/* ---------- layout primitives ---------- */
.wrap { width: min(var(--wrap), calc(100% - 48px)); margin-inline: auto; }
.section { padding-block: var(--pad-section); }
.section-deep { background: var(--deep); color: #E7F1F1; }
.section-surface { background: var(--surface); }
.section-line { border-top: 1px solid var(--rule); }
.section-deep.section-line { border-top-color: rgba(255,255,255,.14); }

.stack > * + * { margin-top: 18px; }
.lede { font-size: clamp(1.12rem, 1.6vw, 1.32rem); line-height: 1.55; color: var(--ink-2); max-width: 62ch; }
.section-deep .lede { color: #B7CFD2; }
.measure { max-width: 66ch; }

/* ---------- type ---------- */
h1, h2, h3, h4 {
  font-family: var(--f-display);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.06;
  margin: 0;
  text-wrap: balance;
}
h1 { font-size: clamp(2.5rem, 5.6vw, 4.3rem); font-variation-settings: "wdth" 100; }
h2 { font-size: clamp(1.85rem, 3.1vw, 2.6rem); }
h3 { font-size: clamp(1.15rem, 1.5vw, 1.32rem); letter-spacing: -0.015em; line-height: 1.2; }
h4 { font-size: 1rem; letter-spacing: -0.01em; }
p { margin: 0 0 1em; }
p, li, dd, h1, h2, h3 { overflow-wrap: break-word; }
p:last-child { margin-bottom: 0; }

.eyebrow {
  font-family: var(--f-mono);
  font-size: .705rem;
  font-weight: 500;
  letter-spacing: .17em;
  text-transform: uppercase;
  color: var(--ink-3);
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 22px;
}
.eyebrow::before {
  content: "";
  width: 10px; height: 10px;
  background: var(--mark);
  flex: none;
}
.section-deep .eyebrow { color: #8FB3B7; }

/* highlighter — the site's signature device */
mark, .mk {
  color: inherit;
  background-image: linear-gradient(var(--mark-soft), var(--mark-soft));
  background-repeat: no-repeat;
  background-position: 0 88%;
  background-size: 100% 42%;
  padding: 0 .1em;
  margin: 0 -.02em;
}
.section-deep mark, .section-deep .mk { background-image: linear-gradient(var(--mark-dim), var(--mark-dim)); }

/* ---------- buttons ---------- */
.btn {
  font-family: var(--f-display);
  font-size: .95rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 13px 22px;
  border: 1px solid var(--deep);
  background: var(--deep);
  color: #fff;
  text-decoration: none;
  border-radius: 2px;
  cursor: pointer;
  transition: background .18s ease, color .18s ease, border-color .18s ease, transform .18s ease;
}
.btn:hover { background: var(--deep-2); border-color: var(--deep-2); transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--deep); border-color: var(--rule); }
.btn-ghost:hover { background: transparent; border-color: var(--deep); color: var(--deep); }
.btn-light { background: var(--mark); border-color: var(--mark); color: var(--deep-3); }
.btn-light:hover { background: #8AEBD4; border-color: #8AEBD4; }
.btn-outline-light { background: transparent; color: #E7F1F1; border-color: rgba(255,255,255,.32); }
.btn-outline-light:hover { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.6); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }

.arrow { font-family: var(--f-mono); font-size: .9em; transition: transform .18s ease; }
.btn:hover .arrow { transform: translateX(3px); }

:where(a, button, input, textarea, select, summary):focus-visible {
  outline: 2px solid var(--deep-2);
  outline-offset: 3px;
}

/* ---------- header ---------- */
.masthead {
  position: sticky; top: 0; z-index: 60;
  background: rgba(237,241,241,.92);
  backdrop-filter: saturate(150%) blur(10px);
  border-bottom: 1px solid var(--rule);
}
.masthead-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; height: 74px; }

.brand { display: inline-flex; align-items: center; gap: 11px; text-decoration: none; flex: none; }
.brand-mark { width: 26px; height: 26px; flex: none; }
.brand-name {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 1.12rem;
  letter-spacing: -0.03em;
  color: var(--ink);
}
.brand-name span { color: var(--deep-2); }

.nav { display: flex; align-items: center; gap: 4px; }
.nav-item { position: relative; }
.nav-link {
  font-family: var(--f-display);
  font-size: .935rem;
  font-weight: 500;
  letter-spacing: -0.012em;
  color: var(--ink-2);
  text-decoration: none;
  padding: 9px 13px;
  border-radius: 2px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: none; border: 0; cursor: pointer;
}
.nav-link:hover, .nav-link[aria-expanded="true"] { color: var(--ink); background: var(--surface-2); }
.nav-link[aria-current="page"], .nav-link.is-active { color: var(--deep); font-weight: 600; }
.dropdown a[aria-current="page"] { color: var(--deep); background: var(--surface-2); }
.caret { width: 8px; height: 8px; transition: transform .18s ease; }
.nav-link[aria-expanded="true"] .caret { transform: rotate(180deg); }

.dropdown {
  position: absolute; top: calc(100% + 8px); left: 0;
  min-width: 268px;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 3px;
  box-shadow: 0 18px 44px -20px rgba(11,58,68,.34);
  padding: 8px;
  display: none;
}
.nav-item.is-open .dropdown { display: block; }
/* transparent bridge so the pointer never leaves .nav-item on the way down */
.dropdown::before {
  content: "";
  position: absolute;
  left: 0; right: 0;
  top: -14px;
  height: 14px;
}
.dropdown a {
  display: block;
  padding: 9px 12px;
  text-decoration: none;
  font-family: var(--f-display);
  font-size: .92rem;
  font-weight: 500;
  color: var(--ink-2);
  border-radius: 2px;
}
.dropdown a:hover { background: var(--surface-2); color: var(--ink); }
.dropdown a small {
  display: block;
  font-family: var(--f-mono);
  font-size: .68rem;
  letter-spacing: .04em;
  color: var(--ink-3);
  font-weight: 400;
  margin-top: 2px;
}
.dropdown-label {
  font-family: var(--f-mono);
  font-size: .66rem;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--ink-3);
  padding: 12px 12px 6px;
  border-top: 1px solid var(--rule);
  margin-top: 6px;
}
.dropdown-sub a { padding-left: 22px; position: relative; }
.dropdown-sub a::before {
  content: ""; position: absolute; left: 12px; top: 50%;
  width: 5px; height: 1px; background: var(--rule);
}

.masthead-cta { display: flex; align-items: center; gap: 10px; flex: none; }
.burger {
  display: none;
  width: 42px; height: 42px;
  border: 1px solid var(--rule);
  background: transparent;
  border-radius: 2px;
  cursor: pointer;
  padding: 0;
  place-items: center;
}
.burger span { display: block; width: 17px; height: 1.5px; background: var(--ink); margin: 3px auto; transition: .2s; }
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(4.5px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-4.5px) rotate(-45deg); }

@media (max-width: 980px) {
  .nav, .masthead-cta .btn { display: none; }
  .burger { display: grid; }
  .nav.is-mobile-open {
    display: block;
    position: fixed;
    inset: 74px 0 0;
    background: var(--paper);
    overflow-y: auto;
    padding: 18px 24px 60px;
    border-top: 1px solid var(--rule);
  }
  .nav.is-mobile-open .nav-item { border-bottom: 1px solid var(--rule); }
  .nav.is-mobile-open .nav-link { width: 100%; justify-content: space-between; padding: 16px 0; font-size: 1.08rem; background: none; }
  .nav.is-mobile-open .dropdown {
    position: static; display: none; border: 0; box-shadow: none;
    background: transparent; padding: 0 0 12px;
  }
  .nav.is-mobile-open .nav-item.is-open .dropdown { display: block; }
  .nav.is-mobile-open .dropdown a { padding: 10px 0 10px 14px; border-left: 1px solid var(--rule); border-radius: 0; }
  .nav.is-mobile-open .dropdown-label { padding-left: 14px; }
  .nav-mobile-cta { display: block; margin-top: 26px; }
}
@media (min-width: 981px) { .nav-mobile-cta { display: none; } }

/* ---------- home hero ---------- */
.hero { padding-block: clamp(56px, 8vw, 104px) clamp(56px, 7vw, 96px); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr); gap: clamp(32px, 5vw, 76px); align-items: end; }
.hero h1 { margin-bottom: 26px; }
.hero-note {
  font-family: var(--f-mono);
  font-size: .72rem;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--ink-3);
  border-top: 1px solid var(--rule);
  padding-top: 14px;
  margin-top: 40px;
}
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; } }

/* signature: grounded-answer panel */
.grounded {
  margin: 0;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 3px;
  padding: 22px;
  box-shadow: 0 24px 60px -34px rgba(11,58,68,.5);
}
.grounded-cap {
  font-family: var(--f-mono);
  font-size: .655rem;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--ink-3);
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--rule);
}
.grounded-q {
  font-size: 1.16rem;
  line-height: 1.42;
  color: var(--ink);
  padding: 18px 0 16px;
  margin: 0;
}
.grounded-q::before { content: "“"; color: var(--ink-3); }
.grounded-q::after { content: "”"; color: var(--ink-3); }
.grounded-sub {
  font-family: var(--f-mono);
  font-size: .655rem;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin: 0 0 12px;
}
.srcs { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.src {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-left: 2px solid var(--deep-2);
  padding: 11px 13px;
}
.has-js .src { opacity: 0; transform: translateY(7px); }
.is-in .src { animation: rise .5s cubic-bezier(.2,.7,.3,1) forwards; }
.is-in .src:nth-child(2) { animation-delay: .13s; }
.is-in .src:nth-child(3) { animation-delay: .26s; }
@keyframes rise { to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .has-js .src { opacity: 1; transform: none; } }
.src-file {
  font-family: var(--f-mono);
  font-size: .655rem;
  letter-spacing: .07em;
  color: var(--deep-2);
  display: block;
  margin-bottom: 5px;
}
.src p { font-size: .935rem; line-height: 1.5; color: var(--ink-2); margin: 0; }

/* ---------- page header (interior) ---------- */
.pagehead { background: var(--deep); color: #E7F1F1; padding-block: clamp(58px, 7vw, 96px) clamp(48px, 6vw, 78px); }
.pagehead h1 { color: #fff; max-width: 20ch; }
.pagehead .lede { margin-top: 26px; color: #C6DBDD; }
.pagehead .callout p { color: #C6DBDD; }
.crumbs {
  font-family: var(--f-mono);
  font-size: .68rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #8FB3B7;
  margin: 0 0 20px;
}
.crumbs a { text-decoration: none; }
.crumbs a:hover { color: var(--mark); }
.crumbs span { opacity: .5; padding: 0 8px; }

/* ---------- generic grids ---------- */
.grid { display: grid; gap: var(--gap); }
.g-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.split { display: grid; grid-template-columns: minmax(0, .82fr) minmax(0, 1.18fr); gap: clamp(28px, 5vw, 72px); align-items: start; }
@media (max-width: 900px) { .g-3, .g-4, .split { grid-template-columns: 1fr; } }
@media (max-width: 640px) { .g-2 { grid-template-columns: 1fr; } }
@media (min-width: 641px) and (max-width: 900px) { .g-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.sticky-side { position: sticky; top: 108px; }
@media (max-width: 900px) { .sticky-side { position: static; } }

/* ---------- cards ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 3px;
  padding: 26px 24px;
  display: flex;
  flex-direction: column;
  transition: border-color .2s ease, transform .2s ease, box-shadow .2s ease;
}
.card h3 { margin-bottom: 10px; }
.card p { font-size: .98rem; color: var(--ink-2); }
a.card { text-decoration: none; }
a.card:hover { border-color: var(--deep-2); transform: translateY(-2px); box-shadow: 0 20px 40px -28px rgba(11,58,68,.45); }
.card-link {
  font-family: var(--f-mono);
  font-size: .68rem;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--deep-2);
  margin-top: auto;
  padding-top: 20px;
  display: inline-flex; gap: 7px; align-items: center;
}
.card-kicker {
  font-family: var(--f-mono);
  font-size: .655rem;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 14px;
}
.section-deep .card {
  background: rgba(255,255,255,.05);
  border-color: rgba(255,255,255,.16);
}
.section-deep .card h3 { color: #fff; }
.section-deep .card p { color: #B7CFD2; }
.section-deep .card-kicker { color: #8FB3B7; }
.section-deep .card-link { color: var(--mark); }
.section-deep a.card:hover { border-color: var(--mark); }

/* ---------- capability list ---------- */
.caps { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.caps li {
  font-family: var(--f-display);
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: -0.012em;
  padding: 12px 0 12px 26px;
  border-bottom: 1px solid var(--rule);
  position: relative;
  color: var(--ink);
}
.caps li::before {
  content: "";
  position: absolute; left: 0; top: 21px;
  width: 11px; height: 2px; background: var(--mark);
}
.caps-2 { grid-template-columns: repeat(2, minmax(0,1fr)); column-gap: var(--gap); }
@media (max-width: 640px) { .caps-2 { grid-template-columns: 1fr; } }
.section-deep .caps li { color: #E7F1F1; border-bottom-color: rgba(255,255,255,.14); }

/* ---------- numbered sequence (only where order is real) ---------- */
.seq { list-style: none; margin: 0; padding: 0; counter-reset: step; }
.seq > li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: clamp(16px, 3vw, 40px);
  padding: 30px 0;
  border-top: 1px solid var(--rule);
}
.seq > li::before {
  content: counter(step, decimal-leading-zero);
  font-family: var(--f-mono);
  font-size: .78rem;
  letter-spacing: .08em;
  color: var(--deep-2);
  padding-top: 5px;
}
.seq h3 { margin-bottom: 8px; }
.seq p { color: var(--ink-2); font-size: .99rem; }
.seq .caps { margin-top: 16px; }
@media (max-width: 640px) { .seq > li { grid-template-columns: 1fr; gap: 8px; } }

/* ---------- stat / definition blocks ---------- */
.deflist { border-top: 1px solid var(--rule); }
.deflist > div { padding: 24px 0; border-bottom: 1px solid var(--rule); display: grid; grid-template-columns: minmax(0,.34fr) minmax(0,.66fr); gap: clamp(16px,3vw,40px); }
.deflist dt { font-family: var(--f-display); font-weight: 600; font-size: 1.06rem; letter-spacing: -.015em; margin: 0; }
.deflist dd { margin: 0; color: var(--ink-2); font-size: .99rem; }
@media (max-width: 700px) { .deflist > div { grid-template-columns: 1fr; gap: 6px; } }
.section-deep .deflist, .section-deep .deflist > div { border-color: rgba(255,255,255,.14); }
.section-deep .deflist dt { color: #fff; }
.section-deep .deflist dd { color: #B7CFD2; }

/* ---------- callout ---------- */
.callout {
  border-left: 2px solid var(--mark);
  background: var(--surface);
  padding: 22px 24px;
  border-radius: 0 3px 3px 0;
}
.callout p { font-size: 1rem; color: var(--ink-2); }
.section-deep .callout { background: rgba(255,255,255,.05); }
.section-deep .callout p { color: #C6DBDD; }

/* ---------- people ---------- */
.person { border-top: 1px solid var(--rule); padding-top: 20px; }
.person h3 { margin-bottom: 6px; }
.person p {
  font-family: var(--f-mono);
  font-size: .72rem;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--ink-3);
}

/* ---------- CTA band ---------- */
.cta-band { background: var(--deep-3); color: #E7F1F1; padding-block: clamp(56px, 7vw, 92px); }
.cta-band h2 { color: #fff; max-width: 18ch; }
.cta-band .lede { color: #A9C6C9; margin-top: 20px; }
.cta-inner { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: clamp(24px,4vw,56px); align-items: end; }
@media (max-width: 800px) { .cta-inner { grid-template-columns: 1fr; align-items: start; } }

/* ---------- form ---------- */
.form { display: grid; gap: 18px; }
.field { display: grid; gap: 7px; }
.field label {
  font-family: var(--f-mono);
  font-size: .68rem;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.field input, .field select, .field textarea {
  font-family: var(--f-body);
  font-size: 1rem;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 2px;
  padding: 12px 13px;
  width: 100%;
}
.field textarea { min-height: 148px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--deep-2); }
.field-row { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 18px; }
@media (max-width: 640px) { .field-row { grid-template-columns: 1fr; } }
.form-note { font-family: var(--f-mono); font-size: .7rem; letter-spacing: .06em; color: var(--ink-3); line-height: 1.6; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-status { padding: 13px 15px; border-left: 2px solid var(--mark); background: var(--surface); font-size: .95rem; display: none; }
.form-status.is-shown { display: block; }
.form-status.is-error { border-left-color: #C0483C; }

.contact-line { border-top: 1px solid var(--rule); padding: 18px 0; }
.contact-line dt {
  font-family: var(--f-mono); font-size: .68rem; letter-spacing: .13em;
  text-transform: uppercase; color: var(--ink-3); margin-bottom: 6px;
}
.contact-line dd { margin: 0; font-size: 1.02rem; }
.contact-line dd a { text-decoration: none; border-bottom: 1px solid var(--rule); }
.contact-line dd a:hover { border-bottom-color: var(--deep-2); }

/* ---------- footer ---------- */
.footer { background: var(--deep-3); color: #A9C6C9; padding-block: clamp(52px, 6vw, 76px) 34px; font-size: .95rem; }
.footer-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) repeat(3, minmax(0, 1fr)); gap: clamp(28px, 4vw, 56px); }
@media (max-width: 900px) { .footer-grid { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; } }
.footer .brand-name { color: #fff; }
.footer .brand-name span { color: var(--mark); }
.footer h4 {
  font-family: var(--f-mono); font-weight: 500; font-size: .68rem;
  letter-spacing: .15em; text-transform: uppercase; color: #6F9498; margin-bottom: 16px;
}
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.footer a { text-decoration: none; color: #A9C6C9; }
.footer a:hover { color: var(--mark); }
.footer-blurb { max-width: 34ch; margin-top: 18px; color: #86A9AD; font-size: .95rem; }
.footer-base {
  margin-top: clamp(40px, 5vw, 64px);
  padding-top: 22px;
  border-top: 1px solid rgba(255,255,255,.13);
  display: flex; flex-wrap: wrap; gap: 14px; justify-content: space-between;
  font-family: var(--f-mono); font-size: .68rem; letter-spacing: .08em; color: #6F9498;
}

/* ---------- scroll reveal ---------- */
.reveal { transition: opacity .6s ease, transform .6s cubic-bezier(.2,.7,.3,1); }
.has-js .reveal { opacity: 0; transform: translateY(14px); }
.reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .has-js .reveal { opacity: 1; transform: none; } }

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--deep); color: #fff; padding: 10px 16px; border-radius: 2px;
  font-family: var(--f-display); font-size: .9rem; text-decoration: none;
  transition: top .16s ease;
}
.skip:focus { top: 12px; }
