/* ==========================================================================
   ITProOn — styles.css
   Design tokens follow ITProOn_Brand_Color_Reference.md (approved palette).
   ========================================================================== */

:root {
  /* --- Brand palette (approved) --- */
  --itproon-navy:  #071B33;
  --itproon-azure: #1677FF;
  --itproon-teal:  #19D3C5;
  --itproon-white: #FFFFFF;
  --itproon-gradient: linear-gradient(135deg, #1677FF 0%, #19D3C5 100%);

  /* Accessible variants of the brand accents, for TEXT and INTERACTIVE
     surfaces only. Same hues, darkened so normal-size text on white — and
     white text on the button — clears WCAG AA (4.5:1). The approved
     --itproon-gradient above is kept for decorative fills and the logo. */
  --azure-ink: #0F5FD1;              /* links, eyebrows on light: 5.87:1 on white */
  --gradient-interactive: linear-gradient(135deg, #0F5FD1 0%, #0B7F76 100%);

  /* --- Derived neutrals (tints/shades of the brand navy) --- */
  --navy-900: #04101F;
  --navy-800: var(--itproon-navy);
  --navy-700: #0D2A4A;
  --ink:      #0B2038;
  --ink-muted:#42607E;
  --ink-soft: #62809C;
  --on-dark:        #E9F2FA;
  --on-dark-muted:  #A7C0D8;

  --surface:      #FFFFFF;
  --surface-tint: #F4F8FC;
  --surface-sunk: #EDF3F9;
  --border:       #DCE7F1;
  --border-strong:#C6D7E6;
  --border-dark:  rgba(255, 255, 255, .14);

  /* --- Typography --- */
  --font-sans: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial,
               "Noto Sans", "Liberation Sans", sans-serif;
  --font-mono: ui-monospace, "Cascadia Mono", "SFMono-Regular", Consolas,
               "Liberation Mono", monospace;

  --fs-eyebrow: .8125rem;
  --fs-body:    1.0625rem;
  --fs-lede:    clamp(1.0625rem, .98rem + .38vw, 1.25rem);
  --fs-h3:      clamp(1.125rem, 1.06rem + .28vw, 1.3125rem);
  --fs-h2:      clamp(1.75rem, 1.42rem + 1.45vw, 2.625rem);
  --fs-h1:      clamp(2.25rem, 1.55rem + 3.1vw, 4rem);

  --lh-tight: 1.12;
  --lh-snug:  1.3;
  --lh-body:  1.65;

  /* --- Spacing scale --- */
  --sp-1: .25rem;  --sp-2: .5rem;   --sp-3: .75rem;  --sp-4: 1rem;
  --sp-5: 1.5rem;  --sp-6: 2rem;    --sp-7: 2.75rem; --sp-8: 4rem;
  --sp-9: 6rem;    --sp-10: 8rem;
  --section-y: clamp(4rem, 2.5rem + 6vw, 7.5rem);

  /* --- Layout --- */
  --shell-max: 1180px;
  --shell-pad: clamp(1.25rem, .8rem + 2vw, 2.5rem);
  --header-h: 76px;

  /* --- Radii, borders, shadows --- */
  --r-sm: 8px;  --r-md: 12px;  --r-lg: 18px;  --r-pill: 999px;
  --shadow-sm: 0 1px 2px rgba(7, 27, 51, .06), 0 2px 8px rgba(7, 27, 51, .05);
  --shadow-md: 0 2px 6px rgba(7, 27, 51, .07), 0 12px 28px rgba(7, 27, 51, .09);
  --shadow-lg: 0 10px 40px rgba(7, 27, 51, .14);
  --ring: 0 0 0 3px rgba(22, 119, 255, .38);

  --ease: cubic-bezier(.2, .7, .3, 1);
  --dur: 220ms;
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--ink);
  background: var(--surface);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
img { height: auto; }
h1, h2, h3 { margin: 0; line-height: var(--lh-snug); color: var(--itproon-navy); letter-spacing: -.015em; }
h1 { line-height: var(--lh-tight); }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
a { color: var(--azure-ink); text-decoration-thickness: 1px; text-underline-offset: 3px; }

:where(a, button, [tabindex]):focus-visible {
  outline: 3px solid var(--itproon-azure);
  outline-offset: 3px;
  border-radius: var(--r-sm);
}

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

.skip-link {
  position: absolute; left: var(--sp-4); top: -100px; z-index: 100;
  background: var(--itproon-navy); color: var(--itproon-white);
  padding: var(--sp-3) var(--sp-5); border-radius: var(--r-sm);
  font-weight: 600; text-decoration: none;
  transition: top var(--dur) var(--ease);
}
.skip-link:focus { top: var(--sp-3); }

/* ---------- Shared bits ---------- */
.eyebrow {
  font-size: var(--fs-eyebrow); font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase; color: var(--itproon-teal); margin-bottom: var(--sp-4);
}
.eyebrow--dark { color: var(--azure-ink); }

.grad-text {
  background: var(--itproon-gradient);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--sp-2);
  padding: .875rem 1.5rem; border-radius: var(--r-md);
  font-weight: 650; font-size: 1rem; line-height: 1; text-decoration: none;
  border: 1px solid transparent; cursor: pointer; white-space: nowrap;
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease),
              background-color var(--dur) var(--ease), border-color var(--dur) var(--ease),
              color var(--dur) var(--ease);
}
.btn-sm { padding: .625rem 1.125rem; font-size: .9375rem; }
.btn-primary {
  color: var(--itproon-white);
  background-image: var(--gradient-interactive);
  background-color: var(--azure-ink);
  box-shadow: 0 4px 14px rgba(15, 95, 209, .3);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 22px rgba(15, 95, 209, .38); }
