/* Mimcsi – a weboldal arculata.
   A színek, a sarokkerekítések és a térközök az alkalmazás saját rendszeréből jönnek
   (Mimcsi/DesignSystem.swift: AppColor, Space, Radius), hogy a web és az app egy világ legyen.
   Betűk: Nunito a címekhez (az app lekerekített rendszerbetűjének webes párja), Nunito Sans a
   folyószöveghez. Egyetlen sor JavaScript sincs az oldalon. */

:root {
  /* Felületek, hátulról előre */
  --bg: #fff8fa;
  --surface: #f8e4ec;
  --elevated: #ffffff;
  --stage: #f4d0de;
  --hairline: #dbbaca;
  --shadow: 91 52 67;

  /* Szöveg */
  --ink: #352832;
  --secondary: #65545f;
  --accent: #b32161;
  --accent-soft: #f2cddc;

  /* Kiemelés */
  --on-fill: #fffafb;
  --fill: #352832;

  /* Cica pigmentjei – illusztrációhoz, nem felületekhez */
  --cat-line: #352832;
  --cream: #ffe6d2;
  --cream-light: #fff3e8;
  --cream-shade: #f7d4bc;
  --peach: #f6b48f;
  --ear: #f3a3a3;
  --cheek: #f4a3ae;
  --nose: #e58a97;
  --eye: #4a2c3d;

  /* Ciklusszínek – a naptár illusztrációjához */
  --period: #e86f9b;
  --fertile: #cde8d4;
  --ovulation: #1d5795;
  --luteal: #f6e1b8;

  /* Forma és ritmus */
  --r-s: 12px;
  --r-m: 18px;
  --r-l: 26px;
  --page: 20px;
  --measure: 34rem;
  --wide: 68rem;

  --display: "Nunito", "SF Pro Rounded", ui-rounded, "Segoe UI", system-ui, sans-serif;
  --body: "Nunito Sans", system-ui, -apple-system, "Segoe UI", sans-serif;

  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #241b2d;
    --surface: #32253e;
    --elevated: #432f50;
    --stage: #3c2447;
    --hairline: #63476c;
    --shadow: 0 0 0;
    --ink: #f8eef3;
    --secondary: #d8c7d2;
    --accent: #ff9ac1;
    --accent-soft: #513048;
    --on-fill: #f7eaf0;
    --fill: #73425c;
    --cream: #d0a486;
    --cream-light: #dcb99f;
    --cream-shade: #c18d70;
    --peach: #cb805e;
    --ear: #c7797f;
    --cheek: #cc7d88;
    --nose: #c47e88;
    --period: #ec82aa;
    --fertile: #285442;
    --ovulation: #82b7f6;
    --luteal: #6c5016;
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #241b2d;
  --surface: #32253e;
  --elevated: #432f50;
  --stage: #3c2447;
  --hairline: #63476c;
  --shadow: 0 0 0;
  --ink: #f8eef3;
  --secondary: #d8c7d2;
  --accent: #ff9ac1;
  --accent-soft: #513048;
  --on-fill: #f7eaf0;
  --fill: #73425c;
  --cream: #d0a486;
  --cream-light: #dcb99f;
  --cream-shade: #c18d70;
  --peach: #cb805e;
  --ear: #c7797f;
  --cheek: #cc7d88;
  --nose: #c47e88;
  --period: #ec82aa;
  --fertile: #285442;
  --ovulation: #82b7f6;
  --luteal: #6c5016;
  color-scheme: dark;
}

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

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.65;
  overflow-wrap: break-word;
}

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

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  text-decoration-thickness: 2px;
}

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

h1,
h2,
h3,
h4 {
  font-family: var(--display);
  font-weight: 800;
  line-height: 1.18;
  text-wrap: balance;
  margin: 0;
}

h1 {
  font-size: clamp(2rem, 1.3rem + 3.2vw, 3.1rem);
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(1.5rem, 1.2rem + 1.4vw, 2rem);
  letter-spacing: -0.01em;
}

