/* Aasta Tech — site styles. Mobile-first; no framework. */

:root {
  --green-900: #063f34;
  --green-700: #0a6b58;
  --green-600: #0d7f69;
  --green-100: #e3f1ed;
  --green-50: #f2f8f6;
  --ink: #17231f;
  --ink-soft: #46554f;
  --line: #d5e2dd;
  --white: #ffffff;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(6, 63, 52, 0.06), 0 4px 16px rgba(6, 63, 52, 0.06);
  --wrap: 1120px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--green-700); text-underline-offset: 2px; }
a:hover { color: var(--green-900); }

:focus-visible { outline: 3px solid var(--green-900); outline-offset: 2px; box-shadow: 0 0 0 2px var(--white); }
.hero :focus-visible, .cta :focus-visible, .site-footer :focus-visible { outline-color: var(--white); box-shadow: 0 0 0 2px var(--green-900); }

h1, h2, h3 { line-height: 1.25; color: var(--green-900); margin: 0 0 0.6em; }
h1 { font-size: clamp(1.9rem, 4.5vw, 2.9rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(1.45rem, 3vw, 2rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .wrap { padding: 0 24px; } }

.skip-link {
  position: absolute; left: 8px; top: -48px; z-index: 100;
  background: var(--green-900); color: var(--white); padding: 8px 14px; border-radius: 6px;
}
.skip-link:focus { top: 8px; color: var(--white); }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--white);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; min-height: 64px; gap: 16px; }
.wordmark {
  font-weight: 700; font-size: 1.3rem; letter-spacing: 0.02em;
  color: var(--green-900); text-decoration: none; white-space: nowrap;
}
.wordmark:hover { color: var(--green-700); }

.nav-toggle {
  display: inline-flex; align-items: center; gap: 8px;
  background: none; border: 1px solid var(--line); border-radius: 8px;
  padding: 8px 12px; font: inherit; color: var(--green-900); cursor: pointer;
}
.nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after {
  display: block; width: 18px; height: 2px; background: currentColor; position: relative; content: "";
}
.nav-toggle-bars::before { position: absolute; top: -6px; }
.nav-toggle-bars::after { position: absolute; top: 6px; }

.site-nav { display: none; }
.site-nav ul { list-style: none; margin: 0; padding: 0; }
.site-nav a {
  display: block; padding: 12px 4px; text-decoration: none;
  color: var(--ink); font-weight: 500;
}
.site-nav a:hover { color: var(--green-700); }
.site-nav a[aria-current="page"] { color: var(--green-700); font-weight: 700; }

.site-header.nav-open .site-nav {
  display: block; position: absolute; left: 0; right: 0; top: 100%;
  background: var(--white); border-bottom: 1px solid var(--line); box-shadow: var(--shadow);
  padding: 4px 16px 12px;
}
.site-header.nav-open .site-nav li + li { border-top: 1px solid var(--line); }

@media (min-width: 820px) {
  .nav-toggle { display: none; }
  .site-nav, .site-header.nav-open .site-nav {
    display: block; position: static; box-shadow: none; border: 0; padding: 0;
  }
  .site-nav ul { display: flex; gap: 28px; }
  .site-header.nav-open .site-nav li + li { border-top: 0; }
  .site-nav a { padding: 8px 0; border-bottom: 2px solid transparent; }
  .site-nav a[aria-current="page"] { border-bottom-color: var(--green-700); }
}

/* Hero */
.hero {
  background:
    radial-gradient(circle at 85% 20%, rgba(255, 255, 255, 0.12) 0, rgba(255, 255, 255, 0) 45%),
    linear-gradient(135deg, var(--green-900) 0%, var(--green-700) 60%, var(--green-600) 100%);
  color: var(--white);
  padding: 64px 0 72px;
}
.hero h1 { color: var(--white); max-width: 18ch; }
.hero .lead { font-size: 1.15rem; max-width: 60ch; color: var(--white); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

.page-head { background: var(--green-50); border-bottom: 1px solid var(--line); padding: 44px 0 36px; }
.page-head .lead { font-size: 1.1rem; color: var(--ink-soft); max-width: 65ch; margin: 0; }

.btn {
  display: inline-block; padding: 12px 22px; border-radius: 8px;
  font-weight: 600; text-decoration: none; border: 2px solid transparent; line-height: 1.2;
}
.btn-light { background: var(--white); color: var(--green-900); }
.btn-light:hover { background: var(--green-100); color: var(--green-900); }
.btn-outline-light { border-color: rgba(255, 255, 255, 0.7); color: var(--white); }
.btn-outline-light:hover { background: rgba(255, 255, 255, 0.12); color: var(--white); }
.btn-primary { background: var(--green-700); color: var(--white); }
.btn-primary:hover { background: var(--green-900); color: var(--white); }

/* Sections */
.section { padding: 56px 0; }
.section[id] { scroll-margin-top: 72px; }
.section-alt { background: var(--green-50); }
.section-head { max-width: 70ch; margin-bottom: 28px; }
.section-head p { color: var(--ink-soft); }

.grid { display: grid; gap: 20px; grid-template-columns: 1fr; }
@media (min-width: 620px) { .grid-2, .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 620px) { .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .grid-4 { grid-template-columns: repeat(4, 1fr); } }

.card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; box-shadow: var(--shadow);
}
.card h3 { margin-bottom: 0.4em; }
.card p { color: var(--ink-soft); margin-bottom: 0.6em; }
.card p:last-child { margin-bottom: 0; }
.card .more { font-weight: 600; text-decoration: none; }
.card .more::after { content: " \2192"; }