.btn-primary:active { transform: translateY(0); }
.btn-ghost {
  color: var(--on-dark); border-color: rgba(255, 255, 255, .28);
  background: rgba(255, 255, 255, .04);
}
.btn-ghost:hover { border-color: var(--itproon-teal); color: var(--itproon-white); background: rgba(25, 211, 197, .1); }

.link-arrow {
  display: inline-flex; align-items: center; gap: .5rem;
  margin-top: var(--sp-5); font-weight: 650; text-decoration: none; color: var(--azure-ink);
}
.link-arrow span { transition: transform var(--dur) var(--ease); }
.link-arrow:hover { text-decoration: underline; }
.link-arrow:hover span { transform: translateX(4px); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .88);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.site-header.is-stuck { border-bottom-color: var(--border); box-shadow: var(--shadow-sm); }

.header-inner {
  display: flex; align-items: center; justify-content: space-between; gap: var(--sp-5);
  min-height: var(--header-h);
}
.brand { display: inline-flex; align-items: center; flex: 0 0 auto; }
.brand-mark { width: auto; height: 34px; }

.nav { display: flex; align-items: center; gap: var(--sp-6); }
.nav-list { display: flex; align-items: center; gap: var(--sp-5); }
.nav-list a {
  position: relative; color: var(--ink); text-decoration: none;
  font-weight: 550; font-size: .9688rem; padding: .375rem 0;
  transition: color var(--dur) var(--ease);
}
.nav-list a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px;
  background-image: var(--itproon-gradient); border-radius: 2px;
  transform: scaleX(0); transform-origin: left;
  transition: transform var(--dur) var(--ease);
}
.nav-list a:hover { color: var(--itproon-navy); }
.nav-list a:hover::after,
.nav-list a.is-active::after { transform: scaleX(1); }
.nav-list a.is-active { color: var(--itproon-navy); font-weight: 650; }

