/* =========================================================
   Kódkert — styles
   Palette: code + garden (warm cream, forest greens, honey)
   ========================================================= */

:root {
  /* colors */
  --cream:      #FAF8F2;
  --cream-deep: #F3EEE2;
  --ink:        #16241B;
  --ink-soft:   #3c4a40;
  --muted:      #5d6b60;
  --line:       #e4e0d3;

  --forest:     #1E4632;
  --forest-700: #173a29;
  --leaf:       #3E9B6B;
  --leaf-600:   #348a5d;
  --leaf-300:   #79C99A;
  --leaf-100:   #e6f1e9;
  --sage-bg:    #eef3ec;
  --sage-card:  #f4f7f0;

  --honey:      #E0A04A;
  --honey-deep: #c9863a;
  --clay:       #C97B4A;

  /* type */
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  /* layout */
  --maxw: 1140px;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow-sm: 0 1px 2px rgba(22,36,27,.06), 0 4px 14px rgba(22,36,27,.05);
  --shadow-md: 0 10px 30px rgba(22,36,27,.10);
  --shadow-lg: 0 24px 60px rgba(22,36,27,.14);

  --ease: cubic-bezier(.22,.61,.36,1);
}

/* ---------- reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
html { scroll-padding-top: 88px; }

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.65;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
ul { list-style: none; padding: 0; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.container.narrow { max-width: 800px; }

/* ---------- skip link ---------- */
.skip-link {
  position: absolute; left: 16px; top: -60px;
  background: var(--forest); color: #fff;
  padding: 10px 16px; border-radius: 10px; z-index: 200;
  transition: top .2s var(--ease);
}
.skip-link:focus { top: 16px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-weight: 600; font-size: 16px;
  padding: 14px 26px; border-radius: 999px;
  border: 1.5px solid transparent;
  transition: transform .18s var(--ease), background .2s var(--ease), box-shadow .2s var(--ease), color .2s var(--ease);
  white-space: nowrap;
  position: relative; overflow: hidden;
}
.btn-sm { padding: 9px 18px; font-size: 15px; }
.btn-block { width: 100%; }

.btn-primary { background: var(--forest); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--forest-700); transform: translateY(-2px); box-shadow: var(--shadow-md); }

/* soft light sweep across primary buttons on hover */
.btn-primary::after {
  content: ""; position: absolute; top: 0; bottom: 0; left: -80%; width: 55%;
  background: linear-gradient(105deg, transparent, rgba(255,255,255,.28), transparent);
  transform: skewX(-18deg); pointer-events: none;
}
.btn-primary:hover::after { left: 130%; transition: left .55s var(--ease); }

.btn-ghost { background: transparent; color: var(--forest); border-color: rgba(30,70,50,.25); }
.btn-ghost:hover { background: var(--leaf-100); border-color: var(--leaf); transform: translateY(-2px); }

.btn:focus-visible, a:focus-visible, button:focus-visible, summary:focus-visible,
input:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--leaf-300); outline-offset: 2px;
}

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(250,248,242,.82);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s var(--ease), box-shadow .25s var(--ease), background .25s var(--ease);
}
.site-header.scrolled { border-bottom-color: var(--line); box-shadow: 0 6px 24px rgba(22,36,27,.06); }

.header-inner { display: flex; align-items: center; justify-content: space-between; height: 76px; gap: 20px; }

.logo { display: inline-flex; align-items: center; gap: 10px; color: var(--forest); }
.logo-mark { width: 34px; height: 34px; flex: none; transition: transform .3s var(--ease); }
.logo:hover .logo-mark { transform: rotate(-8deg) scale(1.08); }
.logo-text { font-family: var(--font-display); font-weight: 600; font-size: 23px; letter-spacing: -0.02em; color: var(--ink); }

.main-nav { display: flex; align-items: center; gap: 3px; }
.main-nav a {
  position: relative; padding: 8px 12px; border-radius: 999px; white-space: nowrap;
  font-weight: 500; font-size: 15px; color: var(--ink-soft);
  transition: color .2s var(--ease), background .2s var(--ease);
}
.main-nav a:hover { color: var(--forest); background: var(--leaf-100); }

.header-actions { display: flex; align-items: center; gap: 14px; }

