/* =========================================================
   ROOT / VARIABLES
========================================================= */

:root {
  --bg-dark: #2a2f30;
  --bg-light: #ffffff;

  --text-dark: #111111;
  --text-light: #ffffff;
  --text-soft: #333333;
  --text-muted: #6A6A6A;

  --line-soft: rgba(0, 0, 0, 0.08);
  --line-mid: rgba(0, 0, 0, 0.12);

  --accent: #5BBED4;

  --font-sans: "Inter", sans-serif;
  --font-serif: "Source Serif 4", serif;

  --container-max: 1180px;
  --container-wide: 1235px;
  --container-pad: clamp(20px, 3vw, 48px);

    /* oldal margó – ez fog skálázódni */
  --container-padding: clamp(20px, 5vw, 80px);
  
  --ease-soft: 220ms ease;
  --ease-mid: 300ms ease;

  --space-hero-y: clamp(24px, 4.5vh, 56px);

   /* =========================================================
     TYPOGRAPHY SYSTEM
  ========================================================= */



  --fs-display: clamp(36px, 6vw, 76px);
  --fs-hero: clamp(36px, 6vw, 70px);
  --fs-title: clamp(28px, 4vw, 56px);
  --fs-minititle: clamp(18px, 1.9vw, 24px);
  --fs-subtitle: clamp(18px, 2vw, 26px);
  --fs-body: clamp(13px, 1.35vw, 16px);
  --fs-ui-title: clamp(12px, 1vw, 16px);
  --fs-lead: clamp(16px, 1.6vw, 20px);

  --lh-display: 0.95;
  --lh-title: 1.02;
  --lh-body: 1.7;
  --lh-ui-title: 1.2;
  --lh-lead: 1.7;

  --ls-display: -0.035em;
  --ls-title: -0.02em;
  --ls-minititle: -0.01em;
  --ls-ui-title: 0.08em;
  --ls-lead: 0.12em;

  /* =========================================================
   SPACING SYSTEM
========================================================= */

  --space-1: clamp(8px, 1vw, 12px);
  --space-2: clamp(12px, 1.4vw, 18px);
  --space-3: clamp(16px, 2vw, 24px);
  --space-4: clamp(24px, 2.8vw, 36px);
  --space-5: clamp(32px, 4vw, 56px);
  --space-6: clamp(48px, 6vw, 80px);
  --space-7: clamp(100px, 10vw, 200px);
}


/* =========================================================
   GLOBAL / TYPOGRAPHY SYSTEM / NAGY CÍMEK
========================================================= */

.hero-text h1,
.intro-title,
.projects-title,
.closing-title,
.project-title {
  font-size: var(--fs-display);
  line-height: var(--lh-display);
  letter-spacing: var(--ls-display);
  font-weight: 800;
  text-wrap: balance;
}

.hero-text .light,
.intro-title .light,
.closing-title .light,
.project-title .light {
  font-weight: 100;
}
  
/* =========================================================
   GLOBAL / TYPOGRAPHY SYSTEM / KIS CÍMEK
========================================================= */

.gate-title,
.service-title {
  font-size: var(--fs-minititle);
  letter-spacing: var(--ls-minititle);
  font-weight: 800;
  text-transform: uppercase;
  text-wrap: balance;
}


/* =========================================================
   GLOBAL / TYPOGRAPHY SYSTEM / TAB
========================================================= */

.stage-header-title {
  font-size: var(--fs-ui-title);
  line-height: var(--lh-ui-title);
  letter-spacing: var(--ls-ui-title);
  font-weight: 800;
  text-transform: uppercase;
  color: var(--text-light);
}

/* =========================================================
   GLOBAL / TYPOGRAPHY SYSTEM / ALCÍM
========================================================= */

.hero-text h2,
.closing-intro,
.project-meta {
  font-size: var(--fs-subtitle);
  line-height: var(--lh-lead);
  letter-spacing: var(--ls-lead);
  font-weight: 300;
  text-transform: lowercase; 
  font-style: italic;
}

/* =========================================================
   GLOBAL / TYPOGRAPHY SYSTEM / LEAD TEXT
========================================================= */

.project-lead {
  font-size: var(--fs-lead);
  line-height: var(--lh-lead);
  letter-spacing: var(--ls-title);
  font-weight: 400;
  color: var(--text-muted);
  text-wrap: balance;
}


/* =========================================================
   GLOBAL / TYPOGRAPHY SYSTEM / BODY TEXT
========================================================= */

.project-description,
.project-summary,
.service-note {
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--text-muted);
  text-wrap: balance;
}

/* =========================================================
   SHARED UI / LINKS
========================================================= */

.projects-link {
  display: inline-block;
  font-size: var(--fs-lead);
  letter-spacing: var(--ls-ui-title);
  color: var(--accent);
  font-style: italic;
  text-decoration: none;
  transition: opacity 200ms ease;
}

.projects-link:hover {
  opacity: 0.7;
}

/* =========================================================
   TARTALOM SZÉLESSÉG
========================================================= */

.closing-content,
.project-title,
.project-lead {
  max-width: 1100px;
}

/* =========================================================
   TARTALOM TÉRKÖZÖK
========================================================= */

.section {
  padding-block: var(--space-6);
}

.section-sm {
  padding-block: var(--space-4);
}

.section-lg {
  padding-block: var(--space-7);
}

.text-stack > * + * {
  margin-top: var(--space-3);
}

.text-stack-sm > * + * {
  margin-top: var(--space-2);
}