.nav-toggle {
  display: none; width: 44px; height: 44px; padding: 0;
  align-items: center; justify-content: center;
  background: transparent; border: 1px solid var(--border-strong);
  border-radius: var(--r-sm); cursor: pointer; color: var(--itproon-navy);
}
.nav-toggle-bars { display: block; width: 20px; }
.nav-toggle-bars span {
  display: block; height: 2px; background: currentColor; border-radius: 2px;
  transition: transform var(--dur) var(--ease), opacity var(--dur) var(--ease);
}
.nav-toggle-bars span + span { margin-top: 5px; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden; isolation: isolate;
  background:
    radial-gradient(1100px 620px at 78% 8%,  rgba(22, 119, 255, .30), transparent 62%),
    radial-gradient(900px 620px at 10% 96%,  rgba(25, 211, 197, .22), transparent 60%),
    var(--itproon-navy);
  color: var(--on-dark);
  padding-block: clamp(4.5rem, 3rem + 8vw, 9rem) clamp(4.5rem, 3rem + 7vw, 8rem);
}
.hero-canvas { position: absolute; inset: 0; z-index: -1; }
.hero-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, .05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .05) 1px, transparent 1px);
  background-size: 62px 62px;
  -webkit-mask-image: radial-gradient(120% 90% at 50% 20%, #000 20%, transparent 78%);
  mask-image: radial-gradient(120% 90% at 50% 20%, #000 20%, transparent 78%);
}
.hero-nodes { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .5; }
.net-lines path { opacity: .55; }
.net-nodes circle { opacity: .9; }

.hero-inner { position: relative; max-width: 900px; }
.hero-title { font-size: var(--fs-h1); color: var(--itproon-white); font-weight: 700; letter-spacing: -.03em; }
.hero-lede {
  margin-top: var(--sp-5); max-width: 62ch;
  font-size: var(--fs-lede); color: var(--on-dark-muted);
}
.hero-actions { display: flex; flex-wrap: wrap; gap: var(--sp-4); margin-top: var(--sp-7); }
.hero-tags {
  display: flex; flex-wrap: wrap; gap: var(--sp-2) var(--sp-3);
  margin-top: var(--sp-8); padding-top: var(--sp-5);
  border-top: 1px solid var(--border-dark);
}
.hero-tags li {
  font-family: var(--font-mono); font-size: .8125rem; letter-spacing: .04em;
  color: var(--on-dark-muted);
  padding: .3125rem .75rem; border: 1px solid var(--border-dark); border-radius: var(--r-pill);
}

/* ---------- Sections ---------- */
.section { padding-block: var(--section-y); }
.section--tint { background: var(--surface-tint); }
.section--dark {
  background:
    radial-gradient(900px 500px at 85% 0%, rgba(22, 119, 255, .20), transparent 60%),
    radial-gradient(700px 500px at 5% 100%, rgba(25, 211, 197, .14), transparent 60%),
    var(--itproon-navy);
  color: var(--on-dark);
}
.section--dark h2, .section--dark h3 { color: var(--itproon-white); }
.section--dark .section-lede { color: var(--on-dark-muted); }

.section-head { max-width: 66ch; margin-bottom: var(--sp-8); }
.section-head h2 { font-size: var(--fs-h2); font-weight: 700; }
.section-lede { margin-top: var(--sp-4); font-size: var(--fs-lede); color: var(--ink-muted); }

/* ---------- Cards ---------- */
.cards {
  display: grid; gap: var(--sp-5);
  grid-template-columns: repeat(auto-fit, minmax(288px, 1fr));
}
.cards--3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.card {
  position: relative; overflow: hidden;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg);
  padding: var(--sp-6);
  box-shadow: var(--shadow-sm);
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease),
              border-color var(--dur) var(--ease);
}
.card::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 3px;
  background-image: var(--itproon-gradient);
  transform: scaleX(0); transform-origin: left;
  transition: transform 320ms var(--ease);
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--border-strong); }
.card:hover::before { transform: scaleX(1); }
.card h3 { font-size: var(--fs-h3); font-weight: 650; margin-bottom: var(--sp-3); }
.card p { color: var(--ink-muted); font-size: .9688rem; }