.lang-toggle {
  display: inline-flex; align-items: center; gap: 2px;
  background: var(--cream-deep); border: 1px solid var(--line);
  border-radius: 999px; padding: 3px;
}
.lang-btn {
  border: none; background: transparent; color: var(--muted);
  font-weight: 600; font-size: 13.5px; padding: 5px 11px; border-radius: 999px;
  transition: background .2s var(--ease), color .2s var(--ease);
}
.lang-btn.is-active { background: var(--forest); color: #fff; }
.lang-btn:not(.is-active):hover { color: var(--forest); }
.lang-sep { color: var(--line); font-size: 12px; }

.nav-toggle {
  display: none; width: 44px; height: 44px; border: 1px solid var(--line);
  background: var(--cream-deep); border-radius: 12px; position: relative;
}
.nav-toggle-bar {
  position: absolute; left: 11px; right: 11px; height: 2px; background: var(--ink);
  border-radius: 2px; transition: transform .25s var(--ease), opacity .2s var(--ease), top .25s var(--ease);
}
.nav-toggle-bar:nth-child(1) { top: 15px; }
.nav-toggle-bar:nth-child(2) { top: 21px; }
.nav-toggle-bar:nth-child(3) { top: 27px; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) { top: 21px; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) { top: 21px; transform: rotate(-45deg); }

/* ---------- hero ---------- */
.hero { position: relative; padding: clamp(48px, 8vw, 92px) 0 clamp(40px, 6vw, 72px); }
.hero-inner { display: grid; grid-template-columns: 1.05fr .95fr; gap: 48px; align-items: center; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 9px;
  font-weight: 600; font-size: 14px; letter-spacing: .04em; text-transform: uppercase;
  color: var(--leaf-600); margin-bottom: 20px;
}
.eyebrow::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--honey); flex: none; }
.eyebrow-light { color: var(--leaf-300); }

.hero-title {
  font-size: clamp(2.4rem, 5.4vw, 4rem);
  font-weight: 600;
  letter-spacing: -0.02em;
}
.hero-title .hl { color: var(--leaf); position: relative; white-space: nowrap; }
.hero-title .hl::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 4%;
  height: 28%; background: var(--leaf-100); border-radius: 4px; z-index: -1;
  transform: scaleX(0); transform-origin: left;
  animation: hlGrow .7s var(--ease) .45s forwards;
}
@keyframes hlGrow { to { transform: scaleX(1); } }
.hero-subtitle {
  margin-top: 22px; font-size: clamp(1.05rem, 1.6vw, 1.22rem);
  color: var(--ink-soft); max-width: 56ch;
}
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 32px; }
.hero-trust {
  display: inline-flex; align-items: center; gap: 9px;
  margin-top: 26px; font-size: 15px; color: var(--muted); font-weight: 500;
}
.ico-inline { width: 19px; height: 19px; color: var(--leaf); flex: none; }

/* hero visual */
.hero-visual { position: relative; display: grid; place-items: center; min-height: 360px; }
.hero-illustration { width: min(100%, 440px); position: relative; z-index: 2; filter: drop-shadow(0 20px 40px rgba(22,36,27,.12)); }
.blob {
  position: absolute; border-radius: 50%; filter: blur(8px); z-index: 1;
  animation: blobDrift 14s ease-in-out infinite alternate;
}
.blob-1 { width: 360px; height: 360px; background: radial-gradient(circle at 30% 30%, #dcebe0, #cfe6d6); opacity: .7; top: 6%; left: 4%; }
.blob-2 { width: 220px; height: 220px; background: radial-gradient(circle at 50% 50%, #f6e2c0, #f3d6a8); opacity: .55; bottom: 2%; right: 6%; animation-duration: 18s; animation-delay: -6s; }
@keyframes blobDrift {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(16px, -20px) scale(1.06); }
}

.sway { transform-origin: 210px 250px; animation: sway 6s ease-in-out infinite; }
.leaf-a { animation-delay: -1s; }
.leaf-b { animation-delay: -2s; }
.leaf-c { animation-delay: -.5s; }
@keyframes sway { 0%,100% { transform: rotate(-1.5deg); } 50% { transform: rotate(1.5deg); } }

.float-dot { animation: floaty 5s ease-in-out infinite; }
.float-dot.d2 { animation-delay: -1.5s; animation-duration: 6s; }
.float-dot.d3 { animation-delay: -3s; animation-duration: 7s; }
@keyframes floaty { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }

/* ---------- value strip ---------- */
.strip { background: var(--forest); color: #eaf3ed; }
.strip-inner {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center;
  gap: 14px 22px; padding: 18px 24px;
}
.strip-item { font-weight: 500; font-size: 15px; letter-spacing: .01em; }
.strip-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--leaf-300); opacity: .8; }

/* ---------- sections ---------- */
.section { padding: clamp(64px, 9vw, 110px) 0; }
.section-alt { background: var(--sage-bg); }

.section-head { max-width: 720px; margin: 0 auto clamp(40px, 5vw, 60px); text-align: center; }
.section-head .eyebrow { justify-content: center; }
.section-title { font-size: clamp(1.9rem, 3.6vw, 2.7rem); }

/* short underline that "grows" under centered section titles on reveal */
.section-head .section-title::after {
  content: ""; display: block; width: 64px; height: 4px; border-radius: 2px;
  margin: 18px auto 0;
  background: linear-gradient(90deg, var(--leaf), var(--honey));
  transform: scaleX(0); transform-origin: center;
  transition: transform .8s var(--ease) .25s;
}
.section-head.reveal.in .section-title::after { transform: scaleX(1); }
.section-lead { margin-top: 18px; font-size: 1.12rem; color: var(--ink-soft); }

/* ---------- cards ---------- */
.cards-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }

.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 32px; box-shadow: var(--shadow-sm);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s var(--ease);
}
.section-alt .card { background: #fff; }
.card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); border-color: var(--leaf-300); }

