/* Eallisto Projects — site styles */

@font-face { font-family: "Poppins"; font-weight: 400; font-style: normal; font-display: swap; src: url("../fonts/poppins-400.woff2") format("woff2"); }
@font-face { font-family: "Poppins"; font-weight: 500; font-style: normal; font-display: swap; src: url("../fonts/poppins-500.woff2") format("woff2"); }
@font-face { font-family: "Poppins"; font-weight: 600; font-style: normal; font-display: swap; src: url("../fonts/poppins-600.woff2") format("woff2"); }
@font-face { font-family: "Poppins"; font-weight: 700; font-style: normal; font-display: swap; src: url("../fonts/poppins-700.woff2") format("woff2"); }

:root {
  --accent: #02a783;
  --accent-dark: #017a60;
  --ink: #15181c;
  --ink-2: #1f2328;
  --text: #2b3036;
  --muted: #646b73;
  --line: #dfe2e5;
  --line-dark: rgba(255, 255, 255, 0.14);
  --paper: #ffffff;
  --paper-2: #f4f5f3;
  --max: 1240px;
  --gutter: clamp(16px, 3.5vw, 40px);
  --header-h: 68px;
  --section: clamp(56px, 7vw, 96px);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); }
body {
  margin: 0;
  font-family: "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 15px;
  line-height: 1.65;
  color: var(--text);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { color: var(--ink); font-weight: 600; line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 0.6em; }
h1 { font-size: clamp(2.1rem, 4.4vw, 3.5rem); letter-spacing: -0.03em; }
h2 { font-size: clamp(1.55rem, 2.6vw, 2.2rem); }
h3 { font-size: 1.12rem; letter-spacing: -0.01em; }
p { margin: 0 0 1em; }
ul, ol { margin: 0; padding: 0; list-style: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
::selection { background: var(--accent); color: #fff; }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: var(--section) 0; }
.section--tint { background: var(--paper-2); }
.section--dark { background: var(--ink); color: rgba(255, 255, 255, 0.72); }
.section--dark h2, .section--dark h3 { color: #fff; }
.lead { font-size: clamp(1rem, 1.3vw, 1.1rem); color: var(--muted); line-height: 1.7; }
.section--dark .lead { color: rgba(255, 255, 255, 0.7); }
.skip-link { position: absolute; left: -9999px; top: 8px; background: #fff; padding: 8px 14px; z-index: 100; }
.skip-link:focus { left: 8px; }

/* Section heading: numbered label column + heading column, separated by a rule */
.sec-head {
  display: grid; grid-template-columns: 3fr 9fr; gap: 24px;
  border-top: 1px solid var(--line); padding-top: 22px; margin-bottom: clamp(32px, 4vw, 48px);
}
.section--dark .sec-head { border-color: var(--line-dark); }
.sec-label {
  font-size: 0.78rem; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted);
  display: flex; gap: 12px;
}
.sec-label span { color: var(--accent); font-variant-numeric: tabular-nums; }
.section--dark .sec-label { color: rgba(255, 255, 255, 0.55); }
.sec-head h2 { max-width: 20em; }
.sec-head .lead { max-width: 44em; margin: 0; }
@media (max-width: 760px) { .sec-head { grid-template-columns: 1fr; gap: 10px; } }

/* Buttons and links */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 46px; padding: 0 22px;
  font: 500 0.88rem/1 "Poppins", sans-serif; letter-spacing: 0.01em;
  border: 1px solid transparent; border-radius: 2px; cursor: pointer;
  transition: background-color .18s, color .18s, border-color .18s;
}
.btn svg, .text-link svg { width: 15px; height: 15px; transition: transform .18s; }
.btn:hover svg, .text-link:hover svg { transform: translateX(3px); }
.btn--accent { background: var(--accent); color: #fff; }
.btn--accent:hover { background: var(--accent-dark); }
.btn--dark { background: var(--ink); color: #fff; }
.btn--dark:hover { background: #000; }
.btn--light { border-color: rgba(255, 255, 255, 0.5); color: #fff; }
.btn--light:hover { background: #fff; color: var(--ink); border-color: #fff; }
.btn--line { border-color: var(--ink); color: var(--ink); }
.btn--line:hover { background: var(--ink); color: #fff; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }
.text-link {
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 500; font-size: 0.9rem; color: var(--ink);
  padding-bottom: 3px; border-bottom: 1px solid var(--accent);
}
.text-link:hover { color: var(--accent-dark); }
.section--dark .text-link { color: #fff; }

/* Utility bar */
.topbar { background: var(--ink); color: rgba(255, 255, 255, 0.7); font-size: 0.78rem; }
.topbar .container { display: flex; justify-content: space-between; align-items: center; height: 36px; gap: 16px; }
.topbar a:hover { color: #fff; }
.topbar-links { display: flex; gap: 22px; }
@media (max-width: 760px) { .topbar { display: none; } }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: #fff; border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); gap: 24px; }
.brand img { height: 38px; width: auto; }
.nav { display: flex; align-items: center; height: 100%; }
.nav a:not(.btn) {
  display: flex; align-items: center; height: 100%; padding: 0 16px;
  font-size: 0.88rem; font-weight: 500; color: var(--ink);
  box-shadow: inset 0 -2px 0 transparent; transition: box-shadow .18s, color .18s;
}
.nav a:not(.btn):hover { color: var(--accent-dark); }
.nav a[aria-current="page"]:not(.btn) { box-shadow: inset 0 -2px 0 var(--accent); }
.nav .btn { margin-left: 14px; height: 40px; }
.nav-toggle { display: none; background: none; border: 0; padding: 10px; margin-right: -10px; cursor: pointer; }
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  display: block; width: 22px; height: 2px; background: var(--ink); position: relative; transition: transform .2s, background-color .2s;
}
.nav-toggle span::before, .nav-toggle span::after { content: ""; position: absolute; left: 0; }
.nav-toggle span::before { top: -7px; }
.nav-toggle span::after { top: 7px; }
.nav-open .nav-toggle span { background: transparent; }
.nav-open .nav-toggle span::before { transform: translateY(7px) rotate(45deg); }
.nav-open .nav-toggle span::after { transform: translateY(-7px) rotate(-45deg); }
@media (max-width: 900px) {
  .nav-toggle { display: block; }
  .nav {
    position: fixed; inset: var(--header-h) 0 auto 0; height: auto;
    flex-direction: column; align-items: stretch;
    background: #fff; padding: 8px var(--gutter) 20px; border-bottom: 1px solid var(--line);
    opacity: 0; visibility: hidden; transform: translateY(-6px); transition: opacity .18s, transform .18s, visibility .18s;
  }
  .nav-open .nav { opacity: 1; visibility: visible; transform: none; }
  .nav a:not(.btn) { height: auto; padding: 14px 0; border-bottom: 1px solid var(--line); box-shadow: none; font-size: 0.95rem; }
  .nav a[aria-current="page"]:not(.btn) { box-shadow: none; color: var(--accent-dark); }
  .nav .btn { margin: 16px 0 0; }
}

/* Home hero */
.hero {
  position: relative; color: #fff; overflow: hidden;
  background: #0d1712 url("../img/hero-forest-1920.webp") center 60% / cover no-repeat;
}
@media (max-width: 960px) { .hero { background-image: url("../img/hero-forest-960.webp"); } }
.hero::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(10, 14, 12, 0.92) 0%, rgba(10, 14, 12, 0.7) 50%, rgba(10, 14, 12, 0.35) 100%);
}
.hero .container { position: relative; }
.hero-body { padding: clamp(56px, 8vw, 108px) 0 clamp(48px, 6vw, 72px); max-width: 760px; }
.hero-kicker { font-size: 0.8rem; letter-spacing: 0.08em; text-transform: uppercase; color: rgba(255, 255, 255, 0.7); margin-bottom: 20px; display: flex; align-items: center; gap: 12px; }
.hero-kicker::before { content: ""; width: 28px; height: 1px; background: var(--accent); }
.hero h1 { color: #fff; }
.hero h1 em { font-style: normal; color: #5fd9b8; }
.hero p { font-size: clamp(1rem, 1.4vw, 1.15rem); color: rgba(255, 255, 255, 0.8); max-width: 36em; margin-bottom: 32px; }
.hero-facts {
  display: grid; grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line-dark);
}
.hero-facts li { padding: 22px 24px 26px 0; }
.hero-facts li + li { padding-left: 24px; border-left: 1px solid var(--line-dark); }
.hero-facts strong { display: block; color: #fff; font-weight: 600; font-size: 1rem; margin-bottom: 2px; }
.hero-facts span { font-size: 0.85rem; color: rgba(255, 255, 255, 0.62); }
@media (max-width: 760px) {
  .hero-facts { grid-template-columns: 1fr; }
  .hero-facts li, .hero-facts li + li { padding: 14px 0; border-left: 0; }
  .hero-facts li + li { border-top: 1px solid var(--line-dark); }
}

/* Inner page header */
.page-head { background: var(--ink); color: #fff; padding: clamp(48px, 6vw, 80px) 0 clamp(40px, 5vw, 64px); }
.page-head h1 { color: #fff; font-size: clamp(1.9rem, 3.6vw, 2.8rem); margin-bottom: 14px; max-width: 18em; }
.page-head p { color: rgba(255, 255, 255, 0.7); max-width: 40em; margin: 0; font-size: 1.02rem; }
.crumbs { display: flex; gap: 8px; font-size: 0.78rem; color: rgba(255, 255, 255, 0.5); margin-bottom: 22px; letter-spacing: 0.02em; }
.crumbs a:hover { color: #fff; }

/* Intro split */
.split { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(28px, 5vw, 80px); }
.split p:last-child { margin-bottom: 0; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }

/* Division panels */
.divisions { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); border: 1px solid var(--line); }
.division { background: #fff; display: flex; flex-direction: column; }
.division-media { aspect-ratio: 16 / 9; overflow: hidden; background: var(--paper-2); }
.division-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.division:hover .division-media img { transform: scale(1.03); }
.division-body { padding: clamp(24px, 3vw, 36px); display: flex; flex-direction: column; flex: 1; }
.division-code { font-size: 0.78rem; font-weight: 600; letter-spacing: 0.12em; color: var(--accent-dark); margin-bottom: 10px; }
.division-body p { color: var(--muted); }
.ticks { margin: 4px 0 26px; display: grid; gap: 8px; }
.ticks li { position: relative; padding-left: 22px; font-size: 0.92rem; color: var(--text); }
.ticks li::before { content: ""; position: absolute; left: 0; top: 0.72em; width: 10px; height: 1px; background: var(--accent); }
.division .text-link { margin-top: auto; align-self: flex-start; }
@media (max-width: 860px) { .divisions { grid-template-columns: 1fr; } }

/* Ruled index grid (sectors, values) */
.index-grid { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.index-grid > * { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 26px 26px 28px; transition: background-color .2s; }
.index-grid > *:hover { background: var(--paper-2); }
.section--tint .index-grid > *:hover { background: #fff; }
.index-grid .num { display: block; font-size: 0.78rem; color: var(--accent-dark); font-weight: 600; letter-spacing: 0.06em; margin-bottom: 18px; font-variant-numeric: tabular-nums; }
.index-grid h3 { margin-bottom: 6px; }
.index-grid p { color: var(--muted); font-size: 0.9rem; margin: 0; }
.index-grid--4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 960px) { .index-grid, .index-grid--4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .index-grid, .index-grid--4 { grid-template-columns: 1fr; } .index-grid > * { padding: 20px; } }

/* Process steps */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; counter-reset: step; }
.steps li { padding: 0 24px 0 0; position: relative; }
.steps li + li { padding-left: 24px; border-left: 1px solid var(--line-dark); }
.steps li::before {
  counter-increment: step; content: counter(step, decimal-leading-zero);
  display: block; font-size: 2rem; font-weight: 300; color: var(--accent); line-height: 1; margin-bottom: 18px; font-variant-numeric: tabular-nums;
}
.steps h3 { font-size: 1rem; }
.steps p { font-size: 0.9rem; margin: 0; }
@media (max-width: 860px) {
  .steps { grid-template-columns: 1fr 1fr; row-gap: 32px; }
  .steps li:nth-child(3) { border-left: 0; padding-left: 0; }
}
@media (max-width: 520px) {
  .steps { grid-template-columns: 1fr; }
  .steps li, .steps li + li { border-left: 0; padding: 0; }
  .steps li + li { border-top: 1px solid var(--line-dark); padding-top: 24px; }
}

/* Image + text feature */
.feature { display: grid; grid-template-columns: 6fr 6fr; align-items: stretch; background: var(--paper-2); }
.feature-media { min-height: 360px; position: relative; }
.feature-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.feature-body { padding: clamp(32px, 5vw, 64px); }
.feature-body p { color: var(--muted); }
.feature-points { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin: 28px 0; border-top: 1px solid var(--line); padding-top: 24px; }
.feature-points h3 { font-size: 0.95rem; margin-bottom: 6px; }
.feature-points p { font-size: 0.88rem; margin: 0; }
@media (max-width: 860px) {
  .feature { grid-template-columns: 1fr; }
  .feature-media { min-height: 0; aspect-ratio: 16 / 10; }
}
@media (max-width: 520px) { .feature-points { grid-template-columns: 1fr; } }

/* Contact band */
.band { background: #0c3a2f; color: rgba(255, 255, 255, 0.75); padding: clamp(48px, 6vw, 72px) 0; }
.band-inner { display: grid; grid-template-columns: 7fr 5fr; gap: 40px; align-items: end; }
.band h2 { color: #fff; margin-bottom: 10px; }
.band p { margin: 0; max-width: 34em; }
.band-contacts { display: grid; gap: 4px; justify-items: start; }
.band-contacts a { color: #fff; font-size: 1.05rem; font-weight: 500; }
.band-contacts a:hover { color: #5fd9b8; }
.band-contacts .btn { margin-top: 16px; }
@media (max-width: 860px) { .band-inner { grid-template-columns: 1fr; align-items: start; } }

/* Long-form detail pages */
.detail { display: grid; grid-template-columns: 4fr 8fr; gap: clamp(28px, 5vw, 80px); align-items: start; }
.detail-aside { position: sticky; top: calc(var(--header-h) + 28px); }
.detail-aside .division-code { margin-bottom: 12px; }
.detail-aside h2 { font-size: clamp(1.4rem, 2.2vw, 1.85rem); }
.detail-aside p { color: var(--muted); }
.detail-aside img { margin-top: 24px; aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
.prose { max-width: 720px; }
.prose p, .prose li { color: var(--text); }
.prose h2 { font-size: 1.35rem; margin-top: 1.8em; }
.prose h3 { font-size: 1.05rem; margin-top: 1.8em; }
.prose ul { margin: 0 0 1em; display: grid; gap: 6px; }
.prose ul li { position: relative; padding-left: 20px; }
.prose ul li::before { content: ""; position: absolute; left: 0; top: 0.75em; width: 8px; height: 1px; background: var(--accent); }
.prose .meta { color: var(--muted); font-size: 0.88rem; }
.spec { border-top: 1px solid var(--line); margin-top: 28px; }
.spec li { display: grid; grid-template-columns: 2.2em 1fr; padding: 13px 0; border-bottom: 1px solid var(--line); font-size: 0.93rem; }
.spec li span { color: var(--accent-dark); font-weight: 600; font-size: 0.78rem; padding-top: 2px; font-variant-numeric: tabular-nums; }
@media (max-width: 860px) { .detail { grid-template-columns: 1fr; } .detail-aside { position: static; } .detail-aside img { display: none; } }

/* Group list */
.group { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); }
.group li { padding: 18px 0; border-bottom: 1px solid var(--line); font-weight: 500; color: var(--ink); }
.group li + li { padding-left: 20px; border-left: 1px solid var(--line); }
@media (max-width: 760px) { .group { grid-template-columns: 1fr 1fr; } .group li:nth-child(3) { border-left: 0; padding-left: 0; } }

/* Contact page */
.contact { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(32px, 5vw, 80px); }
.contact-list { border-top: 1px solid var(--line); }
.contact-list li { padding: 18px 0; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 7em 1fr; gap: 12px; }
.contact-list .k { font-size: 0.78rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); padding-top: 3px; }
.contact-list .v { color: var(--ink); font-weight: 500; }
.contact-list .v a:hover { color: var(--accent-dark); }
.contact-list address { font-style: normal; }
.contact-list small { display: block; font-weight: 400; color: var(--muted); font-size: 0.85rem; margin-top: 4px; }
@media (max-width: 860px) { .contact { grid-template-columns: 1fr; } }
.form { display: grid; gap: 18px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 560px) { .form-row { grid-template-columns: 1fr; } }
.field label { display: block; font-size: 0.8rem; font-weight: 500; color: var(--ink); margin-bottom: 6px; }
.field input, .field select, .field textarea {
  width: 100%; font: inherit; font-size: 0.93rem; color: var(--ink);
  padding: 11px 12px; border: 1px solid #c9ced3; border-radius: 2px; background: #fff;
  transition: border-color .15s, box-shadow .15s;
}
.field textarea { min-height: 140px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(2, 167, 131, 0.18); }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form-note { font-size: 0.8rem; color: var(--muted); margin: 0; }
.form-note a { text-decoration: underline; }
.alert { padding: 12px 16px; border-left: 3px solid; font-size: 0.92rem; }
.alert--ok { border-color: var(--accent); background: #e9f6f2; color: var(--accent-dark); }
.alert--err { border-color: #c0392b; background: #fbeceb; color: #8e2a20; }

/* Footer */
.site-footer { background: var(--ink-2); color: rgba(255, 255, 255, 0.6); font-size: 0.86rem; padding-top: clamp(48px, 6vw, 72px); }
.site-footer a:hover { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 4fr 2fr 2fr 4fr; gap: 40px; padding-bottom: 48px; }
.footer-brand img { height: 36px; width: auto; margin-bottom: 18px; }
.footer-brand p { max-width: 26em; }
.site-footer h4 { color: #fff; font-size: 0.78rem; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 16px; }
.site-footer li { margin-bottom: 9px; }
.site-footer address { font-style: normal; }
.site-footer .contact-lines a { color: #fff; }
.social { display: flex; gap: 8px; margin-top: 20px; }
.social a { width: 36px; height: 36px; display: grid; place-items: center; border: 1px solid var(--line-dark); border-radius: 2px; transition: background-color .18s, border-color .18s; }
.social a:hover { background: var(--accent); border-color: var(--accent); }
.social svg { width: 16px; height: 16px; fill: currentColor; color: #fff; }
.footer-bottom {
  border-top: 1px solid var(--line-dark); padding: 20px 64px 20px 0;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; font-size: 0.78rem;
}
.footer-bottom ul { display: flex; gap: 20px; }
.footer-bottom li { margin: 0; }
@media (max-width: 960px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; gap: 32px; } }

.back-to-top {
  position: fixed; right: 18px; bottom: 18px; z-index: 40;
  width: 42px; height: 42px; border: 0; border-radius: 2px; cursor: pointer;
  background: var(--ink); color: #fff; display: grid; place-items: center;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
  opacity: 0; visibility: hidden; transition: opacity .2s, visibility .2s, background-color .2s;
}
.back-to-top:hover { background: var(--accent); }
.back-to-top.is-visible { opacity: 1; visibility: visible; }
.back-to-top svg { width: 18px; height: 18px; }

/* Subtle entrance (only with JS and when motion is allowed) */
.js .reveal { opacity: 0; transform: translateY(12px); transition: opacity .5s ease, transform .5s ease; }
.js .reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  *, *::before, *::after { transition-duration: 0s !important; }
}

.center { text-align: center; }
.mb-0 { margin-bottom: 0; }