.card-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 46px; height: 46px; margin-bottom: var(--sp-5);
  border-radius: var(--r-md);
  background: linear-gradient(135deg, rgba(22, 119, 255, .12), rgba(25, 211, 197, .14));
  color: var(--azure-ink);
  border: 1px solid rgba(22, 119, 255, .16);
}
.card-icon svg { width: 24px; height: 24px; }

.card--soon { background: var(--surface); }
.soon-badge {
  display: inline-block; margin-bottom: var(--sp-4);
  font-size: .75rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: var(--azure-ink);
  padding: .3125rem .6875rem; border-radius: var(--r-pill);
  background: rgba(22, 119, 255, .09); border: 1px solid rgba(22, 119, 255, .18);
}
.insights-note { margin-top: var(--sp-6); color: var(--ink-muted); }

/* ---------- Principles ---------- */
.principles {
  display: grid; gap: var(--sp-5);
  grid-template-columns: 1fr;
}
@media (min-width: 760px) {
  /* Four principles read best as a balanced 2x2 block. */
  .principles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.principle {
  padding: var(--sp-6);
  border: 1px solid var(--border-dark); border-radius: var(--r-lg);
  background: rgba(255, 255, 255, .035);
  transition: border-color var(--dur) var(--ease), background-color var(--dur) var(--ease);
}
.principle:hover { border-color: rgba(25, 211, 197, .4); background: rgba(255, 255, 255, .06); }
.principle-num {
  display: block; margin-bottom: var(--sp-4);
  font-family: var(--font-mono); font-size: .875rem; letter-spacing: .1em;
  background: var(--itproon-gradient);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  font-weight: 700;
}
.principle h3 { font-size: var(--fs-h3); font-weight: 650; margin-bottom: var(--sp-3); }
.principle p { color: var(--on-dark-muted); font-size: .9688rem; }

/* ---------- About ---------- */
.about-grid {
  display: grid; gap: clamp(2rem, 1rem + 4vw, 4rem);
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  align-items: start;
}
.about-copy h2 { font-size: var(--fs-h2); font-weight: 700; margin-bottom: var(--sp-5); }
.about-copy p { color: var(--ink-muted); }
.about-copy p + p { margin-top: var(--sp-4); }

.about-panel {
  padding: var(--sp-6);
  background: var(--surface-tint); border: 1px solid var(--border); border-radius: var(--r-lg);
  position: relative; overflow: hidden;
}
.about-panel::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background-image: var(--itproon-gradient);
}
.panel-title {
  font-size: .8125rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: var(--ink-muted); margin-bottom: var(--sp-4);
}
.panel-list li {
  padding: .625rem 0 .625rem 1.5rem; position: relative;
  font-size: .9688rem; color: var(--ink);
  border-bottom: 1px solid var(--border);
}
.panel-list li:last-child { border-bottom: 0; }
.panel-list li::before {
  content: ""; position: absolute; left: 0; top: 1.125rem;
  width: 7px; height: 7px; border-radius: 50%;
  background-image: var(--itproon-gradient);
}

/* ---------- Contact ---------- */
.section--contact { text-align: center; }
.contact-inner { max-width: 760px; margin-inline: auto; }
.section--contact h2 { font-size: var(--fs-h2); font-weight: 700; }
.contact-lede { margin-inline: auto; }

.email-link {
  display: inline-flex; align-items: center; gap: var(--sp-3);
  margin-top: var(--sp-7); padding: 1rem 1.75rem;
  border-radius: var(--r-md);
  background: rgba(255, 255, 255, .05);
  border: 1px solid rgba(255, 255, 255, .18);
  color: var(--itproon-white); text-decoration: none;
  font-size: clamp(1rem, .93rem + .35vw, 1.25rem); font-weight: 650;
  word-break: break-word;
  transition: border-color var(--dur) var(--ease), background-color var(--dur) var(--ease),
              transform var(--dur) var(--ease);
}
.email-link:hover { border-color: var(--itproon-teal); background: rgba(25, 211, 197, .12); transform: translateY(-2px); }
.email-icon { display: inline-flex; color: var(--itproon-teal); flex: 0 0 auto; }
.email-icon svg { width: 24px; height: 24px; }
.contact-hint { margin-top: var(--sp-4); color: var(--on-dark-muted); font-size: .9375rem; }