.card-icon {
  width: 56px; height: 56px; border-radius: 16px;
  display: grid; place-items: center; margin-bottom: 22px;
  background: var(--leaf-100); color: var(--forest);
}
.card-icon svg { width: 28px; height: 28px; transition: transform .35s var(--ease); }
.card:hover .card-icon svg { transform: rotate(-8deg) scale(1.12); }
.service-card h3 { font-size: 1.4rem; margin-bottom: 12px; }
.service-card p { color: var(--ink-soft); margin-bottom: 18px; }

.card-list li {
  position: relative; padding-left: 28px; margin-bottom: 9px;
  font-size: 15px; color: var(--ink-soft);
}
.card-list li::before {
  content: ""; position: absolute; left: 0; top: 7px;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--leaf-100);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 12l4 4 10-10' fill='none' stroke='%233E9B6B' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-size: 12px; background-repeat: no-repeat; background-position: center;
}

/* ---------- process ---------- */
.process-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px;
  list-style: none; padding: 0;
}
.process-step {
  position: relative; background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius); padding: 30px 26px 28px;
  box-shadow: var(--shadow-sm);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}
.process-step:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); }
.process-num {
  font-family: var(--font-display); font-size: 2.4rem; font-weight: 600;
  color: var(--leaf-300); line-height: 1; display: block; margin-bottom: 16px;
}
.process-tag {
  display: inline-block; font-size: 12.5px; font-weight: 600; letter-spacing: .03em;
  text-transform: uppercase; color: var(--honey-deep);
  background: #fbf0db; padding: 4px 11px; border-radius: 999px; margin-bottom: 14px;
}
.process-step h3 { font-size: 1.3rem; margin-bottom: 10px; }
.process-step p { font-size: 15px; color: var(--ink-soft); }

/* ---------- why ---------- */
.why-grid { grid-template-columns: repeat(3, 1fr); }
.why-card { padding: 28px; }
.why-icon {
  width: 50px; height: 50px; border-radius: 14px; display: grid; place-items: center;
  background: var(--leaf-100); color: var(--leaf-600); margin-bottom: 18px;
}
.why-icon svg { width: 26px; height: 26px; transition: transform .35s var(--ease); }
.card:hover .why-icon svg { transform: rotate(-8deg) scale(1.12); }
.why-card h3 { font-size: 1.22rem; margin-bottom: 9px; }
.why-card p { font-size: 15px; color: var(--ink-soft); }

