/* =============================================================
   Ramus Vanduo — tvenkinių konsultacijos
   Earthy olive / green-brown base + a single denim-blue accent.
   Type: Bitter (headings) + Hanken Grotesk (body).
   ============================================================= */

/* ---------- Tokens ---------- */
:root {
  /* Neutrals: earthy olive / green-brown base (hue ~99) */
  --bg:        oklch(0.944 0.023 99);
  --surface:   oklch(0.915 0.027 100);
  --sunken:    oklch(0.886 0.031 102);
  --ink:       oklch(0.277 0.033 74);
  --muted:     oklch(0.455 0.031 82);
  --border:    oklch(0.84 0.028 100);
  --border-strong: oklch(0.755 0.032 100);

  /* The one standout: denim blue */
  --accent:        oklch(0.56 0.12 248);
  --accent-deep:   oklch(0.44 0.105 250);
  --accent-press:  oklch(0.37 0.09 252);
  --accent-wash:   oklch(0.92 0.035 248);
  --on-accent:     oklch(0.985 0.01 100);

  /* Earthy tertiaries (motif / illustration) */
  --clay: oklch(0.58 0.10 52);
  --moss: oklch(0.52 0.09 132);

  /* Type */
  --font-head: "Bitter", Georgia, "Times New Roman", serif;
  --font-body: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;

  /* Fluid type scale (~1.25 ratio) */
  --step--1: clamp(0.875rem, 0.83rem + 0.2vw, 0.95rem);
  --step-0:  clamp(1.0625rem, 1rem + 0.3vw, 1.18rem);
  --step-1:  clamp(1.3rem, 1.18rem + 0.6vw, 1.6rem);
  --step-2:  clamp(1.6rem, 1.38rem + 1.1vw, 2.25rem);
  --step-3:  clamp(2.1rem, 1.7rem + 2vw, 3.25rem);
  --step-4:  clamp(2.6rem, 1.9rem + 3.4vw, 4.5rem);

  /* Rhythm */
  --shell: 76rem;
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --section-y: clamp(4rem, 9vw, 8rem);
  --radius: 14px;
  --radius-sm: 9px;
  --radius-lg: 22px;

  --shadow-sm: 0 1px 2px oklch(0.277 0.033 74 / 0.06), 0 2px 8px oklch(0.277 0.033 74 / 0.05);
  --shadow-md: 0 4px 14px oklch(0.277 0.033 74 / 0.09), 0 10px 30px oklch(0.277 0.033 74 / 0.07);

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1); /* ease-out-quint-ish */
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}
:where(section, header)[id], #top { scroll-margin-top: 5.5rem; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.62;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

h1, h2, h3 {
  font-family: var(--font-head);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-wrap: balance;
}

p { text-wrap: pretty; }

a { color: var(--accent-deep); text-underline-offset: 0.18em; }
a:hover { color: var(--accent-press); }

img, svg, video { display: block; max-width: 100%; }

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

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 100;
  background: var(--ink);
  color: var(--bg);
  padding: 0.6rem 1rem;
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: top 0.2s var(--ease-out);
}
.skip-link:focus { top: 1rem; }

/* ---------- Layout helpers ---------- */
.shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: var(--section-y); position: relative; }

.section__head { max-width: 42rem; margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.section__title { font-size: var(--step-3); }
.section__intro {
  margin-top: 1.1rem;
  color: var(--muted);
  font-size: var(--step-1);
  max-width: 38ch;
  line-height: 1.5;
}

.kicker {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: var(--step--1);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1rem;
}
.kicker--accent { color: var(--accent-deep); }
.kicker--accent::before {
  content: "";
  display: inline-block;
  width: 1.6rem;
  height: 2px;
  background: var(--accent);
  vertical-align: middle;
  margin-right: 0.6rem;
  border-radius: 2px;
}

.accent-word { color: var(--accent-deep); }

/* ---------- Buttons ---------- */
.btn {
  --btn-pad-y: 0.7rem;
  --btn-pad-x: 1.15rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: var(--step-0);
  line-height: 1;
  padding: var(--btn-pad-y) var(--btn-pad-x);
  border-radius: 999px;
  border: 1.5px solid transparent;
  text-decoration: none;
  cursor: pointer;
  min-height: 44px;
  transition: transform 0.18s var(--ease-out),
              background-color 0.18s var(--ease-out),
              border-color 0.18s var(--ease-out),
              box-shadow 0.18s var(--ease-out);
}
.btn--lg { --btn-pad-y: 0.9rem; --btn-pad-x: 1.6rem; }
.btn--block { width: 100%; }

.btn--primary {
  background: var(--accent);
  color: var(--on-accent);
  box-shadow: var(--shadow-sm);
}
.btn--primary:hover { background: var(--accent-deep); color: var(--on-accent); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn--primary:active { background: var(--accent-press); transform: translateY(0); }

.btn--ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--border-strong);
}
.btn--ghost:hover { border-color: var(--accent); color: var(--accent-deep); transform: translateY(-2px); }

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: oklch(0.944 0.023 99 / 0.78);
  backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s var(--ease-out), box-shadow 0.25s var(--ease-out), background-color 0.25s var(--ease-out);
}
.site-header[data-scrolled] {
  border-bottom-color: var(--border);
  box-shadow: 0 1px 0 oklch(0.277 0.033 74 / 0.04), 0 6px 20px oklch(0.277 0.033 74 / 0.06);
}
.nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  min-height: 4.5rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--ink);
  margin-right: auto;
}
.brand__logo {
  height: clamp(1.85rem, 1.5rem + 1.2vw, 2.45rem);
  width: auto;
  display: block;
}

