/* tristoneconsul.com — v2 redesign
   Boutique IT consultancy look: disciplined typography, one green accent,
   borders over shadows, generous rhythm. No gradients-as-decoration. */

:root {
  --ink: #101613;
  --ink-soft: #3d4640;
  --muted: #6a746d;
  --bg: #fcfcfa;
  --surface: #ffffff;
  --border: #e4e8e4;
  --border-strong: #cdd4cd;

  --green: #2e9e52;        /* accessible primary green */
  --green-deep: #1c6b38;   /* hover / dark accents */
  --green-brand: #67ca72;  /* original brand green — marks & decor only */
  --green-tint: #edf7ef;
  --green-tint-border: #d3ecda;

  --hero-overlay: linear-gradient(102deg, rgba(8, 14, 10, 0.86) 0%, rgba(8, 14, 10, 0.55) 46%, rgba(8, 14, 10, 0.18) 100%);

  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --header-h: 84px;
  --radius: 10px;
  --radius-lg: 16px;
  --content: 1160px;
  --pad: clamp(1.25rem, 4vw, 3rem);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  font-weight: 400;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.65;
  font-size: 16.5px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: var(--green-brand); color: var(--ink); }

img { max-width: 100%; display: block; }
a { color: inherit; }

/* ---------- Type scale ---------- */
h1, h2, h3 { font-weight: 500; letter-spacing: -0.022em; line-height: 1.12; text-wrap: balance; }

.display {
  font-size: clamp(2.6rem, 5.6vw, 4.4rem);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.06;
}

.h2 {
  font-size: clamp(1.9rem, 3.6vw, 2.7rem);
  letter-spacing: -0.025em;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--green-deep);
  margin-bottom: 1.1rem;
}

.eyebrow::before {
  content: "";
  width: 22px;
  height: 2px;
  background: var(--green-brand);
  border-radius: 2px;
}

.lede {
  font-size: clamp(1.05rem, 1.5vw, 1.2rem);
  color: var(--ink-soft);
  max-width: 56ch;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 200;
  background: rgba(252, 252, 250, 0.92);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}

.site-header.is-scrolled { border-bottom-color: var(--border); }

.site-header .inner {
  max-width: var(--content);
  margin: 0 auto;
  padding: 0 var(--pad);
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
}

.brand-mark { flex: 0 0 auto; }

.brand-name {
  font-size: 1.38rem;
  font-weight: 650;
  letter-spacing: -0.018em;
  color: var(--ink);
}

.brand-name em {
  font-style: normal;
  color: var(--green);
}

.main-nav { display: flex; align-items: center; gap: 0.35rem; list-style: none; }

.main-nav a {
  display: inline-block;
  padding: 0.5rem 0.85rem;
  font-size: 0.9375rem;
  font-weight: 450;
  color: var(--ink-soft);
  text-decoration: none;
  border-radius: 8px;
  transition: color 0.15s, background 0.15s;
}

.main-nav a:hover { color: var(--ink); background: rgba(0, 0, 0, 0.045); }

.main-nav a[aria-current="page"] { color: var(--ink); font-weight: 550; }

.main-nav a[aria-current="page"]::after {
  content: "";
  display: block;
  height: 2px;
  width: 1.15rem;
  margin: 2px auto 0;
  border-radius: 2px;
  background: var(--green-brand);
}

.nav-cta {
  margin-left: 0.6rem;
  padding: 0.55rem 1.15rem !important;
  background: var(--ink);
  color: #fff !important;
  font-weight: 500 !important;
  border-radius: 999px !important;
}

.nav-cta:hover { background: #000 !important; }

.nav-toggle {
  display: none;
  background: none;
  border: 0;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  color: var(--ink);
  padding: 10px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 1.6rem;
  font-size: 0.9375rem;
  font-weight: 500;
  font-family: inherit;
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s, transform 0.1s;
}

.btn:active { transform: translateY(1px); }

.btn-primary { background: var(--green); color: #fff; }
.btn-primary:hover { background: var(--green-deep); }

.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: #000; }

.btn-ghost { border-color: var(--border-strong); color: var(--ink); background: transparent; }
.btn-ghost:hover { border-color: var(--ink); }

.btn-light { background: #fff; color: var(--ink); }
.btn-light:hover { background: #f0f2ef; }

.btn .arrow { transition: transform 0.15s; }
.btn:hover .arrow { transform: translateX(3px); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: min(88vh, 820px);
  display: flex;
  align-items: flex-end;
  color: #fff;
  overflow: hidden;
  background: #0b120d;
}

.hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 62%;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--hero-overlay);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: var(--content);
  margin: 0 auto;
  padding: 0 var(--pad) clamp(3rem, 7vh, 5.5rem);
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #cfeecd;
  padding: 0.42rem 0.95rem;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  margin-bottom: 1.6rem;
  backdrop-filter: blur(4px);
}

.hero-tag .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green-brand);
}

