/* ==========================================================================
   Postechy — site styles
   Structure: tokens · base · layout · components · sections · responsive
   ========================================================================== */

/* Design tokens ----------------------------------------------------------- */
:root {
  --bg: #ffffff;
  --bg-subtle: #f6f8fb;
  --surface: #ffffff;
  --ink: #0b1220;
  --ink-muted: #475467;
  --line: #e4e8ef;
  --brand: #2f5bea;
  --brand-strong: #1f43c2;
  --brand-soft: #eaf0ff;
  --dark: #0b1220;
  --dark-line: rgba(255, 255, 255, 0.12);

  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(11, 18, 32, 0.06);
  --shadow-md: 0 10px 30px -12px rgba(11, 18, 32, 0.18);
  --container: 1120px;
  --header-h: 68px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, p, ul { margin: 0; }
ul { padding: 0; list-style: none; }
a { color: inherit; }
img, svg { display: block; max-width: 100%; }

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

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 200;
  padding: 0.6rem 1rem;
  background: var(--ink);
  color: #fff;
  border-radius: var(--radius-sm);
  transition: top 0.2s;
}
.skip-link:focus { top: 1rem; }

/* Layout ------------------------------------------------------------------ */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 1.5rem;
}

.section { padding-block: clamp(4rem, 8vw, 6.5rem); }
.section--subtle { background: var(--bg-subtle); }

.section-head { max-width: 40rem; margin-bottom: 3rem; }
.eyebrow {
  display: inline-block;
  margin-bottom: 0.75rem;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand);
}
.section-title {
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
}
.section-lead { margin-top: 1rem; font-size: 1.125rem; color: var(--ink-muted); }

/* Buttons ----------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 1.4rem;
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s, transform 0.2s;
}
.btn svg { width: 1.1em; height: 1.1em; }
.btn--primary { background: var(--brand); color: #fff; }
.btn--primary:hover { background: var(--brand-strong); transform: translateY(-1px); }
.btn--ghost { border-color: var(--line); background: var(--surface); color: var(--ink); }
.btn--ghost:hover { border-color: var(--ink); }
.btn--sm { padding: 0.5rem 1.1rem; font-size: 0.9375rem; }

/* Header ------------------------------------------------------------------ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}
.site-header.is-scrolled { border-color: var(--line); }

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-decoration: none;
}
.brand img { width: 28px; height: 28px; }

.nav-menu { display: flex; align-items: center; gap: 2rem; }
.nav-menu a:not(.btn) {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--ink-muted);
  text-decoration: none;
  transition: color 0.2s;
}
.nav-menu a:not(.btn):hover { color: var(--ink); }

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 0;
  align-items: center;
  justify-content: center;
  background: none;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--ink);
  cursor: pointer;
}
.nav-toggle svg { width: 22px; height: 22px; }

/* Hero -------------------------------------------------------------------- */
.hero {
  position: relative;
  overflow: hidden;
  padding-block: clamp(4.5rem, 11vw, 8.5rem) clamp(4rem, 8vw, 6rem);
  background:
    radial-gradient(60rem 28rem at 85% -10%, var(--brand-soft), transparent 70%),
    var(--bg);
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse at 70% 0%, #000 0%, transparent 65%);
  -webkit-mask-image: radial-gradient(ellipse at 70% 0%, #000 0%, transparent 65%);
  opacity: 0.6;
  pointer-events: none;
}
.hero .container { position: relative; z-index: 1; }

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  padding: 0.35rem 0.9rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--brand-strong);
  background: var(--brand-soft);
  border-radius: 999px;
}
.hero-badge::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--brand);
}
.hero h1 {
  max-width: 17ch;
  font-size: clamp(2.5rem, 6.5vw, 4.5rem);
  line-height: 1.05;
  letter-spacing: -0.035em;
}
.hero h1 span { color: var(--brand); }
.hero-lead {
  max-width: 38rem;
  margin-top: 1.5rem;
  font-size: clamp(1.0625rem, 2vw, 1.25rem);
  color: var(--ink-muted);
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 2.25rem; }

/* Services ---------------------------------------------------------------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 1.5rem;
}
.card {
  padding: 2rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: #cfd8ea; }
.card-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin-bottom: 1.25rem;
  color: var(--brand);
  background: var(--brand-soft);
  border-radius: var(--radius-sm);
}
.card-icon svg { width: 24px; height: 24px; }
.card h3 { font-size: 1.25rem; letter-spacing: -0.01em; }
.card p { margin-top: 0.75rem; color: var(--ink-muted); }

/* About ------------------------------------------------------------------- */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 6vw, 5rem);
  align-items: start;
}
.about-copy p { color: var(--ink-muted); font-size: 1.0625rem; }
.about-copy p + p { margin-top: 1.25rem; }
.stat-list { display: grid; gap: 1rem; }
.stat {
  padding: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.stat strong { display: block; font-size: 1.125rem; }
.stat span { color: var(--ink-muted); }

/* Contact ----------------------------------------------------------------- */
.contact { background: var(--dark); color: #fff; }
.contact .eyebrow { color: #8fb0ff; }
.contact .section-lead { color: #aab4c5; }
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 6vw, 5rem);
  align-items: start;
}
.contact-card-list { display: grid; gap: 1rem; }
.contact-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  color: inherit;
  text-decoration: none;
  border: 1px solid var(--dark-line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.04);
  transition: background 0.2s, border-color 0.2s;
}
a.contact-card:hover { background: rgba(255, 255, 255, 0.09); border-color: rgba(255, 255, 255, 0.28); }
.contact-card small {
  display: block;
  margin-bottom: 0.15rem;
  font-size: 0.8125rem;
  color: #8e9ab0;
}
.contact-card span { font-weight: 600; overflow-wrap: anywhere; }
.contact-card svg { flex: none; width: 20px; height: 20px; color: #8fb0ff; }

/* Footer ------------------------------------------------------------------ */
.site-footer {
  padding-block: 2rem;
  font-size: 0.875rem;
  color: #8e9ab0;
  background: var(--dark);
  border-top: 1px solid var(--dark-line);
}
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.75rem; }
.site-footer a { color: #c5cddb; }

/* 404 --------------------------------------------------------------------- */
.not-found { min-height: 70vh; display: grid; place-items: center; text-align: center; }
.not-found h1 { font-size: clamp(3rem, 10vw, 6rem); letter-spacing: -0.04em; color: var(--brand); }
.not-found p { margin: 0.75rem 0 2rem; color: var(--ink-muted); }

/* Scroll reveal (only active when JS has set .js on <html>) --------------- */
.js .reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.6s ease, transform 0.6s ease; }
.js .reveal.is-visible { opacity: 1; transform: none; }

/* Responsive -------------------------------------------------------------- */
@media (max-width: 800px) {
  .about-grid,
  .contact-grid { grid-template-columns: 1fr; }

  .nav-toggle { display: inline-flex; }
  .nav-menu {
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.5rem 1.5rem 1.25rem;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    visibility: hidden;
    opacity: 0;
    transform: translateY(-6px);
    transition: opacity 0.2s, transform 0.2s, visibility 0.2s;
  }
  .nav-menu.is-open { visibility: visible; opacity: 1; transform: none; }
  .nav-menu a:not(.btn) { padding: 0.9rem 0; border-bottom: 1px solid var(--line); }
  .nav-menu .btn { margin-top: 1rem; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .js .reveal { opacity: 1; transform: none; }
}
.contact-cta { margin-top: 1.75rem; }