.socials {
  display: flex; flex-wrap: wrap; justify-content: center; gap: var(--sp-3);
  margin-top: var(--sp-7); padding-top: var(--sp-6);
  border-top: 1px solid var(--border-dark);
}
.social-link {
  display: inline-block; padding: .5rem 1rem;
  border: 1px dashed rgba(255, 255, 255, .22); border-radius: var(--r-pill);
  font-size: .875rem; color: var(--on-dark-muted); text-decoration: none;
}
.social-link em { font-style: normal; opacity: .68; }
a.social-link { border-style: solid; color: var(--on-dark); }
a.social-link:hover { border-color: var(--itproon-teal); color: var(--itproon-white); }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-900); color: var(--on-dark-muted); }
.footer-inner {
  display: grid; gap: var(--sp-7);
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  padding-block: var(--sp-8) var(--sp-7);
}
.footer-brand img { width: 200px; height: auto; }
.footer-statement { margin-top: var(--sp-4); max-width: 42ch; font-size: .9375rem; }
.footer-heading {
  font-size: .8125rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: var(--on-dark); margin-bottom: var(--sp-4);
}
.footer-nav ul { display: grid; gap: var(--sp-2); }
.footer-nav a { color: var(--on-dark-muted); text-decoration: none; font-size: .9375rem; }
.footer-nav a:hover { color: var(--itproon-teal); text-decoration: underline; }

.footer-bar {
  display: flex; flex-wrap: wrap; gap: var(--sp-3); justify-content: space-between;
  padding-block: var(--sp-5);
  border-top: 1px solid rgba(255, 255, 255, .1);
  font-size: .875rem;
}
.footer-domain { font-family: var(--font-mono); letter-spacing: .04em; color: var(--on-dark); }

/* ---------- Entrance animation ---------- */
.reveal { opacity: 0; transform: translateY(18px); }
.reveal.is-visible {
  opacity: 1; transform: none;
  transition: opacity 620ms var(--ease), transform 620ms var(--ease);
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 900px) {
  .about-grid { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; }
}

@media (max-width: 780px) {
  :root { --header-h: 66px; }
  .brand-mark { height: 28px; }
  .nav-toggle { display: inline-flex; }

  .nav {
    position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: var(--sp-4);
    padding: var(--sp-5) var(--shell-pad) var(--sp-6);
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    /* Hidden from both pointer and keyboard until opened */
    display: none;
  }
  .nav.is-open { display: flex; }
  .nav-list { flex-direction: column; align-items: stretch; gap: 0; }
  .nav-list a { padding: var(--sp-4) 0; border-bottom: 1px solid var(--border); font-size: 1.0625rem; }
  .nav-list a::after { display: none; }
  .nav-cta { width: 100%; padding-block: .875rem; }
}

@media (max-width: 520px) {
  .hero-actions .btn { width: 100%; }
  .email-link { width: 100%; justify-content: center; }
  .footer-bar { flex-direction: column; }
}

/* ---------- 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;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1; transform: none; }
  .card:hover, .btn-primary:hover, .email-link:hover { transform: none; }
}

/* ---------- Print ---------- */
@media print {
  .site-header, .hero-canvas, .nav-toggle { display: none !important; }
  body { color: #000; background: #fff; }
  .hero, .section--dark, .site-footer { background: #fff !important; color: #000 !important; }
  .hero-title, .section--dark h2, .section--dark h3 { color: #000 !important; }
}