.text-stack-lg > * + * {
  margin-top: var(--space-4);
}

.text-stack > h1 + *,
.text-stack > h2 + *,
.text-stack > h3 + * {
  margin-top: var(--space-2);
}

.projects-title,
.project-title {
  margin-top: var(--space-7);
}

.project-meta {
  margin-top: var(--space-1);
}

.project-lead {
  margin-top: var(--space-4);
}

.service-note {
  margin-top: var(--space-4);
}


.projects-title,
.closing-intro {
  padding-top: var(--space-4);
  border-top: 1px solid var(--line-soft);
}

/* =========================================================
   GLOBAL / RESET
========================================================= */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scrollbar-gutter: stable;
}

body {
  font-family: var(--font-sans);
  background: var(--bg-light);
  color: var(--text-dark);
}

body.menu-open {
  overflow: hidden;
}

.container {
  width: min(var(--container-max), 100%);
  margin: 0 auto;
  padding-left: var(--container-pad);
  padding-right: var(--container-pad);
}


/* =========================================================
   GLOBAL / TYPOGRAPHY / SANS
========================================================= */

h1,
h2,
h3,
h4,
h5,
h6,
.intro-title,
.projects-title,
.closing-title,
.closing-intro,
.project-title,
.gate-title,
.stage-header-title,
.gate-meta,
.project-meta,
.footer-copy,
.menu a,
.toggle {
  font-family: var(--font-sans);
}


/* =========================================================
   GLOBAL / TYPOGRAPHY / SERIF
========================================================= */

p,
.project-summary {
  font-family: var(--font-serif);
}

.projects-link {
  font-family: var(--font-serif);
  color: var(--accent);
}




/* =========================================================
   GLOBAL / HEADER
========================================================= */

.project-top {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
}

.project-top-inner,
.hero-top {
  position: relative;
  z-index: 101;
  padding: var(--space-3) 0;

  display: flex;
  align-items: flex-end;   /* EZ a kulcs */
  justify-content: space-between;
}

.project-logo {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}

.project-logo img,
.logo img {
  display: block;
  width: auto;
  max-width: none;
  height: clamp(32px, 5.5vw, 40px);
}

.logo img,
.project-logo img {
  filter: brightness(0);
}

.hero .logo img {
  filter: brightness(0) invert(1);
}

.toggle {
  background: none;
  border: none;
  color: #111;

  font-size: clamp(36px, 5vw, 50px);
  font-weight: 100;
  line-height: 1;

  cursor: pointer;
  padding: 0;

  width: clamp(44px, 6vw, 52px);
  height: clamp(44px, 6vw, 52px);

  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;

  z-index: 50;
}

.toggle:hover {
  opacity: 0.6;
}

/* =========================================================
 PROJECT MENU
========================================================= */

.project-menu {
  display: none;
  margin-top: 0;
}

.project-menu-inner {
  max-width: var(--container-max);
  margin: 0 auto;

  padding-left: var(--container-padding);
  padding-right: var(--container-padding);

  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.project-menu.open {
  position: fixed;
  top: 0;
  left: 0;     /* fontos */
  right: 0;

  width: 100%;
  height: 100vh;

  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-3);

  padding: clamp(96px, 14vh, 140px) var(--space-4) var(--space-4);

  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(8px);
}

.project-menu a {
  position: relative;
  width: fit-content;

  font-family: var(--font-sans);
  font-size: var(--fs-subtitle);
  font-weight: 300;
  line-height: 1.25;
  letter-spacing: 0.02em;

  color: var(--text-dark);
  text-decoration: none;
  text-transform: uppercase;
}

.project-menu a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;

  width: 0;
  height: 1px;

  background: var(--bg-dark);
  transition: width 0.25s ease;
}

.project-menu a:hover::after {
  width: 100%;
}

/* =========================================================
  BACK TO TOP
========================================================= */

.back-to-top {
  position: fixed;
  right: 40px;
  bottom: 40px;
  z-index: 200;

  width: 52px;
  height: 52px;

  display: flex;
  align-items: center;
  justify-content: center;

  font-family: var(--font-sans);
  font-size: 22px;
  line-height: 1;
  text-decoration: none;

  color: #111;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(4px);

  transition: all 200ms ease;

  opacity: 0;
  pointer-events: none;
}

.back-to-top.visible {
  opacity: 1;
  pointer-events: auto;
}

.back-to-top:hover {
  transform: translateY(-2px);
  border-color: rgba(0, 0, 0, 0.22);
  background: #fff;
  color: var(--accent);
}

/* =========================================================
   BACK TO TOP / COMPACT
========================================================= */

@media (max-width: 700px) {

  .back-to-top {
    right: 20px;
    bottom: 20px;

    width: 44px;
    height: 44px;

    font-size: 18px;
  }
}


/* =========================================================
  FOOTER
========================================================= */

.site-footer {
  margin-top: var(--space-6);
  padding-bottom: var(--space-4);
}

.footer-line {
  height: 1px;
  background: var(--line-soft);
  margin-bottom: var(--space-4);
}

.footer-inner {
  display: flex;
  align-items: center;
  gap: 20px;
}

.footer-copy {
  font-size: 14px;
  color: var(--text-muted);
}

@media (max-width: 768px) {
  .hero-text h1,
  .intro-title,
  .projects-title,
  .closing-title,
  .project-title {
    line-height: 1.08;
  }
}


/* =========================================================
   SINGLE IMAGE HELPERS
========================================================= */

.zoom-img {
  transform: scale(1.2);
  transform-origin: center;
}