.nav__links { display: flex; align-items: center; gap: 1.75rem; }
.nav__links a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.98rem;
  position: relative;
  padding-block: 0.4rem;
}
.nav__links a::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 100%;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s var(--ease-out);
}
.nav__links a:hover { color: var(--accent-deep); }
.nav__links a:hover::after,
.nav__links a[data-active]::after { transform: scaleX(1); }

.nav__cta { white-space: nowrap; }

.nav__toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px; height: 44px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.nav__toggle span {
  display: block;
  width: 20px; height: 2px;
  margin-inline: auto;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.25s var(--ease-out), opacity 0.2s var(--ease-out);
}
.nav__toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav__toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-nav[hidden] { display: none; }
.mobile-nav {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 0.75rem var(--gutter) 1.5rem;
  border-top: 1px solid var(--border);
  background: var(--bg);
}
.mobile-nav a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 500;
  padding: 0.85rem 0.25rem;
  border-bottom: 1px solid var(--border);
}
.mobile-nav a:last-child { border-bottom: none; margin-top: 0.75rem; }

/* ---------- Contour motif (signature device) ---------- */
.contours {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
/* Hero rings: earthy MOSS GREEN */
.contours::before {
  content: "";
  position: absolute;
  width: min(120vw, 1100px);
  aspect-ratio: 1;
  border-radius: 46% 54% 58% 42% / 52% 44% 56% 48%;
  background:
    repeating-radial-gradient(
      circle at 50% 50%,
      transparent 0 26px,
      oklch(0.52 0.09 132 / 0.16) 26px 27.5px
    );
  -webkit-mask-image: radial-gradient(circle at 50% 50%, #000 60%, transparent 78%);
          mask-image: radial-gradient(circle at 50% 50%, #000 60%, transparent 78%);
}
.contours--hero::before {
  top: -28%;
  right: -18%;
  transform: rotate(-8deg);
}
/* About rings: earthy CLAY BROWN */
.contours--about::before {
  bottom: -45%;
  left: -30%;
  width: min(110vw, 820px);
  background:
    repeating-radial-gradient(
      circle at 50% 50%,
      transparent 0 24px,
      oklch(0.58 0.10 52 / 0.16) 24px 25.5px
    );
  transform: rotate(6deg);
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding-block: clamp(3rem, 7vw, 6.5rem) var(--section-y);
}
.hero__inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}
.hero__title {
  font-size: var(--step-4);
  margin-block: 0.4rem 1.4rem;
}
.hero__lead {
  font-size: var(--step-1);
  color: var(--muted);
  max-width: 34ch;
  line-height: 1.5;
}
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 2rem;
}
.hero__trust {
  list-style: none;
  padding: 0;
  margin-top: 2.75rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.75rem;
  font-size: var(--step--1);
  color: var(--muted);
}
.hero__trust li { position: relative; padding-left: 1.1rem; }
.hero__trust li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.55em;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent);
}
.hero__trust strong { color: var(--ink); font-weight: 600; }

/* ---------- Media slots (image placeholders) ---------- */
.media-slot { position: relative; }
.media-slot__placeholder {
  position: relative;
  border-radius: var(--radius-lg);
  background:
    repeating-radial-gradient(
      circle at 38% 32%,
      transparent 0 20px,
      oklch(0.56 0.12 248 / 0.18) 20px 21.5px
    ),
    linear-gradient(150deg, var(--accent-wash), var(--surface));
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  display: grid;
  place-items: center;
  text-align: center;
  overflow: hidden;
}
.hero__media .media-slot__placeholder { aspect-ratio: 4 / 5; }
.media-slot__label {
  font-weight: 600;
  color: var(--accent-deep);
  background: oklch(0.944 0.023 99 / 0.82);
  padding: 0.55rem 1rem;
  border-radius: 999px;
  font-size: var(--step--1);
  max-width: 80%;
}
.media-slot__caption {
  margin-top: 0.75rem;
  font-size: var(--step--1);
  color: var(--muted);
  font-style: italic;
}
.media-slot--portrait .media-slot__placeholder { aspect-ratio: 3 / 4; }

/* When a real <img>/<video> is dropped in, hide the placeholder */
.media-slot:has(img, video) .media-slot__placeholder,
.media-slot:has(img, video) .media-slot__caption { display: none; }
.media-slot img, .media-slot video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

