/* AWARE AI public base styles
 * Authority: design tokens, global layout, typography, navigation, footer,
 * accessibility and common responsive behavior.
 */
:root {
  color-scheme: dark;
  --bg: #070a0f;
  --bg-soft: #090e15;
  --surface: #0d141e;
  --surface-2: #101925;
  --surface-3: #131f2d;
  --ink: #f2f5f8;
  --muted: #a9b4c2;
  --muted-2: #7f8c9d;
  --line: #263244;
  --line-strong: #33445b;
  --accent: #4da3ff;
  --accent-strong: #83c1ff;
  --accent-soft: rgba(77, 163, 255, .10);
  --danger: #ff8585;
  --success: #71d3c1;
  --radius: 18px;
  --shadow: 0 24px 70px rgba(0,0,0,.28);
  --shell: 1220px;
  --header-h: 112px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--bg); }
body { margin: 0; font-family: Inter, Pretendard, "Noto Sans KR", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color: var(--ink); background: var(--bg); font-size: 18px; line-height: 1.72; text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; color: inherit; }

.skip-link { position: fixed; left: 12px; top: -60px; z-index: 1000; padding: 10px 14px; background: var(--surface-3); color: var(--ink); border: 1px solid var(--line); border-radius: 8px; }
.skip-link:focus { top: 16px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.shell { width: min(calc(100% - 48px), var(--shell)); margin: 0 auto; }
.narrow-shell { max-width: 980px; }
.narrow-heading { max-width: 920px; margin-inline: auto; }
.page-view[hidden] { display: none !important; }
.page-view:not([hidden]) { display: block; min-height: calc(100vh - var(--header-h)); animation: viewIn .18s ease-out; }
@keyframes viewIn { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }
.section { padding: 84px 0 110px; scroll-margin-top: var(--header-h); background: var(--bg); }
.section--hero { padding-top: 128px; min-height: calc(100vh - 1px); display: grid; align-items: center; }
.content-stack > * + * { margin-top: 38px; }

.site-header { position: fixed; inset: 0 0 auto 0; z-index: 100; background: rgba(7,10,15,.88); backdrop-filter: blur(18px); border-bottom: 1px solid transparent; transition: .2s ease; }
.site-header[data-scrolled="true"] { border-color: var(--line); box-shadow: 0 10px 36px rgba(0,0,0,.28); background: rgba(7,10,15,.96); }
.header-inner { height: var(--header-h); display: flex; align-items: center; gap: 28px; }
.brand { display: inline-flex; align-items: center; flex: 0 0 auto; text-decoration: none; }
.brand-mark { width: 92px; height: 92px; object-fit: contain; }
.site-nav { display: flex; align-items: center; justify-content: flex-end; gap: 22px; margin-left: auto; }
.nav-top { text-decoration: none; color: #cbd4df; font-size: 15.5px; font-weight: 720; white-space: nowrap; transition: color .16s ease; }
.nav-top:hover, .nav-top:focus-visible, .nav-top[aria-current="page"] { color: var(--accent-strong); }
.nav-group { position: relative; }
.nav-group-label { display: flex; align-items: center; gap: 5px; }
.nav-group-toggle { border: 0; background: transparent; padding: 2px 4px; color: var(--muted); cursor: pointer; line-height: 1; }
.nav-group-toggle:hover, .nav-group-toggle:focus-visible { color: var(--accent-strong); }
.nav-dropdown { position: absolute; top: calc(100% + 18px); right: 0; width: 270px; padding: 12px; border: 1px solid var(--line); border-radius: 14px; background: rgba(13,20,30,.98); box-shadow: var(--shadow); opacity: 0; visibility: hidden; transform: translateY(-5px); transition: .16s ease; }
.nav-group:hover > .nav-dropdown, .nav-group:focus-within > .nav-dropdown, .nav-group[data-open="true"] > .nav-dropdown { opacity: 1; visibility: visible; transform: translateY(0); }
.nav-dropdown a { display: flex; flex-direction: column; gap: 2px; padding: 11px 12px; border-radius: 10px; text-decoration: none; color: var(--ink); }
.nav-dropdown a:hover, .nav-dropdown a:focus-visible { background: var(--accent-soft); }
.nav-dropdown strong { font-size: 14px; }
.nav-dropdown span { font-size: 12px; color: var(--muted); line-height: 1.4; }
.mega-menu { width: min(720px, calc(100vw - 48px)); display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 4px; right: -280px; }
.nav-dropdown--compact { width: 220px; }
.nav-toggle { display: none; background: transparent; border: 0; padding: 8px; margin-left: auto; }
.nav-toggle > span:not(.sr-only) { display: block; width: 25px; height: 2px; margin: 5px 0; background: var(--ink); }

.eyebrow { margin: 0 0 16px; font-size: 16px; letter-spacing: .14em; text-transform: uppercase; font-weight: 820; color: var(--accent-strong); }
h1,h2,h3,p { margin-top: 0; }
h1 { font-size: clamp(42px, 5vw, 70px); line-height: 1.08; letter-spacing: -.045em; margin-bottom: 28px; }
h2 { font-size: clamp(34px, 3.7vw, 50px); line-height: 1.14; letter-spacing: -.035em; margin-bottom: 20px; }
h3 { font-size: clamp(22px, 2vw, 29px); line-height: 1.3; letter-spacing: -.02em; margin-bottom: 12px; }
p { color: var(--muted); }
.lede { font-size: clamp(21px, 2vw, 27px); line-height: 1.62; color: #d6dde6; max-width: 900px; }
.section-heading { max-width: 900px; }
.section-heading > p:last-child { font-size: 20px; color: #c3ccd7; }
.subsection { padding-top: 20px; border-top: 1px solid var(--line); }
.subsection > p { max-width: 900px; }

.site-footer { border-top: 1px solid var(--line); padding: 34px 0 44px; background: #06090d; }
.footer-inner { display: grid; grid-template-columns: 1fr auto; gap: 18px 28px; align-items: start; }
.footer-inner strong { font-size: 18px; }
.footer-inner p { margin: 5px 0 0; font-size: 14px; }
.footer-inner nav { display: flex; flex-wrap: wrap; gap: 14px; justify-content: flex-end; }
.footer-inner nav a { color: var(--muted); text-decoration: none; font-size: 13px; }
.footer-inner nav a:hover { color: var(--accent-strong); }
.footer-copy { grid-column: 1 / -1; color: var(--muted-2) !important; }

/* Original responsive baseline; retained before P01/P02 overrides to preserve cascade. */
@media (max-width: 980px) {
  :root { --header-h: 86px; }
  body { font-size: 17px; }
  .header-inner { height: var(--header-h); }
  .brand-mark { width: 72px; height: 72px; }
  .nav-toggle { display: block; }
  .site-nav { position: fixed; inset: var(--header-h) 0 auto 0; max-height: calc(100vh - var(--header-h)); overflow-y: auto; display: none; flex-direction: column; align-items: stretch; gap: 0; padding: 14px 24px 26px; margin: 0; background: rgba(7,10,15,.985); border-bottom: 1px solid var(--line); }
  .site-nav[data-open="true"] { display: flex; }
  .nav-top { display: block; padding: 14px 2px; font-size: 17px; }
  .nav-group { border-top: 1px solid var(--line); }
  .nav-group-label { justify-content: space-between; }
  .nav-group-toggle { padding: 14px; font-size: 20px; }
  .nav-dropdown { position: static; width: 100%; padding: 0 0 8px 12px; border: 0; box-shadow: none; background: transparent; opacity: 1; visibility: visible; transform: none; display: none; }
  .nav-group[data-open="true"] > .nav-dropdown { display: grid; }
  .mega-menu { grid-template-columns: 1fr; }
  .nav-dropdown a { padding: 10px 12px; }
  .section { padding-top: 68px; }
  .section--hero { padding-top: 110px; }
  .footer-inner { grid-template-columns: 1fr; }
  .footer-inner nav { justify-content: flex-start; }
}

@media (max-width: 640px) {
  .shell { width: min(calc(100% - 28px), var(--shell)); }
  h1 { font-size: clamp(38px, 11vw, 50px); }
  h2 { font-size: clamp(31px, 9vw, 40px); }
  .section { padding-bottom: 82px; }
}

/* P01/P02 common overrides; order intentionally follows the original baseline. */
:root { --header-h: 100px; }
[hidden] { display: none !important; }
main { padding-top: var(--header-h); }
h1 { font-size: clamp(2rem, 3.8vw, 3.7rem); line-height: 1.3; letter-spacing: -.035em; word-break: keep-all; overflow-wrap: anywhere; }
h2 { font-size: clamp(1.7rem, 2.6vw, 2.7rem); line-height: 1.35; }
h3 { line-height: 1.45; }
.site-header { border-bottom: 1px solid var(--line); }
.header-inner { gap: 15px; }
.brand-mark { width: 70px; height: 70px; }
.site-nav { gap: 17px; }
.site-nav .nav-top, .menu-group > summary { font-size: 14px; }
.nav-cta { max-width: 180px; border-radius: 12px; text-align: center; line-height: 1.5; padding: 10px 14px; font-size: 14px; }
.menu-group { position: relative; }
.menu-group > summary { cursor: pointer; color: #cbd4df; font-weight: 720; white-space: nowrap; padding: 8px 0; }
.menu-links { position: absolute; top: 100%; right: 0; padding: 14px; width: 360px; max-height: 75vh; overflow-y: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); }
.menu-links a { display: block; padding: 10px; font-size: 15px; text-decoration: none; border-radius: 8px; }
.menu-links a:hover { background: var(--accent-soft); }
a:focus-visible, button:focus-visible, summary:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid var(--accent-strong); outline-offset: 4px; }

@media (max-width: 1150px) {
  .nav-toggle { display: block; font-size: 16px; border: 1px solid var(--line); border-radius: 8px; }
  .site-nav { display: none; position: absolute; top: var(--header-h); left: 0; right: 0; padding: 20px 24px; background: var(--surface); max-height: calc(100dvh - var(--header-h)); overflow-y: auto; }
  .site-nav[data-open=true] { display: flex; flex-direction: column; align-items: stretch; }
  .site-nav .nav-top { padding: 10px 0; }
  .menu-links { position: static; width: auto; box-shadow: none; margin: 8px 0; }
  .nav-cta { max-width: none; }
}

@media (max-width: 760px) {
  :root { --header-h: 80px; }
  .brand-mark { width: 60px; height: 60px; }
  .shell { width: min(calc(100% - 32px), var(--shell)); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
