/* ═══════════════════════════════════════════════════════════════
   ErősségMűhely — Kóródi Anikó Pszichológus
   Custom styles · Tender Roots design philosophy
   UI/UX Pro Max: Neumorphism · Sage/Lavender/Amber · Playfair+Figtree
═══════════════════════════════════════════════════════════════ */

/* ── Base resets & CSS custom properties ─────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

:root {
  --cream:       #FAF7F0;
  --cream-soft:  #F4EFE5;
  --cream-dark:  #EDE6D6;
  --sage:        #7FAE82;
  --sage-dark:   #5A8A5E;
  --sage-deep:   #3E6B42;
  --sage-pale:   #D2E4CF;
  --lav:         #9B8EC4;
  --lav-dark:    #7A6BA8;
  --lav-pale:    #E0D8EE;
  --amber:       #C8845A;
  --amber-dark:  #A66540;
  --amber-pale:  #EDD9C2;
  --ink:         #2C3B2E;
  --ink-mid:     #4A5E4C;
  --ink-soft:    #7A8E7C;
  --ink-light:   #B0C4B2;

  --shadow-neu:        -6px -6px 16px rgba(255,255,255,0.85), 6px 6px 16px rgba(90,110,90,0.18);
  --shadow-neu-sm:     -3px -3px 8px rgba(255,255,255,0.85), 3px 3px 8px rgba(90,110,90,0.15);
  --shadow-neu-lg:     -10px -10px 28px rgba(255,255,255,0.9), 10px 10px 28px rgba(90,110,90,0.20);
  --shadow-neu-inset:  inset -3px -3px 8px rgba(255,255,255,0.75), inset 3px 3px 8px rgba(90,110,90,0.15);
  --shadow-card-hover: -8px -8px 20px rgba(255,255,255,0.9), 8px 8px 20px rgba(90,110,90,0.22);

  --transition-fast:   150ms ease-out;
  --transition-base:   250ms ease-out;
  --transition-slow:   400ms ease-out;

  --radius-sm:   0.75rem;   /* 12px */
  --radius-md:   1rem;      /* 16px */
  --radius-lg:   1.25rem;   /* 20px */
  --radius-xl:   1.5rem;    /* 24px */
  --radius-2xl:  2rem;      /* 32px */
}

/* ── Scrollbar styling ───────────────────────────────────────── */
html { scroll-behavior: smooth; }
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--cream-soft); }
::-webkit-scrollbar-thumb { background: var(--sage-pale); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--sage); }

/* ── Selection ───────────────────────────────────────────────── */
::selection { background: var(--sage-pale); color: var(--sage-deep); }

/* ── Focus visible accessibility ─────────────────────────────── */
:focus-visible {
  outline: 2px solid var(--sage);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

/* ── Reduced motion support ──────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
}

/* ══════════════════════════════════════════════════════════════
   BUTTONS
══════════════════════════════════════════════════════════════ */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background-color: var(--sage);
  color: #fff;
  font-family: 'Figtree', sans-serif;
  font-size: 0.9375rem;
  font-weight: 600;
  padding: 0.75rem 1.75rem;
  border-radius: var(--radius-xl);
  box-shadow: -3px -3px 8px rgba(255,255,255,0.3), 3px 3px 10px rgba(60,100,65,0.35);
  transition: background-color var(--transition-fast),
              box-shadow var(--transition-fast),
              transform var(--transition-fast);
  text-decoration: none;
  border: none;
  cursor: pointer;
}
.btn-primary:hover {
  background-color: var(--sage-dark);
  box-shadow: -4px -4px 12px rgba(255,255,255,0.25), 4px 4px 14px rgba(60,100,65,0.40);
  transform: translateY(-1px);
}
.btn-primary:active {
  transform: translateY(0);
  box-shadow: inset 2px 2px 6px rgba(0,0,0,0.15);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background-color: var(--cream-soft);
  color: var(--ink-mid);
  font-family: 'Figtree', sans-serif;
  font-size: 0.9375rem;
  font-weight: 600;
  padding: 0.75rem 1.75rem;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-neu);
  transition: box-shadow var(--transition-fast),
              color var(--transition-fast),
              transform var(--transition-fast);
  text-decoration: none;
  border: none;
  cursor: pointer;
}
.btn-secondary:hover {
  box-shadow: var(--shadow-card-hover);
  color: var(--sage-dark);
  transform: translateY(-1px);
}
.btn-secondary:active {
  box-shadow: var(--shadow-neu-inset);
  transform: translateY(0);
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: transparent;
  color: var(--sage-dark);
  font-family: 'Figtree', sans-serif;
  font-size: 0.9375rem;
  font-weight: 600;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-xl);
  border: 1.5px solid var(--sage-pale);
  transition: background-color var(--transition-fast),
              border-color var(--transition-fast),
              transform var(--transition-fast);
  text-decoration: none;
  cursor: pointer;
}
.btn-ghost:hover {
  background-color: var(--sage-pale);
  border-color: var(--sage);
  transform: translateY(-1px);
}