/* ---------- Services / lifecycle ---------- */
.services { background: var(--sunken); }
.lifecycle {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0;
  counter-reset: step;
  max-width: 52rem;
}
.lifecycle__step {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: clamp(1.25rem, 4vw, 2.75rem);
  padding-block: clamp(1.6rem, 3.5vw, 2.4rem);
  border-top: 1px solid var(--border-strong);
  align-items: start;
}
.lifecycle__step:last-child { border-bottom: 1px solid var(--border-strong); }
.lifecycle__num {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: var(--step-2);
  color: var(--accent);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.lifecycle__body h3 { font-size: var(--step-1); margin-bottom: 0.55rem; }
.lifecycle__body p { color: var(--muted); max-width: 56ch; line-height: 1.55; }
.lifecycle__step:hover .lifecycle__num { color: var(--accent-deep); }

/* ---------- About ---------- */
.about { position: relative; overflow: hidden; }
.about__inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: clamp(2rem, 6vw, 5rem);
  align-items: center;
}
.about__copy p { color: var(--muted); margin-top: 1.1rem; max-width: 58ch; }
.about__copy p strong { color: var(--ink); }
.about__copy .section__title { margin-bottom: 0.4rem; }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-top: 1.5rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--accent-deep);
}
.link-arrow span { transition: transform 0.2s var(--ease-out); }
.link-arrow:hover span { transform: translateX(4px); }
.link-arrow--sm { font-size: var(--step--1); margin-top: 0.9rem; }

/* ---------- Guides ---------- */
.guide-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: clamp(1.25rem, 3vw, 2rem);
}
.guide {
  display: flex;
  gap: 1.1rem;
  padding: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: transform 0.22s var(--ease-out), box-shadow 0.22s var(--ease-out), border-color 0.22s var(--ease-out);
}
.guide:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-strong);
}
.guide__thumb {
  flex: none;
  width: 48px; height: 48px;
  border-radius: 12px;
  background:
    repeating-radial-gradient(
      circle at 50% 50%,
      transparent 0 5px,
      oklch(0.56 0.12 248 / 0.5) 5px 6px
    ),
    var(--accent-wash);
  border: 1px solid var(--border);
}
.guide__body h3 { font-size: var(--step-1); margin-bottom: 0.4rem; line-height: 1.2; }
.guide__body p { color: var(--muted); font-size: 0.98rem; line-height: 1.5; }

/* ---------- Contact ---------- */
.contact { background: var(--sunken); }
.contact__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
}
.contact__lead { color: var(--muted); margin-top: 1.1rem; max-width: 42ch; font-size: var(--step-1); line-height: 1.5; }
.contact__direct {
  list-style: none;
  padding: 0;
  margin-top: 2.25rem;
  display: grid;
  gap: 1rem;
}
.contact__direct li { display: flex; align-items: center; gap: 0.85rem; }
.contact__direct a { color: var(--ink); text-decoration: none; font-weight: 500; }
.contact__direct a:hover { color: var(--accent-deep); }
.contact__icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--accent-wash);
  color: var(--accent-deep);
  font-family: var(--font-head);
  font-weight: 700;
}

.contact__form {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: clamp(1.5rem, 4vw, 2.25rem);
  box-shadow: var(--shadow-sm);
  display: grid;
  gap: 1.1rem;
}
.field { display: grid; gap: 0.4rem; }
.field label { font-weight: 600; font-size: 0.95rem; }
.field input, .field textarea {
  font: inherit;
  color: var(--ink);
  background: var(--bg);
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 0.75rem 0.9rem;
  width: 100%;
  transition: border-color 0.18s var(--ease-out), box-shadow 0.18s var(--ease-out);
}
.field textarea { resize: vertical; min-height: 7rem; }
.field input:focus, .field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px oklch(0.56 0.12 248 / 0.25);
}
.field input::placeholder, .field textarea::placeholder { color: oklch(0.60 0.022 90); }
.field [aria-invalid="true"] { border-color: var(--clay); }

.form-note { font-size: var(--step--1); min-height: 1.2em; }
.form-note[data-state="ok"] { color: var(--moss); font-weight: 600; }
.form-note[data-state="err"] { color: var(--clay); font-weight: 600; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--ink);
  color: oklch(0.92 0.02 98);
  padding-block: clamp(2.5rem, 5vw, 3.5rem);
}
.footer__inner { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 1rem; }
.footer__brand { font-family: var(--font-head); font-weight: 700; font-size: 1.2rem; color: var(--bg); }
.footer__fine { font-size: var(--step--1); color: oklch(0.78 0.02 98); }

/* ---------- Scroll reveal ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
  will-change: opacity, transform;
}
[data-reveal].is-visible { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero__inner { grid-template-columns: 1fr; }
  .hero__media { order: -1; max-width: 26rem; }
  .about__inner { grid-template-columns: 1fr; }
  .about__media { max-width: 22rem; }
  .contact__inner { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .nav__links, .nav__cta { display: none; }
  .nav__toggle { display: flex; }
}

@media (min-width: 761px) {
  .mobile-nav { display: none !important; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
  [data-reveal] { opacity: 1; transform: none; }
}