.icon {
  width: 44px; height: 44px; border-radius: 10px; margin-bottom: 14px;
  display: grid; place-items: center; background: var(--green-100); color: var(--green-700);
}
.icon svg { width: 24px; height: 24px; }

.steps { counter-reset: step; list-style: none; padding: 0; margin: 0; }
.steps li { counter-increment: step; position: relative; padding-left: 52px; }
.steps li::before {
  content: counter(step); position: absolute; left: 0; top: 0;
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--green-700); color: var(--white); font-weight: 700;
  display: grid; place-items: center;
}

.ticks { list-style: none; padding: 0; margin: 0 0 1em; }
.ticks li { position: relative; padding-left: 26px; margin-bottom: 6px; }
.ticks li::before {
  content: ""; position: absolute; left: 4px; top: 0.45em;
  width: 10px; height: 6px; border-left: 2px solid var(--green-700); border-bottom: 2px solid var(--green-700);
  transform: rotate(-45deg);
}

/* Products */
.product { display: grid; gap: 24px; align-items: start; padding: 40px 0; border-top: 1px solid var(--line); scroll-margin-top: 80px; }
.product:first-of-type { border-top: 0; }
@media (min-width: 820px) { .product { grid-template-columns: 2fr 1fr; gap: 40px; } }
.product-media {
  display: flex; flex-wrap: wrap; gap: 16px; justify-content: center; align-items: center;
  background: var(--green-50); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px; min-height: 180px;
}
.product-media img { width: auto; max-height: 220px; }
.product-media .placeholder { color: var(--green-700); }
.product-media .placeholder svg { width: 72px; height: 72px; }
.tags-label { font-size: 0.9rem; color: var(--ink-soft); margin: 0 0 6px; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0 0 1em; }
.tags li { background: var(--green-100); color: var(--green-900); border-radius: 999px; padding: 4px 12px; font-size: 0.9rem; }

.jump { display: flex; flex-wrap: wrap; gap: 8px 18px; list-style: none; padding: 0; margin: 20px 0 0; }
.jump a { font-weight: 600; }

/* Architecture diagram (HTML, stacks on mobile) */
.arch { display: grid; gap: 12px; }
.arch-layer {
  border: 1px dashed var(--green-700); border-radius: var(--radius);
  padding: 16px; background: var(--white);
}
.arch-layer h3 { font-size: 1rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--green-700); margin-bottom: 10px; }
.arch-items { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0; }
.arch-items li {
  background: var(--green-50); border: 1px solid var(--line); border-radius: 8px;
  padding: 8px 12px; font-size: 0.95rem;
}
.arch-items small { display: block; color: var(--ink-soft); font-size: 0.8rem; }
.arch-link { text-align: center; color: var(--green-700); font-size: 0.9rem; font-weight: 600; }
.arch-link::before { content: "\2195  "; }

/* Contact */
.contact-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 16px; }
.contact-list li { display: grid; grid-template-columns: 28px 1fr; gap: 12px; align-items: start; }
.contact-list svg { width: 22px; height: 22px; color: var(--green-700); margin-top: 3px; }
.contact-list strong { display: block; }
.map {
  width: 100%; aspect-ratio: 4 / 3; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--green-50);
}
@media (min-width: 820px) { .map { aspect-ratio: auto; height: 100%; min-height: 360px; } }

.details { display: grid; grid-template-columns: max-content 1fr; gap: 8px 20px; margin: 0; }
.details dt { font-weight: 600; color: var(--green-900); }
.details dd { margin: 0; }
@media (max-width: 520px) { .details { grid-template-columns: 1fr; } .details dd { margin-bottom: 8px; } }

/* CTA band */
.cta { background: var(--green-900); color: var(--white); padding: 48px 0; }
.cta h2 { color: var(--white); }
.cta p { color: #cfe6df; max-width: 60ch; }
.cta a:not(.btn) { color: var(--white); }

/* Prose (privacy) */
.prose { max-width: 72ch; }
.prose h2 { font-size: 1.3rem; margin-top: 1.6em; }

/* Footer */
.site-footer { background: #0b2a24; color: #c7dbd5; padding: 48px 0 24px; font-size: 0.95rem; }
.site-footer a { color: #e8f3ef; }
.site-footer a:hover { color: var(--white); }
.footer-grid { display: grid; gap: 28px; grid-template-columns: 1fr; }
@media (min-width: 720px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; } }
.footer-name { color: var(--white); font-weight: 700; font-size: 1.05rem; margin-bottom: 6px; }
.site-footer h2 { color: var(--white); font-size: 0.95rem; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 10px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 6px; }
.site-footer address { font-style: normal; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, 0.12); margin-top: 32px; padding-top: 18px; font-size: 0.875rem; }
.footer-bottom p { margin: 0; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

.spaced { margin-top: 28px; }
address { font-style: normal; }