/* ---------- "even a simple site can include these" chips ---------- */
.services-extras { margin-top: 52px; text-align: center; }
.services-extras h3 { font-size: 1.35rem; margin-bottom: 8px; }
.services-extras > p { color: var(--muted); font-size: 15px; margin-bottom: 22px; }
.extras-list {
  display: flex; flex-wrap: wrap; justify-content: center;
  gap: 10px; max-width: 760px; margin: 0 auto;
}
.extras-list li {
  display: inline-flex; align-items: center; gap: 9px;
  background: #fff; border: 1px solid var(--line); border-radius: 999px;
  padding: 9px 18px; font-size: 14.5px; font-weight: 500; color: var(--ink-soft);
  box-shadow: var(--shadow-sm);
  transition: transform .2s var(--ease), border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.extras-list li::before {
  content: ""; width: 16px; height: 16px; border-radius: 50%; flex: none;
  background: var(--leaf-100);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 12l4 4 10-10' fill='none' stroke='%233E9B6B' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-size: 11px; background-repeat: no-repeat; background-position: center;
}
.extras-list li:hover { transform: translateY(-3px); border-color: var(--leaf-300); box-shadow: var(--shadow-md); }

/* chips pop in one by one once the block scrolls into view;
   "backwards" fill keeps them hidden during their delay, and once the
   animation ends the normal hover transition takes over untouched */
.services-extras.reveal .extras-list li { opacity: 0; }
.services-extras.reveal.in .extras-list li { opacity: 1; animation: chipIn .5s var(--ease) backwards; }
.services-extras.in .extras-list li:nth-child(2) { animation-delay: .06s; }
.services-extras.in .extras-list li:nth-child(3) { animation-delay: .12s; }
.services-extras.in .extras-list li:nth-child(4) { animation-delay: .18s; }
.services-extras.in .extras-list li:nth-child(5) { animation-delay: .24s; }
.services-extras.in .extras-list li:nth-child(6) { animation-delay: .30s; }
.services-extras.in .extras-list li:nth-child(7) { animation-delay: .36s; }
.services-extras.in .extras-list li:nth-child(8) { animation-delay: .42s; }
@keyframes chipIn {
  from { opacity: 0; transform: translateY(12px); }
}

/* ---------- about ---------- */
.about-inner { display: grid; grid-template-columns: .85fr 1.15fr; gap: 56px; align-items: center; }
.about-visual { display: grid; place-items: center; }
.about-card {
  background: linear-gradient(160deg, var(--forest), var(--forest-700));
  color: #fff; border-radius: 28px; padding: 56px 40px; text-align: center;
  box-shadow: var(--shadow-lg); width: 100%; max-width: 340px;
}
.about-mark { width: 90px; height: 90px; margin: 0 auto 24px; }
.about-equation { font-family: var(--font-display); font-size: 2rem; font-weight: 600; }
.about-equation strong { color: var(--leaf-300); }
.about-equation-sub { color: #bcd3c4; font-size: 15px; margin-top: 6px; letter-spacing: .02em; }
.about-copy .section-title { margin-bottom: 20px; }
.about-copy p { color: var(--ink-soft); margin-bottom: 16px; }
.about-copy p strong { color: var(--forest); }
.about-copy .btn { margin-top: 12px; }

/* ---------- faq ---------- */
.faq-list { display: flex; flex-direction: column; gap: 14px; }
.faq-item {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm); overflow: hidden;
  transition: border-color .2s var(--ease);
}
.faq-item[open] { border-color: var(--leaf-300); }
.faq-item summary {
  list-style: none; cursor: pointer; padding: 20px 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  font-family: var(--font-display); font-weight: 600; font-size: 1.12rem; color: var(--ink);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-icon { position: relative; width: 20px; height: 20px; flex: none; }
.faq-icon::before, .faq-icon::after {
  content: ""; position: absolute; background: var(--leaf-600); border-radius: 2px;
  transition: transform .25s var(--ease), opacity .2s var(--ease);
}
.faq-icon::before { top: 9px; left: 0; right: 0; height: 2.5px; }
.faq-icon::after { left: 9px; top: 0; bottom: 0; width: 2.5px; }
.faq-item[open] .faq-icon::after { transform: rotate(90deg); opacity: 0; }
.faq-answer { padding: 0 24px 22px; }
.faq-answer p { color: var(--ink-soft); }

/* ---------- contact ---------- */
.contact-section { background: linear-gradient(165deg, var(--forest), var(--forest-700)); color: #eaf3ed; }
.contact-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; }
.contact-section .section-title { color: #fff; }
.contact-lead { color: #c4d8cb; font-size: 1.1rem; margin-top: 16px; max-width: 46ch; }

.contact-details { margin-top: 34px; display: flex; flex-direction: column; gap: 18px; }
.contact-details li { display: flex; align-items: center; gap: 14px; font-size: 16px; }
.contact-details a { color: #fff; border-bottom: 1px solid transparent; transition: border-color .2s; }
.contact-details a:hover { border-bottom-color: var(--leaf-300); }
.contact-ico {
  width: 42px; height: 42px; border-radius: 12px; flex: none;
  display: grid; place-items: center; background: rgba(255,255,255,.10); color: var(--leaf-300);
}
.contact-ico svg { width: 21px; height: 21px; }

.contact-form {
  background: #fff; color: var(--ink); border-radius: var(--radius);
  padding: 34px; box-shadow: var(--shadow-lg);
}
.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 600; font-size: 14.5px; margin-bottom: 7px; color: var(--ink); }
.optional { font-weight: 400; color: var(--muted); }
.field input, .field textarea {
  width: 100%; font-family: inherit; font-size: 16px; color: var(--ink);
  padding: 13px 15px; border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  background: var(--cream); transition: border-color .2s var(--ease), background .2s var(--ease);
}
.field input::placeholder, .field textarea::placeholder { color: #9aa69d; }
.field input:focus, .field textarea:focus { border-color: var(--leaf); background: #fff; outline: none; }
.field textarea { resize: vertical; min-height: 110px; }
.field.invalid input, .field.invalid textarea { border-color: var(--clay); background: #fcf2ec; }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.form-status { margin-top: 14px; font-size: 15px; font-weight: 600; min-height: 1px; }
.form-status.ok { color: var(--leaf-600); }
.form-status.err { color: var(--clay); }
.form-fineprint { margin-top: 14px; font-size: 13px; color: var(--muted); text-align: center; }

/* ---------- footer ---------- */
.site-footer { background: var(--ink); color: #c9d3cb; padding: 60px 0 28px; }
.footer-inner {
  display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 40px;
  padding-bottom: 40px; border-bottom: 1px solid rgba(255,255,255,.08);
}
.logo-light { color: var(--leaf-300); }
.logo-light .logo-text { color: #fff; }
.footer-tagline { margin-top: 16px; color: #97a59b; max-width: 32ch; font-size: 15px; }
.footer-nav h4, .footer-contact h4 {
  color: #fff; font-family: var(--font-body); font-size: 14px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .05em; margin-bottom: 16px;
}
.footer-nav { display: flex; flex-direction: column; gap: 10px; }
.footer-nav a, .footer-contact a { color: #c9d3cb; transition: color .2s; width: fit-content; }
.footer-nav a:hover, .footer-contact a:hover { color: var(--leaf-300); }
.footer-contact { display: flex; flex-direction: column; gap: 10px; }
.footer-contact p { color: #97a59b; font-size: 15px; }
.footer-bottom {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding-top: 24px; font-size: 14px; color: #8a978d; flex-wrap: wrap;
}

/* ---------- reading progress bar ---------- */
.scroll-progress {
  position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 400;
  background: linear-gradient(90deg, var(--leaf), var(--leaf-300) 60%, var(--honey));
  transform: scaleX(0); transform-origin: 0 50%;
  pointer-events: none;
}

/* ---------- back to top ---------- */
.to-top {
  position: fixed; right: 22px; bottom: 22px; z-index: 150;
  width: 48px; height: 48px; border-radius: 50%; border: none;
  background: var(--forest); color: #fff;
  display: grid; place-items: center; box-shadow: var(--shadow-md);
  opacity: 0; transform: translateY(14px); pointer-events: none;
  transition: opacity .3s var(--ease), transform .3s var(--ease), background .2s var(--ease);
}
.to-top.show { opacity: 1; transform: none; pointer-events: auto; }
.to-top:hover { background: var(--leaf-600); transform: translateY(-3px); }
.to-top svg { width: 20px; height: 20px; }

/* ---------- entry verification gate ---------- */
/* Hidden by default; the inline <head> script adds .needs-gate to <html>
   for visitors not yet verified this session. Without JS the gate stays
   hidden (reCAPTCHA needs JS anyway), so the site remains reachable. */
.gate {
  position: fixed; inset: 0; z-index: 300;
  display: none; place-items: center;
  padding: 24px; overflow-y: auto;
}
html.needs-gate .gate { display: grid; }
html.needs-gate body { overflow: hidden; }

/* the site itself stays visible behind, softly blurred — that's the point */
.gate-backdrop {
  position: absolute; inset: 0;
  background: linear-gradient(165deg, rgba(250,248,242,.72), rgba(238,243,236,.80));
  -webkit-backdrop-filter: blur(9px) saturate(130%);
  backdrop-filter: blur(9px) saturate(130%);
}

.gate-card {
  position: relative; width: 100%; max-width: 460px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 42px 36px 28px; text-align: center;
  outline: none;
}
.gate-card::before {
  content: ""; position: absolute; top: 0; left: 28px; right: 28px; height: 4px;
  border-radius: 0 0 4px 4px;
  background: linear-gradient(90deg, var(--leaf), var(--leaf-300) 55%, var(--honey));
}

.gate-lang {
  position: absolute; top: 14px; right: 14px;
  display: inline-flex; align-items: center; gap: 2px;
  background: var(--cream-deep); border: 1px solid var(--line);
  border-radius: 999px; padding: 2px;
}

.gate-logo { justify-content: center; margin-bottom: 18px; }
.gate-card h2 { font-size: 1.7rem; margin-bottom: 12px; }
.gate-text { color: var(--ink-soft); font-size: 15.5px; margin-bottom: 24px; }

.gate-captcha { display: flex; justify-content: center; min-height: 78px; }

.gate-status { margin-top: 14px; font-size: 14.5px; font-weight: 600; color: var(--leaf-600); min-height: 1.4em; }
.gate-status.err { color: var(--clay); }
.gate-fineprint { margin-top: 12px; font-size: 12.5px; color: var(--muted); }

/* leaving animation once verified */
.gate.gate-leaving { opacity: 0; pointer-events: none; transition: opacity .45s var(--ease); }
.gate.gate-leaving .gate-card { transform: translateY(-10px) scale(.98); transition: transform .45s var(--ease); }

/* the reCAPTCHA iframe is a fixed 304px wide — scale it down on narrow phones */
@media (max-width: 420px) {
  .gate { padding: 16px; }
  .gate-card { padding: 38px 20px 22px; }
  .gate-captcha { transform: scale(.92); transform-origin: center top; }
}
@media (max-width: 350px) {
  .gate-captcha { transform: scale(.8); transform-origin: center top; }
}

/* ---------- reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.cards-3 .reveal:nth-child(2), .process-grid .reveal:nth-child(2) { transition-delay: .08s; }
.cards-3 .reveal:nth-child(3), .process-grid .reveal:nth-child(3) { transition-delay: .16s; }
.process-grid .reveal:nth-child(4) { transition-delay: .24s; }

/* ---------- responsive ---------- */
@media (max-width: 980px) {
  .hero-inner { grid-template-columns: 1fr; gap: 24px; }
  .hero-visual { order: -1; min-height: 280px; }
  .hero-illustration { width: min(80%, 360px); }
  /* keep the decorative blobs inside the visual area so they never
     bleed over the headline text below */
  .blob-1 { width: min(60vw, 280px); height: min(60vw, 280px); top: 4%; left: 12%; }
  .blob-2 { width: min(36vw, 160px); height: min(36vw, 160px); bottom: 2%; right: 12%; }
  .about-inner { grid-template-columns: 1fr; gap: 40px; }
  .about-visual { order: -1; }
  .contact-inner { grid-template-columns: 1fr; gap: 36px; }
  .process-grid { grid-template-columns: repeat(2, 1fr); }
  .why-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 1150px) {
  .header-cta { display: none; }
}

@media (max-width: 980px) {
  .main-nav {
    position: fixed; inset: 76px 0 auto 0;
    flex-direction: column; align-items: stretch; gap: 4px;
    background: var(--cream); border-bottom: 1px solid var(--line);
    padding: 16px 24px 24px; box-shadow: var(--shadow-md);
    transform: translateY(-130%); transition: transform .32s var(--ease);
    max-height: calc(100vh - 76px); overflow-y: auto;
  }
  .main-nav.open { transform: translateY(0); }
  .main-nav a { padding: 13px 14px; font-size: 17px; border-radius: 12px; }
  .nav-toggle { display: block; }
}

@media (max-width: 760px) {
  body { font-size: 16px; }
  .cards-3, .process-grid, .why-grid { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; gap: 32px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
  .section-lead { font-size: 1.05rem; }
}

@media (max-width: 420px) {
  .container { padding: 0 18px; }
  .card, .contact-form { padding: 24px; }
  .hero-cta .btn { width: 100%; }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .reveal { opacity: 1; transform: none; }
}
