/* ───────────────────────────────────────────────
   Ágnes Gróf — Portfólió · custom styles
   Tokens: cream #F8F6F1 · paper #F2EFE7 · ink #0B0B0B
           vermillion #D63F1E · muted #6B6B66 · rule #E4E0D6
   Fonts:  display "Instrument Serif" · sans "Fira Sans" · mono "Geist Mono"
   ─────────────────────────────────────────────── */

html {
  background-color: #F8F6F1;
  color: #0B0B0B;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "tnum";
  scroll-behavior: smooth;
  /* A görgetősáv helyét minden oldalon fenntartjuk, így a tartalom
     szélessége (és vele a fejléc/menü) oldalanként nem ugrál. */
  scrollbar-gutter: stable;
  overflow-x: hidden;
  /* A böngésző automatikus szövegnagyítását kikapcsoljuk — ez okozta,
     hogy ugyanaz a felső menü/név oldalanként más méretben jelent meg. */
  -webkit-text-size-adjust: 100%;
  -moz-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  font-family: "Fira Sans", ui-sans-serif, system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
}

::selection {
  background-color: #0B0B0B;
  color: #F8F6F1;
}

/* Subtle grain overlay */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 100;
  opacity: 0.05;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

/* ─── Component classes ─── */

.label {
  font-family: "Geist Mono", ui-monospace, SFMono-Regular, monospace;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: #6B6B66;
}

