/* base.css – fonts, reset, fluid scaling and the few hand-written helpers */

/* PP Neue Montreal: the family used in the Figma file (licensed – place the files in assets/fonts/) */
@font-face {
  font-family: "PP Neue Montreal";
  src: url("../assets/fonts/PPNeueMontreal-Book.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "PP Neue Montreal";
  src: url("../assets/fonts/PPNeueMontreal-Medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "PP Neue Montreal";
  src: url("../assets/fonts/PPNeueMontreal-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
/* Fallback: Neue Montreal 1.0 (different glyph widths – only used until the PP files are in place) */
@font-face {
  font-family: "Neue Montreal";
  src: url("../assets/fonts/NeueMontreal-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  size-adjust: 94.33%; /* PP Book is on average 5.67% narrower than Neue Montreal Regular */
}
@font-face {
  font-family: "Neue Montreal";
  src: url("../assets/fonts/NeueMontreal-Medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Neue Montreal";
  src: url("../assets/fonts/NeueMontreal-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

/* Fluid scale: every size is in rem (Figma px ÷ 16).
   ≥1920 px: 1:1 with the desktop frames · 768–1919 px: desktop layout scaled proportionally
   <768 px: the 402 px mobile frames scaled proportionally */
html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}
@media (min-width: 768px) and (max-width: 1919.98px) {
  html {
    font-size: calc(100vw / 120);
  }
}
@media (max-width: 767.98px) {
  html {
    font-size: calc(100vw / 25.125);
  }
}
html.only-d {
  font-size: min(16px, calc(100vw / 120));
}
@media (min-width: 768px) {
  html.only-m {
    font-size: 16px;
  }
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-weight: var(--fw-book);
  color: var(--color-black);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
h1,
h2,
h3,
h4,
h5,
h6,
p,
ul,
ol,
figure {
  margin: 0;
  padding: 0;
  font-size: inherit;
  font-weight: inherit;
}
a {
  color: inherit;
  text-decoration: none;
}
img,
svg {
  display: block;
  max-width: none;
  flex: none;
}
button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}
ul.list,
ol.list {
  padding-left: 1.5em;
}
ul.list {
  list-style: disc;
}
.ilink {
  display: block;
}
:focus-visible {
  outline: 2px solid var(--color-teal);
  outline-offset: 2px;
}

/* Desktop and mobile frames are separate layouts in the Figma file */
.page {
  overflow: clip;
}
.page.page--m {
  display: none;
}
@media (max-width: 767.98px) {
  .page.page--d {
    display: none;
  }
  .page.page--m {
    display: flex;
  }
}
html.only-d .page.page--d,
html.only-m .page.page--m {
  display: flex;
}

/* Form fields – values from the Név / Mail / Telefonszám / Cégnév / Üzenet components
   default: #F9F9F9 fill, 1px #C5C5C5 inside stroke, radius 5 · focus ("Tipe" variant): 2px teal stroke + label chip */
.field {
  position: relative;
  display: block;
  background-color: var(--color-gray-4);
  border-radius: var(--radius-xs);
  box-shadow: inset 0 0 0 1px var(--color-gray-1);
  transition: box-shadow 0.1s ease-out;
  cursor: text;
}
.field:hover {
  box-shadow: inset 0 0 0 1px var(--color-black);
}
.field:focus-within {
  box-shadow: inset 0 0 0 2px var(--color-teal);
}
.field__input {
  display: block;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0 1.25rem;
  border: 0;
  outline: 0;
  background: none;
  border-radius: inherit;
  font-family: inherit;
  font-weight: var(--fw-book);
  font-size: 1.0625rem;
  line-height: 1.275rem;
  letter-spacing: 0.01em;
  color: var(--color-black);
}
.field__input::placeholder {
  color: var(--color-black);
  opacity: 1;
}
.field--area .field__input {
  padding: 1.2063rem 1.25rem;
  resize: none;
}
.field__label {
  position: absolute;
  top: -0.75rem;
  right: 0.9375rem;
  padding: 0.375rem 0.625rem;
  border-radius: var(--radius-xs);
  background-color: var(--color-gray-4);
  font-size: 0.9375rem;
  line-height: 0.9375rem;
  letter-spacing: 0.02em;
  opacity: 0;
  transition: opacity 0.1s ease-out;
  pointer-events: none;
}
.field:focus-within .field__label {
  opacity: 1;
}
.field-bare {
  margin: 0;
  padding: 0;
  border: 0;
  outline: 0;
  background: none;
  font-family: inherit;
}
.field-bare::placeholder {
  color: inherit;
  opacity: 1;
}
button[type="submit"] {
  cursor: pointer;
  font-family: inherit;
}

/* Overlays (mobile menu, pop-ups) */
.overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  overflow: auto;
}
.overlay[hidden] {
  display: none;
}
.overlay__backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.25);
}
.overlay__panel {
  position: relative;
  margin: auto;
}
.page--m .overlay__panel {
  margin: 0;
}

.to-top {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease-out;
}
.to-top.is-visible {
  opacity: 1;
  pointer-events: auto;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  * {
    transition: none !important;
    animation: none !important;
  }
}
