:root {
  --primary: #576C36;
  --accent: #7A974D;
  --ink: #4F4E4E;
  --muted: #6b7a5a;
  --line: #e6e8ec;
  --surface: #f7f8fa;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: #fff;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 { line-height: 1.2; }
h4 { margin-top: 0; }

/* Anchor targets clear the sticky header. */
section[id] { scroll-margin-top: 80px; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* --- Header ---------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  max-width: 1080px;
  margin: 0 auto;
  padding: 14px 32px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
}
.brand:hover { text-decoration: none; }
.brand-logo { height: 34px; width: auto; }
.brand-name { font-weight: 700; font-size: 1.15rem; letter-spacing: -0.01em; }

.site-nav { display: flex; align-items: center; gap: 28px; }
.site-nav a { color: var(--muted); font-weight: 500; }
.site-nav a:hover { color: var(--ink); text-decoration: none; }
.site-nav .nav-cta {
  background: var(--primary);
  color: #fff;
  padding: 9px 18px;
  border-radius: 8px;
}
.site-nav .nav-cta:hover { background: var(--accent); color: #fff; }

/* --- Layout ---------------------------------------------------------------- */
.page { max-width: 1080px; margin: 0 auto; padding: 0 32px; }

.section { padding: 72px 0; }
.section-title { font-size: 2.1rem; font-weight: 700; margin: 0 0 12px; }
.section-lead {
  font-size: 1.1rem;
  color: var(--muted);
  max-width: 640px;
  margin: 0 0 40px;
}
/* Full-bleed tinted band inside the centred column. */
.section-alt {
  background: var(--surface);
  margin: 0 calc(50% - 50vw);
  padding: 72px calc(50vw - 50%);
}

/* --- Hero ------------------------------------------------------------------ */
.hero-main {
  text-align: center;
  padding: 88px 20px 64px;
}
.hero-main h1 {
  font-size: 3rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 16px;
}
.hero-main h2 {
  font-size: 1.4rem;
  font-weight: 400;
  color: var(--muted);
  margin: 0 0 24px;
}
.hero-desc {
  font-size: 1.15rem;
  color: var(--muted);
  max-width: 620px;
  margin: 0 auto 32px;
}

/* --- App portfolio --------------------------------------------------------- */
.app-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
  gap: 24px;
}
.app-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 28px;
  background: #fff;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}
.app-card:hover {
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
}
.app-card-head { display: flex; align-items: center; gap: 16px; margin-bottom: 16px; }
.app-card-head h3 { font-size: 1.4rem; font-weight: 700; margin: 0; }
.app-icon {
  width: 72px;
  height: 72px;
  border-radius: 16px;
  object-fit: cover;
  background: var(--surface);
  flex-shrink: 0;
}
.app-tagline { margin: 2px 0 0; color: var(--accent); font-weight: 600; font-size: 0.95rem; }
.app-summary { color: var(--muted); margin: 0 0 16px; }
.app-tags {
  font-size: 0.85rem;
  color: var(--muted);
  margin: 0 0 20px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
/* Push the badges to the bottom so cards of unequal text still line up. */
.app-links {
  margin-top: auto;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}
.app-links img { display: block; height: 40px; width: auto; }
.app-site-link { font-weight: 600; font-size: 0.95rem; }

/* --- About ----------------------------------------------------------------- */
.about-text { max-width: 720px; }
.about-text p { font-size: 1.08rem; color: var(--muted); margin: 0 0 18px; }

/* --- Contact form ---------------------------------------------------------- */
.contact-form { max-width: 620px; }
.contact-form input[type="email"],
.contact-form input[type="text"],
.contact-form textarea {
  width: 100%;
  font-family: inherit;
  font-size: 1rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px;
  margin-bottom: 16px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.contact-form input:focus,
.contact-form textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(122, 151, 77, 0.18);
  outline: none;
}
/* Honeypot — off-screen rather than display:none, which some bots skip. */
.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.btn-submit {
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 13px 28px;
  border-radius: 10px;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-block;
  transition: background-color 0.25s ease;
}
.btn-submit:hover { background: var(--accent); color: #fff; text-decoration: none; }

.alert {
  padding: 14px 18px;
  border-radius: 10px;
  margin-bottom: 24px;
  max-width: 620px;
}
.alert-success { background: #e7f6ec; color: #1c5b32; }
.alert-error { background: #fdeaea; color: #8c2020; }

/* --- Footer ---------------------------------------------------------------- */
footer {
  background: var(--surface);
  border-top: 1px solid var(--line);
  padding: 48px 32px 24px;
  color: var(--ink);
}
.footer-top {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 64px;
  max-width: 1080px;
  margin: 0 auto;
}
.footer-top div { min-width: 150px; }
.footer-top h4 { font-size: 0.95rem; margin-bottom: 12px; }
.footer-top a { display: block; margin-bottom: 8px; color: var(--muted); font-size: 0.95rem; }
.footer-top a:hover { color: var(--ink); }
.footer-top a.active { color: var(--ink); font-weight: 600; }
.footer-bottom {
  text-align: center;
  margin-top: 40px;
  color: var(--muted);
  font-size: 0.9rem;
}

/* --- Legal pages ----------------------------------------------------------- */
.text-document { max-width: 720px; padding: 56px 0; }
.text-document h1 { font-size: 1.9rem; font-weight: 700; }
.text-document h2 { font-size: 1.25rem; font-weight: 700; margin-top: 32px; }
.text-document p, .text-document li { color: var(--muted); }

/* --- Cookie consent -------------------------------------------------------- */
.cookie-consent {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 9999;
  display: flex;
  justify-content: center;
}
.cookie-content {
  max-width: 420px;
  width: 100%;
  margin: 24px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.14);
  padding: 24px;
}
.cookie-content h3 { margin: 0 0 8px; font-size: 1.2rem; }
.cookie-content p { margin: 0 0 10px; color: var(--muted); font-size: 0.98rem; }
.cookie-link { font-size: 0.92rem; display: inline-block; margin-bottom: 16px; }
.cookie-actions { display: flex; gap: 12px; }
.cookie-btn {
  border: none;
  border-radius: 10px;
  padding: 11px 24px;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.cookie-btn.accept { background: var(--primary); color: #fff; }
.cookie-btn.accept:hover { background: var(--accent); }
.cookie-btn.decline { background: #fff; color: var(--muted); border: 1px solid var(--line); }
.cookie-btn.decline:hover { background: var(--surface); color: var(--ink); }

/* --- Responsive ------------------------------------------------------------ */
@media (max-width: 900px) {
  .app-grid { grid-template-columns: 1fr; }
  .hero-main h1 { font-size: 2.3rem; }
  .hero-main { padding: 56px 10px 40px; }
}

@media (max-width: 700px) {
  .site-header-inner { padding: 12px 20px; }
  .site-nav { gap: 16px; font-size: 0.95rem; }
  .brand-name { display: none; }
  .page { padding: 0 20px; }
  .section { padding: 52px 0; }
  .section-alt { padding: 52px 20px; }
  .section-title { font-size: 1.7rem; }
  .footer-top { flex-direction: column; gap: 24px; text-align: center; }
  .cookie-actions { flex-direction: column; }
  .cookie-btn { width: 100%; }
}

@media (max-width: 480px) {
  .app-card { padding: 22px; }
  .app-card-head { flex-direction: column; align-items: flex-start; }
}
