/* IYI CORP — iyicorp.com
   Self-contained stylesheet. No external fonts, no frameworks. */

/* ---------- Theme tokens ---------- */
/* Light is the DEFAULT (owner directive: corporate site should be white) */
:root {
  --bg: #ffffff;
  --bg-alt: #f5f8fa;
  --panel: #ffffff;
  --line: #dde5eb;
  --text: #0f1a22;
  --muted: #53687a;
  --accent: #0a7a6c;
  --accent-ink: #ffffff;
  --gold: #8a5f0d;
  --shadow: 0 1px 2px rgba(16,32,45,.06), 0 10px 26px rgba(16,32,45,.08);
  --radius: 14px;
  --maxw: 1120px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0a1119;
    --bg-alt: #0e1822;
    --panel: #121e2a;
    --line: #1e2f3f;
    --text: #e7eef5;
    --muted: #9db0c2;
    --accent: #3ce0c6;
    --accent-ink: #04211d;
    --gold: #f0c05a;
    --shadow: 0 1px 2px rgba(0,0,0,.4), 0 12px 32px rgba(0,0,0,.28);
    color-scheme: dark;
  }
}

/* Manual override wins over system preference */
html[data-theme="dark"] {
  --bg: #0a1119; --bg-alt: #0e1822; --panel: #121e2a; --line: #1e2f3f;
  --text: #e7eef5; --muted: #9db0c2; --accent: #3ce0c6; --accent-ink: #04211d;
  --gold: #f0c05a; --shadow: 0 1px 2px rgba(0,0,0,.4), 0 12px 32px rgba(0,0,0,.28);
  color-scheme: dark;
}
html[data-theme="light"] {
  --bg: #ffffff; --bg-alt: #f2f6f8; --panel: #ffffff; --line: #dbe4ea;
  --text: #0f1a22; --muted: #53687a; --accent: #0a7a6c; --accent-ink: #ffffff;
  --gold: #8a5f0d; --shadow: 0 1px 2px rgba(16,32,45,.06), 0 10px 26px rgba(16,32,45,.08);
  color-scheme: light;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--text); }

h1, h2, h3 { line-height: 1.15; letter-spacing: -.02em; margin: 0 0 .5em; }
h1 { font-size: clamp(2.4rem, 7vw, 4.2rem); font-weight: 700; }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.35rem); font-weight: 650; }
h3 { font-size: 1.12rem; font-weight: 650; letter-spacing: -.01em; }
p { margin: 0 0 1em; }

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

.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: 22px; }

.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--accent); color: var(--accent-ink);
  padding: 10px 16px; z-index: 100; font-weight: 600; border-radius: 0 0 8px 0;
}
.skip:focus { left: 0; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
@supports not (backdrop-filter: blur(1px)) { .site-header { background: var(--bg); } }

.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; min-height: 68px;
}

.brand {
  display: inline-flex; align-items: center; gap: 10px;
  text-decoration: none; color: var(--text);
}
.brand-text { font-weight: 700; letter-spacing: .14em; font-size: .95rem; }

.mark { width: 32px; height: 32px; flex: 0 0 auto; }
.mark-bg { fill: #12202c; }
.mark-fg { fill: var(--accent); }
html[data-theme="light"] .mark-bg { fill: #0a1119; }

.nav { display: flex; align-items: center; gap: 26px; }
.nav a {
  color: var(--muted); text-decoration: none; font-size: .95rem; font-weight: 500;
  padding: 6px 0; border-bottom: 2px solid transparent; transition: color .15s, border-color .15s;
}
.nav a:hover, .nav a:focus-visible { color: var(--text); border-bottom-color: var(--accent); }

.theme-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; padding: 0;
  background: transparent; border: 1px solid var(--line); border-radius: 10px;
  color: var(--muted); cursor: pointer; transition: color .15s, border-color .15s;
}
.theme-btn:hover { color: var(--accent); border-color: var(--accent); }
.theme-btn svg { width: 18px; height: 18px; fill: currentColor; }

.nav-toggle {
  display: none; width: 42px; height: 42px; padding: 0;
  background: transparent; border: 1px solid var(--line); border-radius: 10px;
  cursor: pointer; flex-direction: column; align-items: center; justify-content: center; gap: 5px;
}
.nav-toggle .bar {
  display: block; width: 18px; height: 2px; background: var(--text); border-radius: 2px;
  transition: transform .2s, opacity .2s;
}
.nav-toggle[aria-expanded="true"] .bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: clamp(56px, 9vw, 104px) 0 clamp(48px, 7vw, 84px);
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(58% 62% at 82% 6%, rgba(60,224,198,.16), transparent 70%),
    radial-gradient(46% 52% at 8% 92%, rgba(124,156,255,.10), transparent 70%),
    var(--bg);
  overflow: hidden;
}
html[data-theme="light"] .hero, html:not([data-theme="dark"]) .hero {
  background:
    radial-gradient(58% 62% at 82% 6%, rgba(13,143,127,.12), transparent 70%),
    radial-gradient(46% 52% at 8% 92%, rgba(90,110,220,.08), transparent 70%),
    var(--bg);
}
html[data-theme="dark"] .hero {
  background:
    radial-gradient(58% 62% at 82% 6%, rgba(60,224,198,.16), transparent 70%),
    radial-gradient(46% 52% at 8% 92%, rgba(124,156,255,.10), transparent 70%),
    var(--bg);
}