.hero h1 {
  color: #fff;
  max-width: 15ch;
  margin-bottom: 1.25rem;
}

.hero h1 .accent { color: var(--green-brand); }

.hero .lede { color: rgba(255, 255, 255, 0.82); max-width: 52ch; }

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 2.2rem;
}

/* ---------- Sections ---------- */
.section { padding: clamp(4rem, 9vw, 7.5rem) 0; }

.section-head { margin-bottom: clamp(2.2rem, 5vw, 3.5rem); max-width: 640px; }

.container {
  max-width: var(--content);
  margin: 0 auto;
  padding: 0 var(--pad);
}

.container-tight { max-width: 880px; }

/* ---------- Service cards ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.9rem 1.75rem 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  transition: border-color 0.18s, transform 0.18s;
}

.card:hover { border-color: var(--border-strong); transform: translateY(-3px); }

.card-num {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.card h3 { font-size: 1.22rem; font-weight: 550; letter-spacing: -0.015em; }

.card p { font-size: 0.965rem; color: var(--ink-soft); }

.card .card-line {
  margin-top: auto;
  padding-top: 1.1rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--green-deep);
}

/* ---------- Split feature (about / services) ---------- */
.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: center;
}

.split-img {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  aspect-ratio: 3 / 2;
  background: var(--green-tint);
}

.split-img img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Facts strip ---------- */
.facts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  overflow: hidden;
}

.fact {
  padding: 1.6rem 1.5rem;
  border-left: 1px solid var(--border);
}

.fact:first-child { border-left: 0; }

.fact dt {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.35rem;
}

.fact dd { font-size: 1.02rem; font-weight: 500; color: var(--ink); }

/* ---------- Green CTA band ---------- */
.cta-band {
  background: var(--green-brand);
  color: var(--ink);
  padding: clamp(3.5rem, 8vw, 6rem) 0;
}

.cta-band .inner {
  max-width: var(--content);
  margin: 0 auto;
  padding: 0 var(--pad);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.8rem;
}

.cta-band h2 {
  font-size: clamp(1.8rem, 3.4vw, 2.5rem);
  letter-spacing: -0.025em;
  max-width: 22ch;
}

.cta-band p { color: rgba(16, 22, 19, 0.75); margin-top: 0.5rem; max-width: 46ch; }

/* ---------- Contact ---------- */
.contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}

.contact-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem 1.85rem;
  display: grid;
  gap: 1.4rem;
}

.contact-line { display: grid; gap: 0.15rem; }

.contact-line dt {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.contact-line dd { font-size: 1.02rem; }

.contact-line a { text-decoration: none; font-weight: 500; color: var(--green-deep); }
.contact-line a:hover { text-decoration: underline; text-underline-offset: 3px; }

.contact-form {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: clamp(1.6rem, 3vw, 2.4rem);
  display: grid;
  gap: 1.2rem;
}

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; }

.field { display: grid; gap: 0.4rem; }

.field label {
  font-size: 0.82rem;
  font-weight: 550;
  letter-spacing: 0.02em;
  color: var(--ink-soft);
}

.field input,
.field textarea {
  font: inherit;
  padding: 0.72em 0.9em;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--ink);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(103, 202, 114, 0.25);
  background: #fff;
}

.field textarea { min-height: 150px; resize: vertical; }

.form-status { font-size: 0.92rem; min-height: 1.3em; }
.form-status.ok { color: var(--green-deep); }
.form-status.err { color: #b3261e; }

/* ---------- Services detail list ---------- */
.service-row {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 1.5rem 3rem;
  padding: 2rem 0;
  border-top: 1px solid var(--border);
}

.service-row:first-of-type { border-top: 0; padding-top: 0; }

.service-row h3 {
  font-size: 1.15rem;
  font-weight: 550;
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
}

.service-row h3 .idx {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--green);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.06em;
}

.service-row ul {
  list-style: none;
  display: grid;
  gap: 0.45rem;
  color: var(--ink-soft);
  font-size: 0.97rem;
}

.service-row ul li { display: flex; gap: 0.6rem; align-items: baseline; }

.service-row ul li::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--green-brand);
  flex: 0 0 auto;
  transform: translateY(-2px);
}

/* ---------- Download panel ---------- */
.download-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: clamp(1.8rem, 4vw, 2.6rem);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.download-panel .meta { display: grid; gap: 0.3rem; }

.download-panel .meta strong { font-size: 1.15rem; font-weight: 550; }

.download-panel .meta span { font-size: 0.92rem; color: var(--muted); }