.nav-link {
  position: relative;
  font-family: "Geist Mono", ui-monospace, SFMono-Regular, monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: rgb(11 11 11 / 0.55);
  transition: color 300ms cubic-bezier(0.4, 0, 0.2, 1);
}
.nav-link:hover { color: #0B0B0B; }
.nav-link.is-active { color: #0B0B0B; }
.nav-link.is-active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -8px;
  height: 1px;
  background-color: #0B0B0B;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  background-color: #0B0B0B;
  color: #F8F6F1;
  padding: 0.75rem 1.5rem;
  font-family: "Geist Mono", ui-monospace, SFMono-Regular, monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.24em;
  transition: background-color 500ms cubic-bezier(0.16, 1, 0.3, 1),
              color 500ms cubic-bezier(0.16, 1, 0.3, 1);
}
.btn-primary:hover { background-color: #D63F1E; }

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1.5rem;
  font-family: "Geist Mono", ui-monospace, SFMono-Regular, monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.24em;
  border: 1px solid rgb(11 11 11 / 0.3);
  color: #0B0B0B;
  background-color: transparent;
  transition: all 500ms cubic-bezier(0.16, 1, 0.3, 1);
}
.btn-ghost:hover {
  border-color: #0B0B0B;
  background-color: #0B0B0B;
  color: #F8F6F1;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: "Geist Mono", ui-monospace, SFMono-Regular, monospace;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.24em;
  color: #6B6B66;
  border: 1px solid #E4E0D6;
  border-radius: 9999px;
  padding: 0.25rem 0.75rem;
}

.rule {
  height: 1px;
  width: 100%;
  background-color: #E4E0D6;
}

/* ─── Nyelvváltó (HU | EN) ─── */
.lang-switch {
  display: inline-flex;
  align-items: baseline;
  gap: 0.4rem;
  font-family: "Geist Mono", ui-monospace, SFMono-Regular, monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
}
.lang-switch .cur { color: #0B0B0B; }
.lang-switch .sep { color: #6B6B66; }
.lang-switch a { color: rgb(11 11 11 / 0.55); transition: color 300ms cubic-bezier(0.4, 0, 0.2, 1); }
.lang-switch a:hover { color: #0B0B0B; }

/* ─── Kapcsolati form mezők ─── */
.form-field {
  width: 100%;
  background-color: transparent;
  border: 0;
  border-bottom: 1px solid #E4E0D6;
  border-radius: 0;
  padding: 0.6rem 0;
  font-family: "Fira Sans", ui-sans-serif, system-ui, sans-serif;
  font-size: 1.05rem;
  line-height: 1.5;
  color: #0B0B0B;
  transition: border-color 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  -webkit-appearance: none;
  appearance: none;
}
.form-field::placeholder { color: #6B6B66; opacity: 0.55; }
.form-field:focus { outline: none; border-bottom-color: #D63F1E; }
textarea.form-field { min-height: 7rem; }

.index-num {
  font-family: "Geist Mono", ui-monospace, SFMono-Regular, monospace;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.24em;
  color: #6B6B66;
  font-variant-numeric: tabular-nums;
}

.link-underline {
  position: relative;
  display: inline-block;
}
.link-underline::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.55s cubic-bezier(0.16, 1, 0.3, 1);
}
.link-underline:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

/* ─── Animations ─── */
@keyframes fade-up {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
.fade-up { animation: fade-up 1s cubic-bezier(0.16, 1, 0.3, 1) both; }

@keyframes reveal {
  /* A negatív vízszintes/függőleges insetek teret hagynak az ékezeteknek és
     az alányúló betűknek (g, j, p), így a főcímek nem vágódnak le. */
  from { clip-path: inset(-0.15em -0.06em 100% -0.06em); }
  to   { clip-path: inset(-0.15em -0.06em -0.28em -0.06em); }
}
.reveal { animation: reveal 1.1s cubic-bezier(0.7, 0, 0.2, 1) both; }

@keyframes blink {
  0%, 49%   { opacity: 1; }
  50%, 100% { opacity: 0.2; }
}
.blink { animation: blink 1.4s ease-in-out infinite; }

.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.25s; }
.delay-3 { animation-delay: 0.4s; }
.delay-4 { animation-delay: 0.55s; }
.delay-5 { animation-delay: 0.7s; }
.delay-6 { animation-delay: 0.85s; }

/* Hero ink-brush watermark
   — Narrow bottom-edge fade (only the very edge blends, drawings stay opaque)
   — Radial cut-out at bottom-center erases the half-circle/blob entirely */
.hero-watermark {
  -webkit-mask-image:
    linear-gradient(to bottom, #000 0%, #000 88%, transparent 100%),
    radial-gradient(ellipse 24% 30% at 50% 100%, transparent 0%, transparent 55%, #000 100%);
  -webkit-mask-composite: source-in;
  mask-image:
    linear-gradient(to bottom, #000 0%, #000 88%, transparent 100%),
    radial-gradient(ellipse 24% 30% at 50% 100%, transparent 0%, transparent 55%, #000 100%);
  mask-composite: intersect;
}

/* ─── Süti-beleegyezés sáv (szerény, az oldalba illeszkedő) ─── */
.cookie-bar {
  position: fixed;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  z-index: 90;
  margin: 0 auto;
  max-width: 34rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  background-color: #F8F6F1;
  border: 1px solid #E4E0D6;
  box-shadow: 0 8px 28px rgb(11 11 11 / 0.08);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.cookie-bar.is-visible { opacity: 1; transform: translateY(0); }

.cookie-text {
  font-size: 12.5px;
  line-height: 1.5;
  color: #6B6B66;
}
.cookie-link {
  color: #0B0B0B;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.cookie-link:hover { color: #D63F1E; }

.cookie-actions {
  display: flex;
  gap: 0.5rem;
  flex-shrink: 0;
}

.cookie-btn {
  cursor: pointer;
  font-family: "Geist Mono", ui-monospace, SFMono-Regular, monospace;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  padding: 0.5rem 0.85rem;
  border: 1px solid rgb(11 11 11 / 0.25);
  background-color: transparent;
  color: #0B0B0B;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.cookie-btn:hover { border-color: #0B0B0B; }
.cookie-btn--accept {
  background-color: #0B0B0B;
  border-color: #0B0B0B;
  color: #F8F6F1;
}
.cookie-btn--accept:hover { background-color: #D63F1E; border-color: #D63F1E; }

@media (min-width: 640px) {
  .cookie-bar {
    left: auto;
    right: 1.25rem;
    bottom: 1.25rem;
    margin: 0;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem;
  }
}

/* Project card hover effects */
.project-card .project-cover {
  transition: transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}
.project-card:hover .project-cover { transform: scale(1.04); }

.project-card .project-arrow {
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.project-card:hover .project-arrow { transform: translate(4px, -4px); }
