:root {
  color-scheme: dark light;
  --paper: #1c1611;
  --paper-deep: #15110e;
  --ink: #f3eee4;
  --muted: #d7cfc2;
  --line: rgba(243, 238, 228, 0.18);
  --line-strong: rgba(243, 238, 228, 0.36);
  --paper-glass: rgba(28, 22, 17, 0.92);
  --menu-bg: rgba(28, 22, 17, 0.98);
  --row-hover: rgba(255, 255, 255, 0.06);
  --selection: rgba(255, 255, 255, 0.18);
  --accent: #8dc8bc;
  --accent-soft: rgba(141, 200, 188, 0.16);
  --accent-two: #d8ac78;
  --max: 1180px;
}

html[data-theme="light"] {
  --paper: #e4ded2;
  --paper-deep: #d9d1c3;
  --ink: #241c16;
  --muted: #493d34;
  --line: rgba(36, 28, 22, 0.2);
  --line-strong: rgba(36, 28, 22, 0.38);
  --paper-glass: rgba(228, 222, 210, 0.94);
  --menu-bg: rgba(228, 222, 210, 0.98);
  --row-hover: rgba(255, 255, 255, 0.34);
  --selection: rgba(36, 28, 22, 0.16);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--paper); }
body { margin: 0; background: var(--paper); color: var(--muted); line-height: 1.65; }
body[data-site="infosec"] { --accent: #7caed0; --accent-soft: rgba(124, 174, 208, 0.14); --accent-two: #9eb3a1; }
body[data-site="togo"] { --accent: #d0a66f; --accent-soft: rgba(208, 166, 111, 0.15); --accent-two: #8eb5aa; }
a { color: inherit; text-underline-offset: 0.24em; }
a:hover { color: var(--ink); }
button, a { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
::selection { background: var(--selection); }

.skip-link { position: fixed; left: 1rem; top: -5rem; z-index: 20; padding: .7rem 1rem; background: var(--ink); color: var(--paper); border-radius: 999px; }
.skip-link:focus { top: 1rem; }
.site-header { position: sticky; top: 0; z-index: 10; border-bottom: 1px solid var(--line); background: var(--paper-glass); backdrop-filter: blur(18px); }
.nav { min-height: 76px; max-width: var(--max); margin: 0 auto; padding: 0 24px; display: flex; align-items: center; justify-content: space-between; gap: 2rem; }
.identity { display: inline-flex; align-items: center; gap: .85rem; font-weight: 650; text-decoration: none; color: var(--ink); letter-spacing: -.02em; }
.identity img { width: 104px; height: auto; filter: invert(1); }
html[data-theme="light"] .identity img { filter: none; }
.identity span { padding-left: .85rem; border-left: 1px solid var(--line-strong); white-space: nowrap; }
.nav-links { display: flex; align-items: center; gap: 1.2rem; }
.nav-links a { text-decoration: none; }
.theme-toggle, .menu-toggle { width: 42px; height: 42px; border: 1px solid var(--line-strong); border-radius: 50%; background: transparent; color: var(--ink); cursor: pointer; }
.menu-toggle { display: none; }
.mobile-menu { max-width: var(--max); margin: 0 auto; padding: 0 24px 24px; }
.mobile-menu a { display: block; padding: .7rem 0; border-bottom: 1px solid var(--line); text-decoration: none; }

main { overflow: hidden; }
.hero { min-height: min(780px, calc(100vh - 76px)); max-width: var(--max); margin: 0 auto; padding: clamp(88px, 13vw, 170px) 24px 90px; display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(260px, .65fr); gap: clamp(42px, 9vw, 120px); align-items: end; }
.eyebrow { margin: 0 0 1.2rem; color: var(--accent); font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
h1, h2, h3 { color: var(--ink); margin-top: 0; letter-spacing: -.035em; }
.hero h1 { max-width: 820px; margin-bottom: 1.5rem; }
.lead { max-width: 720px; margin: 0; font-size: 18px !important; }
.hero-aside { border-left: 1px solid var(--line-strong); padding-left: 28px; }
.hero-aside p:first-child { color: var(--ink); font-weight: 650; }
.hero-actions, .related-links { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.8rem; }
.button { display: inline-flex; align-items: center; min-height: 46px; padding: .68rem 1rem; border: 1px solid var(--line-strong); border-radius: 999px; text-decoration: none; color: var(--ink); }
.button.primary { background: var(--ink); color: var(--paper); border-color: var(--ink); }

.section { border-top: 1px solid var(--line); }
.section-inner { max-width: var(--max); margin: 0 auto; padding: clamp(72px, 9vw, 118px) 24px; }
.section-head { display: grid; grid-template-columns: .55fr 1.45fr; gap: clamp(30px, 7vw, 90px); margin-bottom: 56px; }
.section-head p { max-width: 660px; margin-top: .3rem; }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.card { min-height: 250px; padding: 32px; background: var(--paper); }
.card:hover { background: var(--row-hover); }
.card-index { color: var(--accent); font-weight: 700; }
.card h3 { margin-bottom: .8rem; }
.card p { margin-bottom: 0; }
.steps { counter-reset: step; border-top: 1px solid var(--line-strong); }
.step { display: grid; grid-template-columns: 90px .8fr 1.2fr; gap: 26px; padding: 32px 0; border-bottom: 1px solid var(--line); }
.step::before { counter-increment: step; content: "0" counter(step); color: var(--accent); font-weight: 700; }
.step h3, .step p { margin: 0; }
.statement { max-width: 940px; }
.statement p { font-size: 20px !important; color: var(--ink); }
.compact-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.compact-item { padding: 28px; border: 1px solid var(--line); border-radius: 18px; background: linear-gradient(135deg, var(--accent-soft), transparent 55%); }
.compact-item p:last-child { margin-bottom: 0; }
.notice { border-left: 3px solid var(--accent); padding: 4px 0 4px 24px; max-width: 820px; }

.legal { max-width: 820px; margin: 0 auto; padding: 90px 24px 120px; }
.legal h1 { margin-bottom: 2rem; }
.legal h2 { margin-top: 2.5rem; }
.legal address { font-style: normal; }

.site-footer { border-top: 1px solid var(--line); }
.footer-inner { max-width: var(--max); margin: 0 auto; padding: 42px 24px; display: grid; grid-template-columns: 1fr auto; gap: 30px; align-items: end; }
.footer-inner p { margin: 0; }
.footer-links { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: flex-end; }
.footer-links a { text-decoration: none; }

@media (max-width: 860px) {
  .nav-links > a { display: none; }
  .menu-toggle { display: inline-grid; place-items: center; }
  .hero { min-height: auto; grid-template-columns: 1fr; padding-top: 96px; }
  .hero-aside { max-width: 600px; }
  .section-head { grid-template-columns: 1fr; }
  .cards { grid-template-columns: 1fr; }
  .card { min-height: 0; }
  .step { grid-template-columns: 55px 1fr; }
  .step p { grid-column: 2; }
}

@media (max-width: 560px) {
  .nav { padding-inline: 18px; gap: 1rem; }
  .identity img { width: 84px; }
  .identity span { display: none; }
  .hero, .section-inner, .legal, .footer-inner { padding-left: 18px; padding-right: 18px; }
  .compact-grid { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; }
  .footer-links { justify-content: flex-start; }
}

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