/* ---------- Privacy ---------- */
.prose { max-width: 720px; }

.prose h2 { font-size: 1.28rem; font-weight: 550; margin: 2.4rem 0 0.75rem; letter-spacing: -0.015em; }

.prose p, .prose li { color: var(--ink-soft); }

.prose p { margin-bottom: 1rem; }

.prose ul { padding-left: 1.3rem; margin-bottom: 1rem; display: grid; gap: 0.4rem; }

.prose strong { color: var(--ink); font-weight: 550; }

.last-modified {
  display: inline-block;
  font-size: 0.85rem;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.35rem 0.95rem;
  margin: 1.2rem 0 2rem;
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
  padding: 3.2rem 0 2.4rem;
  margin-top: 0;
}

.site-footer .inner {
  max-width: var(--content);
  margin: 0 auto;
  padding: 0 var(--pad);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2.5rem;
  align-items: start;
}

.footer-brand { display: flex; align-items: center; gap: 0.6rem; margin-bottom: 0.9rem; }

.footer-desc { color: var(--muted); font-size: 0.95rem; max-width: 34ch; }

.footer-nav { display: flex; gap: 1.6rem; list-style: none; margin-bottom: 1.4rem; }

.footer-nav a {
  font-size: 0.92rem;
  color: var(--ink-soft);
  text-decoration: none;
}

.footer-nav a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }

.footer-meta {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-size: 0.92rem;
  color: var(--muted);
  text-align: right;
}

.footer-meta a { color: var(--ink-soft); text-decoration: none; font-weight: 500; }
.footer-meta a:hover { color: var(--green-deep); }

.footer-legal {
  max-width: var(--content);
  margin: 2.4rem auto 0;
  padding: 1.4rem var(--pad) 0;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.6rem;
  font-size: 0.85rem;
  color: var(--muted);
}

/* ---------- APK modal (kept behavior, restyled) ---------- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(10, 14, 11, 0.55);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  padding: 1rem;
}

.modal-box {
  background: var(--surface);
  padding: 1.75rem 1.6rem 1.4rem;
  border-radius: var(--radius-lg);
  width: min(360px, 94vw);
  text-align: center;
  border: 1px solid var(--border);
  box-shadow: 0 24px 64px rgba(8, 14, 10, 0.28);
}

.modal-box h3 { font-size: 1.15rem; font-weight: 550; margin-bottom: 1rem; }

.modal-box input[type="password"] {
  width: 100%;
  padding: 0.72em 0.9em;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  font: inherit;
  margin-bottom: 1rem;
  background: var(--bg);
}

.modal-box input[type="password"]:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(103, 202, 114, 0.25);
}

.modal-actions { display: flex; gap: 0.7rem; justify-content: center; }

.modal-actions .confirm {
  padding: 0.62rem 1.4rem;
  background: var(--ink);
  color: #fff;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  font: inherit;
  font-weight: 500;
}

.modal-actions .confirm:hover { background: #000; }

.modal-actions .cancel {
  padding: 0.62rem 1.4rem;
  background: transparent;
  color: var(--ink-soft);
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  cursor: pointer;
  font: inherit;
  font-weight: 500;
}

.modal-error { color: #b3261e; margin-top: 0.9rem; display: none; font-size: 0.9rem; }

/* ---------- Reveal animation ---------- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Page hero (inner pages) ---------- */
.page-hero { padding: clamp(3.5rem, 8vw, 6rem) 0 clamp(2.5rem, 5vw, 4rem); }

.page-hero .lede { margin-top: 1.2rem; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .card-grid { grid-template-columns: 1fr; }
  .split { grid-template-columns: 1fr; }
  .contact-layout { grid-template-columns: 1fr; }
  .facts { grid-template-columns: 1fr; }
  .fact { border-left: 0; border-top: 1px solid var(--border); }
  .fact:first-child { border-top: 0; }
  .service-row { grid-template-columns: 1fr; gap: 1rem; }
  .site-footer .inner { grid-template-columns: 1fr; }
  .footer-meta { text-align: left; }
}

@media (max-width: 640px) {
  .nav-toggle { display: block; }

  .main-nav {
    display: none;
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    background: var(--surface);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.6rem var(--pad) 1.1rem;
    border-bottom: 1px solid var(--border);
  }

  .main-nav.open { display: flex; }

  .main-nav a { padding: 0.85rem 0.5rem; }
  .main-nav a[aria-current="page"]::after { margin-left: 0; }
  .nav-cta { margin: 0.6rem 0 0; text-align: center; justify-content: center; }

  .form-row { grid-template-columns: 1fr; }

  .hero { min-height: 78vh; }

  .footer-legal { flex-direction: column; }
}