.hero-inner { max-width: 760px; }

/* Hero: text + illustration side by side on wider screens */
.hero-grid {
  display: grid; grid-template-columns: minmax(0,1fr) minmax(0,440px);
  gap: 40px; align-items: center;
}
.hero-art { display: block; }
.hero-art svg { width: 100%; height: auto; display: block; }
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: minmax(0,1fr); }
  .hero-art { display: none; }
}
.eyebrow {
  display: inline-block; margin: 0 0 18px;
  font-size: .78rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase;
  color: var(--gold); border: 1px solid var(--line); border-radius: 999px;
  padding: 6px 14px; background: color-mix(in srgb, var(--panel) 70%, transparent);
}
.hero h1 { margin-bottom: .25em; }
.tagline {
  font-size: clamp(1.1rem, 2.1vw, 1.35rem);
  color: var(--muted); max-width: 44ch; margin-bottom: 32px;
}
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 26px; }
.hero-note { font-size: .9rem; color: var(--muted); margin: 0; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 12px 24px;
  border-radius: 10px; font-weight: 600; font-size: .95rem;
  text-decoration: none; border: 1px solid transparent;
  transition: transform .12s, background-color .15s, border-color .15s, color .15s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--text); color: var(--bg); }
.btn-ghost { border-color: var(--line); color: var(--text); background: transparent; }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- Sections ---------- */
.section { padding: clamp(52px, 7vw, 88px) 0; }
.section.alt { background: var(--bg-alt); border-block: 1px solid var(--line); }

.section-head { max-width: 720px; margin-bottom: 40px; }
.kicker {
  margin: 0 0 10px; font-size: .78rem; font-weight: 700;
  letter-spacing: .18em; text-transform: uppercase; color: var(--accent);
}
.lede { color: var(--muted); font-size: 1.05rem; margin-bottom: 0; }

.two-col {
  display: grid; grid-template-columns: minmax(0,1.35fr) minmax(0,1fr);
  gap: 40px; align-items: start;
}
.two-col p:last-child { margin-bottom: 0; }

.fact-card {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow);
}
.fact-card h3 { font-size: .8rem; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.fact-card dl { margin: 0; display: grid; grid-template-columns: auto minmax(0,1fr); gap: 10px 16px; font-size: .94rem; }
.fact-card dt { color: var(--muted); }
.fact-card dd { margin: 0; font-weight: 600; }

/* ---------- Service cards ---------- */
/* flex-wrap so the final (partial) row centers instead of leaving an orphan cell */
.cards {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-wrap: wrap; justify-content: center; gap: 20px;
}
.card {
  flex: 0 1 calc((100% - 40px) / 3);
  min-width: 0;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px; box-shadow: var(--shadow);
  transition: border-color .18s, transform .18s;
}
.card:hover { border-color: var(--accent); transform: translateY(-3px); }
.card h3 { margin-bottom: .45em; }
.card p { color: var(--muted); font-size: .95rem; margin: 0; }

.icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; margin-bottom: 18px; border-radius: 12px;
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 28%, transparent);
}
.icon svg {
  width: 22px; height: 22px; fill: none; stroke: var(--accent);
  stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round;
}

/* ---------- Stats ---------- */
.stats {
  list-style: none; margin: 0 0 44px; padding: 0;
  display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 18px;
}
.stats li {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; display: flex; flex-direction: column; gap: 6px;
}
.stats strong { font-size: clamp(1.6rem, 3vw, 2.1rem); color: var(--accent); letter-spacing: -.02em; line-height: 1; }
.stats span { font-size: .88rem; color: var(--muted); }