/* ══════════════════════════════════════════════════════════════
   FORM INPUTS — neumorphic
══════════════════════════════════════════════════════════════ */
.form-input {
  background: var(--cream);
  border: none;
  outline: none;
  box-shadow: var(--shadow-neu-inset);
  transition: box-shadow var(--transition-base);
  color: var(--ink);
  font-family: 'Figtree', sans-serif;
}
.form-input::placeholder { color: var(--ink-light); }
.form-input:focus {
  box-shadow:
    inset -2px -2px 6px rgba(255,255,255,0.85),
    inset 2px 2px 6px rgba(90,110,90,0.12),
    0 0 0 2px rgba(127,174,130,0.25);
}
.form-input:-webkit-autofill {
  -webkit-box-shadow: 0 0 0px 1000px var(--cream) inset;
  -webkit-text-fill-color: var(--ink);
}

/* ── GDPR consent checkbox — neumorphic ──────────────────────── */
.consent-check {
  appearance: none;
  -webkit-appearance: none;
  flex-shrink: 0;
  position: relative;
  width: 1.25rem;
  height: 1.25rem;
  margin: 0.15rem 0 0;
  border: none;
  border-radius: 0.5rem;
  background: var(--cream);
  box-shadow: var(--shadow-neu-inset);
  cursor: pointer;
  transition: background-color var(--transition-fast),
              box-shadow var(--transition-fast);
}
.consent-check:hover {
  box-shadow: inset -2px -2px 6px rgba(255,255,255,0.8),
              inset 2px 2px 6px rgba(90,110,90,0.20);
}
.consent-check:checked {
  background: var(--sage);
  box-shadow: -2px -2px 6px rgba(255,255,255,0.6),
              2px 2px 8px rgba(90,110,90,0.28);
}
/* Checkmark */
.consent-check:checked::after {
  content: '';
  position: absolute;
  left: 0.42rem;
  top: 0.18rem;
  width: 0.3rem;
  height: 0.6rem;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.consent-check.error {
  box-shadow: var(--shadow-neu-inset),
              0 0 0 2px rgba(200,132,90,0.45);
}

/* ══════════════════════════════════════════════════════════════
   HERO SECTION
══════════════════════════════════════════════════════════════ */

/* Organic blob shapes */
.shape-blob {
  position: absolute;
  border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
  opacity: 0.22;
  animation: blob-drift 18s ease-in-out infinite;
}
.shape-blob-1 {
  width: 520px; height: 420px;
  background: var(--sage-pale);
  top: -80px; left: -120px;
  animation-duration: 22s;
}
.shape-blob-2 {
  width: 440px; height: 360px;
  background: var(--lav-pale);
  top: 60px; right: -80px;
  border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
  animation-duration: 18s;
  animation-delay: -6s;
}
.shape-blob-3 {
  width: 320px; height: 280px;
  background: var(--amber-pale);
  bottom: 40px; left: 38%;
  border-radius: 50% 50% 40% 60% / 30% 60% 40% 70%;
  animation-duration: 26s;
  animation-delay: -12s;
}

@keyframes blob-drift {
  0%, 100% {
    border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
    transform: translate(0, 0) scale(1);
  }
  33% {
    border-radius: 70% 30% 50% 50% / 30% 30% 70% 70%;
    transform: translate(12px, -18px) scale(1.03);
  }
  66% {
    border-radius: 30% 70% 40% 60% / 60% 40% 60% 40%;
    transform: translate(-8px, 12px) scale(0.98);
  }
}

/* Scroll dot animation */
.scroll-dot {
  animation: scroll-bounce 2s ease-in-out infinite;
}
@keyframes scroll-bounce {
  0%, 100% { transform: translateY(0); opacity: 1; }
  50%        { transform: translateY(6px); opacity: 0.4; }
}

/* Hero card floating animation */
.hero-card {
  animation: gentle-float 6s ease-in-out infinite;
}
@keyframes gentle-float {
  0%, 100% { transform: translateY(0px); }
  50%        { transform: translateY(-8px); }
}

/* Qualification badge stagger */
.qual-badge {
  animation: fade-up 0.5s ease-out both;
}
.qual-badge:nth-child(1) { animation-delay: 0.6s; }
.qual-badge:nth-child(2) { animation-delay: 0.75s; }
.qual-badge:nth-child(3) { animation-delay: 0.9s; }

/* ══════════════════════════════════════════════════════════════
   FADE-IN-UP INTERSECTION OBSERVER
══════════════════════════════════════════════════════════════ */
.fade-in-up {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity var(--transition-slow), transform var(--transition-slow);
}
.fade-in-up.visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes fade-up {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ══════════════════════════════════════════════════════════════
   CARDS — neumorphic hover states
══════════════════════════════════════════════════════════════ */
.area-card,
.service-card,
.article-card {
  transform: translateY(0);
  transition:
    box-shadow 250ms ease-out,
    transform 250ms ease-out;
}
.area-card:hover,
.service-card:hover,
.article-card:hover {
  transform: translateY(-4px);
}

/* ══════════════════════════════════════════════════════════════
   NAVBAR — scroll-aware state
══════════════════════════════════════════════════════════════ */
#navbar.scrolled nav {
  background: rgba(250, 247, 240, 0.97);
  box-shadow: -4px -4px 12px rgba(255,255,255,0.9), 4px 4px 14px rgba(90,110,90,0.20);
}

/* Active nav link */
.nav-link.active {
  color: var(--sage-dark);
  background: rgba(210, 228, 207, 0.5);
}

/* ══════════════════════════════════════════════════════════════
   PRICING ROW HOVER
══════════════════════════════════════════════════════════════ */
.pricing-row {
  transition: background-color var(--transition-fast);
}

/* ══════════════════════════════════════════════════════════════
   CONTACT METHODS
══════════════════════════════════════════════════════════════ */
.contact-method {
  text-decoration: none;
  transition: box-shadow var(--transition-base), transform var(--transition-base);
}
.contact-method:hover {
  transform: translateX(4px);
}

/* ══════════════════════════════════════════════════════════════
   ABOUT PORTRAIT
══════════════════════════════════════════════════════════════ */
.about-portrait-wrap::before {
  content: '';
  position: absolute;
  top: 24px; left: 24px;
  right: -24px; bottom: -24px;
  background: var(--sage-pale);
  border-radius: 1.5rem;
  z-index: -1;
  opacity: 0.4;
}
.about-portrait-wrap { position: relative; }

/* ══════════════════════════════════════════════════════════════
   MOBILE RESPONSIVE TWEAKS
══════════════════════════════════════════════════════════════ */
@media (max-width: 640px) {
  .hero-text h1 { font-size: 2.75rem; line-height: 1.1; }
  .shape-blob-1 { width: 300px; height: 240px; }
  .shape-blob-2 { width: 260px; height: 210px; }
  .shape-blob-3 { display: none; }
}

/* ══════════════════════════════════════════════════════════════
   UTILITY: hide scrollbar, keep scroll
══════════════════════════════════════════════════════════════ */
.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }

/* ══════════════════════════════════════════════════════════════
   RITÓK NÓRA DECORATIVE OBJECTS — animated, transparent
══════════════════════════════════════════════════════════════ */
/* Per-element opacity lives in --ritok-o (set inline in the markup) so the
   fade-in can end ON that value. Animating opacity to a literal 1 here would
   override the inline setting and render every decoration at full strength. */
.ritok-obj {
  position: absolute;
  pointer-events: none;
  user-select: none;
  opacity: var(--ritok-o, 0.3);
  --parallax-y: 0px;          /* written by the scroll engine in script.js */
  will-change: transform, opacity;
}

/* Every movement keyframe carries --parallax-y so the scroll offset and the
   idle drift compose instead of fighting over `transform`. */

/* Float up-down, very slow */
@keyframes ritok-float {
  0%, 100% { transform: translateY(var(--parallax-y)) rotate(0deg); }
  30%      { transform: translateY(var(--parallax-y)) translateY(-14px) rotate(1.2deg); }
  65%      { transform: translateY(var(--parallax-y)) translateY(-7px) rotate(-0.6deg); }
}

/* Gentle horizontal sway */
@keyframes ritok-sway {
  0%, 100% { transform: translateY(var(--parallax-y)) rotate(0deg) scale(1); }
  40%      { transform: translateY(var(--parallax-y)) translateX(10px) rotate(2deg) scale(1.01); }
  75%      { transform: translateY(var(--parallax-y)) translateX(-6px) rotate(-1deg) scale(0.99); }
}