h3 {
  font-size: 1.1875rem;
}

p,
ul,
ol,
dl {
  margin: 0;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--elevated);
  color: var(--ink);
  padding: 12px 16px;
  border-radius: var(--r-s);
  z-index: 50;
}

.skip:focus {
  left: var(--page);
  top: 10px;
}

/* ---------- Szerkezet ---------- */

.wrap {
  width: 100%;
  max-width: var(--wide);
  margin-inline: auto;
  padding-inline: max(var(--page), env(safe-area-inset-left, 0px))
    max(var(--page), env(safe-area-inset-right, 0px));
}

.band {
  padding-block: clamp(2.5rem, 1.5rem + 4vw, 4.5rem);
}

.band--soft {
  background: var(--surface);
}

.prose {
  max-width: var(--measure);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.prose h2 {
  margin-top: 1.5rem;
}

.prose h3 {
  margin-top: 1rem;
}

.prose ul,
.prose ol {
  padding-left: 1.3em;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.lede {
  font-size: 1.1875rem;
  color: var(--secondary);
}

.eyebrow {
  font-family: var(--display);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0;
}

.muted {
  color: var(--secondary);
}

.small {
  font-size: 0.9375rem;
}

/* ---------- Fejléc ---------- */

.site-head {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--hairline);
}

.site-head__row {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 62px;
  flex-wrap: wrap;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.1875rem;
  color: var(--ink);
  text-decoration: none;
  margin-right: auto;
}

.brand img {
  width: 40px;
  height: 40px;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem 0.9rem;
  align-items: center;
  font-family: var(--display);
  font-weight: 700;
  font-size: 0.9375rem;
}

.nav a {
  color: var(--ink);
  text-decoration: none;
  padding: 0.35rem 0.1rem;
  border-bottom: 2px solid transparent;
}

.nav a:hover {
  border-bottom-color: var(--accent);
}

.nav a[aria-current="page"] {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* Széles kijelzőn a sor végén álló navigáció, mobilon nyitható lista.
   Két külön elem, mert a zárt <details> tartalmát a böngésző elrejti – így egy sor
   JavaScript sem kell hozzá. */
.menu {
  display: none;
  width: 100%;
}

@media (max-width: 47.99em) {
  .nav--wide {
    display: none;
  }

  .menu {
    display: block;
  }

  .menu > summary {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    cursor: pointer;
    font-family: var(--display);
    font-weight: 700;
    padding: 0.4rem 0.75rem;
    border: 1px solid var(--hairline);
    border-radius: 999px;
    background: var(--elevated);
    width: max-content;
    list-style: none;
  }

  .menu > summary::-webkit-details-marker {
    display: none;
  }

  .menu[open] > summary {
    border-color: var(--accent);
  }

  .menu .nav {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.4rem 0 0.8rem;
  }

  .menu .nav a {
    padding: 0.7rem 0.2rem;
    border-bottom: 1px solid var(--hairline);
  }

  .menu .nav a[aria-current="page"] {
    border-bottom-color: var(--accent);
  }
}

/* ---------- Gombok ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1rem;
  padding: 0.8rem 1.4rem;
  border-radius: 999px;
  border: 1px solid transparent;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.22s cubic-bezier(0.2, 0.8, 0.3, 1), box-shadow 0.22s ease;
}

.btn--primary {
  background: var(--fill);
  color: var(--on-fill);
  box-shadow: 0 6px 18px rgb(var(--shadow) / 0.18);
}

.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgb(var(--shadow) / 0.24);
}

.btn--quiet {
  background: var(--elevated);
  color: var(--ink);
  border-color: var(--hairline);
}

.btn--quiet:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.btn[aria-disabled="true"] {
  background: var(--surface);
  color: var(--secondary);
  border-color: var(--hairline);
  box-shadow: none;
  cursor: not-allowed;
}

.btn[aria-disabled="true"]:hover {
  transform: none;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

/* ---------- Kártyák ---------- */

.cards {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
}

.card {
  background: var(--elevated);
  border: 1px solid var(--hairline);
  border-radius: var(--r-l);
  padding: 1.35rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  min-width: 0;
  transition: transform 0.22s cubic-bezier(0.2, 0.8, 0.3, 1), box-shadow 0.22s ease;
}

.card--lift:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgb(var(--shadow) / 0.16);
}

.card h3 {
  font-size: 1.0625rem;
}

.card p {
  color: var(--secondary);
  font-size: 0.9875rem;
}

.card__icon {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  color: var(--accent);
  flex: none;
}

.card__icon svg {
  width: 23px;
  height: 23px;
}

.note {
  border-left: 3px solid var(--accent);
  background: var(--surface);
  border-radius: 0 var(--r-m) var(--r-m) 0;
  padding: 0.9rem 1.1rem;
  font-size: 0.9875rem;
}

.pending {
  display: inline-block;
  font-family: var(--display);
  font-weight: 700;
  font-size: 0.8125rem;
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: 999px;
  padding: 0.1rem 0.6rem;
}

/* ---------- Hero ---------- */

.hero {
  padding-block: clamp(2rem, 1rem + 5vw, 4rem) clamp(2.5rem, 1.5rem + 4vw, 4rem);
}

.hero__grid {
  display: grid;
  gap: clamp(1.5rem, 1rem + 3vw, 3rem);
  grid-template-columns: 1fr;
  align-items: center;
}

@media (min-width: 56em) {
  .hero__grid {
    grid-template-columns: 1.05fr 0.95fr;
  }
}

.hero__text {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-width: 0;
}

.hero__text p {
  max-width: 32rem;
}

.hero__cat {
  width: clamp(190px, 44vw, 290px);
  height: auto;
}

.hero__stage {
  display: grid;
  justify-items: center;
  gap: 1rem;
}

.ticks {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.1rem;
  font-size: 0.9375rem;
  color: var(--secondary);
  padding: 0;
  margin: 0;
  list-style: none;
}

.ticks li {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.ticks svg {
  width: 17px;
  height: 17px;
  color: var(--accent);
  flex: none;
}

/* ---------- Telefon-illusztráció ---------- */

.phones {
  display: flex;
  gap: 1rem;
  justify-content: center;
  align-items: flex-end;
  flex-wrap: wrap;
}

.phone {
  width: min(248px, 72vw);
  border-radius: 34px;
  border: 1px solid var(--hairline);
  background: var(--bg);
  padding: 10px;
  box-shadow: 0 18px 40px rgb(var(--shadow) / 0.18);
  flex: none;
}

.phone__screen {
  border-radius: 26px;
  background: var(--bg);
  border: 1px solid var(--hairline);
  overflow: hidden;
  padding: 14px 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.phone__bar {
  width: 58px;
  height: 5px;
  border-radius: 999px;
  background: var(--hairline);
  margin: 0 auto 2px;
}

.mini {
  font-family: var(--display);
  font-size: 0.75rem;
  line-height: 1.35;
}

.mini__card {
  background: var(--elevated);
  border: 1px solid var(--hairline);
  border-radius: var(--r-m);
  padding: 9px 11px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.mini__title {
  font-weight: 800;
}

.mini__muted {
  color: var(--secondary);
  font-size: 0.6875rem;
  font-family: var(--body);
}

.mini__pill {
  align-self: flex-start;
  background: var(--fill);
  color: var(--on-fill);
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 0.6875rem;
  font-weight: 700;
}

.mini__cal {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

.mini__day {
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--surface);
  display: grid;
  place-items: center;
  font-size: 0.5625rem;
  color: var(--secondary);
}

.mini__day--period {
  background: var(--period);
  color: #352832;
  font-weight: 700;
}

.mini__day--fertile {
  background: var(--fertile);
}

.mini__day--ovulation {
  box-shadow: inset 0 0 0 2px var(--ovulation);
}

.mini__day--luteal {
  background: var(--luteal);
}

.mini__rows {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.mini__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: var(--surface);
  border-radius: var(--r-s);
  padding: 7px 9px;
}

.mini__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.mini__chip {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 0.625rem;
}

.mini__chip--on {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
  font-weight: 700;
}

.figure-note {
  font-size: 0.8125rem;
  color: var(--secondary);
  text-align: center;
}

/* ---------- GYIK ---------- */

.faq {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  max-width: 44rem;
}

.qa {
  background: var(--elevated);
  border: 1px solid var(--hairline);
  border-radius: var(--r-m);
  overflow: hidden;
}

.qa > summary {
  cursor: pointer;
  padding: 1rem 1.15rem;
  font-family: var(--display);
  font-weight: 700;
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  list-style: none;
}

.qa > summary::-webkit-details-marker {
  display: none;
}

.qa > summary::after {
  content: "+";
  margin-left: auto;
  font-size: 1.3rem;
  line-height: 1;
  color: var(--accent);
  flex: none;
}

.qa[open] > summary::after {
  content: "–";
}

.qa[open] > summary {
  color: var(--accent);
}

.qa__body {
  padding: 0 1.15rem 1.15rem;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  color: var(--secondary);
  font-size: 0.9875rem;
}

.qa__body strong {
  color: var(--ink);
}

/* ---------- Lábléc ---------- */

.site-foot {
  border-top: 1px solid var(--hairline);
  background: var(--surface);
  padding-block: 2.2rem 2.6rem;
  margin-top: 1rem;
}

.site-foot__grid {
  display: grid;
  gap: 1.4rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr));
}

.site-foot h2 {
  font-size: 0.9375rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--secondary);
  margin-bottom: 0.5rem;
}

.site-foot ul {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-size: 0.9875rem;
}

.site-foot a {
  color: var(--ink);
  text-decoration: none;
}

.site-foot a:hover {
  color: var(--accent);
  text-decoration: underline;
}

.site-foot__legal {
  margin-top: 1.6rem;
  font-size: 0.875rem;
  color: var(--secondary);
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

/* ---------- Dokumentumoldalak ---------- */

.doc-head {
  padding-block: clamp(1.8rem, 1rem + 3vw, 3rem) 0.5rem;
}

.toc {
  background: var(--surface);
  border-radius: var(--r-m);
  padding: 1rem 1.2rem;
  margin-top: 0.5rem;
}

.toc h2 {
  font-size: 0.9375rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--secondary);
  margin-bottom: 0.5rem;
}

.toc ol {
  margin: 0;
  padding-left: 1.2em;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-size: 0.9875rem;
}

.doc dl {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.doc dt {
  font-family: var(--display);
  font-weight: 700;
}

.doc dd {
  margin: 0.15rem 0 0;
  color: var(--secondary);
}

.table-scroll {
  overflow-x: auto;
  border: 1px solid var(--hairline);
  border-radius: var(--r-m);
}

table {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.9375rem;
}

th,
td {
  text-align: left;
  padding: 0.7rem 0.9rem;
  border-bottom: 1px solid var(--hairline);
  vertical-align: top;
}

thead th {
  font-family: var(--display);
  background: var(--surface);
}

tbody tr:last-child td {
  border-bottom: none;
}

/* ---------- Mozgás ---------- */

@media (prefers-reduced-motion: no-preference) {
  .rise {
    animation: rise 0.6s cubic-bezier(0.2, 0.8, 0.3, 1) both;
  }

  .rise:nth-of-type(2) {
    animation-delay: 0.06s;
  }

  .rise:nth-of-type(3) {
    animation-delay: 0.12s;
  }

  @keyframes rise {
    from {
      opacity: 0.001;
      transform: translateY(10px);
    }
    to {
      opacity: 1;
      transform: none;
    }
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