.pillars { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 26px; }
.pillar { border-top: 2px solid var(--accent); padding-top: 16px; }
.pillar p { color: var(--muted); font-size: .95rem; margin: 0; }

/* ---------- Contact ---------- */
.contact-grid {
  display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 20px; margin-bottom: 36px;
}
.contact-card {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px;
}
.contact-card h3 { font-size: .8rem; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin-bottom: 14px; }
.contact-card address { font-style: normal; line-height: 1.9; }
.big-link { font-size: 1.02rem; font-weight: 650; text-decoration: none; overflow-wrap: break-word; }
.big-link:hover { text-decoration: underline; }
.muted { color: var(--muted); font-size: .9rem; margin: 8px 0 0; }

.cta-band {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px;
  border: 1px solid var(--line); border-left: 4px solid var(--accent);
  border-radius: var(--radius); padding: 24px 26px; background: var(--panel);
}
.cta-band p { margin: 0; font-weight: 600; }

/* ---------- Footer ---------- */
.site-footer { background: var(--bg-alt); border-top: 1px solid var(--line); padding: 44px 0 34px; }
.footer-inner { display: flex; flex-wrap: wrap; gap: 30px; justify-content: space-between; align-items: flex-start; }
.footer-brand { display: flex; gap: 12px; align-items: flex-start; max-width: 320px; }
.footer-name { font-weight: 700; letter-spacing: .14em; margin: 0 0 4px; font-size: .95rem; }
.footer-sub { color: var(--muted); font-size: .85rem; margin: 0; }
.footer-meta { font-size: .87rem; color: var(--muted); text-align: right; }
.footer-meta p { margin: 0 0 6px; }
.footer-meta .legal { font-size: .82rem; opacity: 1; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .card { flex: 0 1 calc((100% - 20px) / 2); }
  .stats { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .pillars, .contact-grid { grid-template-columns: 1fr; }
  .two-col { grid-template-columns: 1fr; gap: 28px; }
  .footer-meta { text-align: left; }
}

@media (max-width: 720px) {
  body { font-size: 16px; }
  .nav-toggle { display: inline-flex; }

  .nav {
    position: absolute; inset: 100% 0 auto 0;
    display: none; flex-direction: column; align-items: stretch; gap: 0;
    background: var(--bg); border-bottom: 1px solid var(--line);
    padding: 8px 22px 20px; box-shadow: var(--shadow);
  }
  .nav.open { display: flex; }
  .nav a { padding: 13px 2px; border-bottom: 1px solid var(--line); font-size: 1rem; }
  .nav a:last-of-type { border-bottom: 0; }
  .theme-btn { margin-top: 14px; align-self: flex-start; }

  .card { flex: 0 1 100%; }
  .footer-inner { flex-direction: column; }

  .eyebrow { font-size: .68rem; letter-spacing: .1em; padding: 5px 12px; white-space: nowrap; }
}

/* ---------- Founder ---------- */
.founder-grid {
  display: grid; grid-template-columns: minmax(0,440px) minmax(0,1fr);
  gap: 44px; align-items: start;
}
.founder-photo {
  margin: 0; position: relative;
  background: var(--bg-alt); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
}
.founder-photo img { display: block; width: 100%; height: auto; }
.founder-photo .photo-placeholder {
  display: none;
  aspect-ratio: 520 / 620;
  align-items: center; justify-content: center;
  background:
    radial-gradient(60% 60% at 70% 20%, rgba(10,122,108,.18), transparent 70%),
    radial-gradient(50% 50% at 20% 85%, rgba(90,110,220,.12), transparent 70%),
    var(--panel);
}
.founder-photo .photo-placeholder span {
  font-size: clamp(48px, 9vw, 86px); font-weight: 800; letter-spacing: .04em;
  color: var(--accent); opacity: .85;
}
.founder-photo.photo-fallback .photo-placeholder { display: flex; }
.founder-photo figcaption {
  padding: 14px 18px; font-size: .86rem; color: var(--muted);
  border-top: 1px solid var(--line); background: var(--panel);
}
.founder-copy p:first-child { margin-top: 0; }
.founder-points { margin: 20px 0 0; padding-left: 20px; display: grid; gap: 8px; }
.founder-points li { color: var(--muted); }
.founder-points strong { color: var(--text); }

@media (max-width: 900px) {
  .founder-grid { grid-template-columns: minmax(0,1fr); gap: 28px; }
  .founder-photo { max-width: 380px; }
}