/* Slow drift diagonal */
@keyframes ritok-drift {
  0%, 100% { transform: translateY(var(--parallax-y)) rotate(0deg); }
  33%      { transform: translateY(var(--parallax-y)) translate(8px, -10px) rotate(1.5deg); }
  66%      { transform: translateY(var(--parallax-y)) translate(-5px, -6px) rotate(-1deg); }
}

/* Feather spin-float */
@keyframes ritok-feather {
  0%, 100% { transform: translateY(var(--parallax-y)) rotate(-4deg); }
  50%      { transform: translateY(var(--parallax-y)) translateY(-12px) rotate(4deg); }
}

/* Fade-in on load — opacity only, so it never clobbers the transform above */
@keyframes ritok-appear {
  from { opacity: 0; }
  to   { opacity: var(--ritok-o, 0.3); }
}

/* Animation class assignments */
.ritok-anim-float   { animation: ritok-float   12s ease-in-out infinite, ritok-appear 1.5s ease-out both; }
.ritok-anim-sway    { animation: ritok-sway    10s ease-in-out infinite, ritok-appear 1.8s ease-out both; }
.ritok-anim-drift   { animation: ritok-drift   16s ease-in-out infinite, ritok-appear 2s   ease-out both; }
.ritok-anim-feather { animation: ritok-feather  9s ease-in-out infinite, ritok-appear 2.2s ease-out both; }

/* ── Scroll parallax ─────────────────────────────────────────────
   Elements opt in with data-parallax="<speed>"; the engine writes
   --parallax-y. Anything that is not a .ritok-obj (which consumes the
   value inside its keyframes) applies it with a plain transform. */
[data-parallax] {
  --parallax-y: 0px;
}
[data-parallax]:not(.ritok-obj) {
  transform: translate3d(0, var(--parallax-y), 0);
  will-change: transform;
}

/* A clipped frame whose image is taller than the frame, so it has room
   to drift without exposing an edge. */
.parallax-frame { overflow: hidden; }
.parallax-frame > img {
  display: block;
  width: 100%;
  height: 128%;          /* 14% of slack above and below the frame */
  object-fit: cover;
  position: relative;
  top: -14%;
}

/* Respect prefers-reduced-motion — no drift, no parallax, just the fade-in */
@media (prefers-reduced-motion: reduce) {
  .ritok-obj { animation: ritok-appear 0.8s ease-out both !important; }
  [data-parallax]:not(.ritok-obj) { transform: none !important; }
  .parallax-frame > img { height: 100%; top: 0; }
}

/* ══════════════════════════════════════════════════════════════
   PRINT STYLES
══════════════════════════════════════════════════════════════ */
@media print {
  #navbar, .shape-blob, .hero-card, .scroll-dot,
  #contact-form button, footer { display: none !important; }
  body { font-size: 12pt; color: #000; background: #fff; }
  a { color: #000; text-decoration: none; }
}
