/* ==========================================================================
   Happy Hope – styles
   Mobile-first. Breakpoints: 768px (tablet), 1200px (desktop).
   ========================================================================== */

@font-face {
  font-family: "Jost";
  src: url("../assets/fonts/Jost-400-latin.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Jost";
  src: url("../assets/fonts/Jost-400-latin-ext.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Jost";
  src: url("../assets/fonts/Jost-500-latin.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Jost";
  src: url("../assets/fonts/Jost-500-latin-ext.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Jost";
  src: url("../assets/fonts/Jost-600-latin.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Jost";
  src: url("../assets/fonts/Jost-600-latin-ext.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ---- Design tokens (Happy Hope logomanuál) ---- */
:root {
  --color-bg: #f8f5f0;          /* hh-kremova */
  --color-bg-alt: #dce7f1;      /* hh-modra-svetla */
  --color-text: #26313d;        /* hh-tmava */
  --color-text-muted: #5a6572;  /* hh-tmava-tlmena */
  --color-primary: #3e6286;     /* hh-modra-tmava */
  --color-primary-dark: #2f4c69; /* hh-modra-tmava, darkened for hover */
  --color-primary-contrast: #ffffff;
  --color-brand: #95b3cf;       /* hh-modra – logo/decorative only, never text or thin lines (2.0:1 on kremova) */
  --color-accent: #3e6286;      /* hh-modra-tmava, used for thin accent borders (needs contrast, unlike hh-modra) */
  --color-accent-warm: #f3d9c6; /* hh-broskyna – small warm accents, max ~10% of area */
  --color-border: #dce7f1;      /* hh-modra-svetla */
  --color-focus: #26313d;
  --color-overlay: rgba(38, 49, 61, 0.55);

  --font-base: "Jost", "Futura", "Century Gothic", system-ui, sans-serif;

  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2.5rem;
  --space-5: 4rem;

  --radius-sm: 8px;
  --radius: 20px;
  --radius-full: 999px;
  --container: 1140px;
  --nav-h: 68px;
}

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

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

body {
  margin: 0;
  font-family: var(--font-base);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
  font-size: 1.0625rem;
}

img,
video {
  max-width: 100%;
  display: block;
}

h1,
h2,
h3,
h4 {
  line-height: 1.2;
  margin: 0 0 var(--space-2);
  font-weight: 500;
}

h1 {
  font-size: clamp(1.9rem, 5vw, 3.5rem);
}

h2 {
  font-size: clamp(1.4rem, 3.5vw, 1.625rem);
  color: var(--color-primary-dark);
}

h3 {
  font-size: 1.25rem;
  font-weight: 600;
}

p {
  margin: 0 0 var(--space-2);
}

a {
  color: var(--color-primary-dark);
}

ul,
ol {
  padding-left: 1.25rem;
}

/* ---- Focus visibility ---- */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--color-focus);
  outline-offset: 2px;
}

/* ---- Layout helpers ---- */
.container {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--space-2);
}

section {
  position: relative;
  padding-block: var(--space-5);
}

/* ---- Decorative doodles ---- */
/* A few playful, flat, brand-colored accents (per the manual: no shadows,
   gradients or heavy textures) — hidden on small screens to keep mobile
   layouts uncluttered. */
.doodle {
  position: absolute;
  width: 110px;
  height: auto;
  z-index: 0;
  pointer-events: none;
}

.doodle--star { color: #f2c14e; }
.doodle--cloud { color: var(--color-primary); width: 150px; }
.doodle--wave { color: #7fbfa0; width: 170px; }
.doodle--dots { width: 104px; }

.doodle--tr { top: var(--space-3); right: var(--space-3); }
.doodle--tl { top: var(--space-3); left: var(--space-3); }
.doodle--br { bottom: var(--space-3); right: var(--space-3); }
.doodle--bl { bottom: var(--space-3); left: var(--space-3); }

.hero .doodle {
  z-index: 2;
}

@media (max-width: 699px) {
  .doodle {
    display: none;
  }
}

.section-alt {
  background: var(--color-bg-alt);
}

.section-intro {
  max-width: 65ch;
  margin-bottom: var(--space-3);
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--color-primary-dark);
  color: #fff;
  padding: var(--space-1) var(--space-2);
  z-index: 1000;
  border-radius: 0 0 8px 0;
}

.skip-link:focus {
  left: 0;
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-full);
  font-weight: 600;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  font-size: 1rem;
  font-family: inherit;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.btn--primary {
  background: var(--color-primary);
  color: var(--color-primary-contrast);
}

.btn--primary:hover {
  background: var(--color-primary-dark);
}

.btn--secondary {
  background: transparent;
  border-color: var(--color-primary-contrast);
  color: var(--color-primary-contrast);
}

.btn--secondary:hover {
  background: rgba(255, 255, 255, 0.15);
}

.btn--outline {
  background: transparent;
  border-color: var(--color-primary);
  color: var(--color-primary-dark);
}

.btn--outline:hover {
  background: var(--color-primary);
  color: #fff;
}

.btn--small {
  padding: 0.4rem 0.9rem;
  font-size: 0.85rem;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-3);
}

/* ---- Header / nav ---- */
/* Floating rounded "card" nav bar, flush with the top edge, inset from the
   sides so the page (or hero, once scrolled underneath) shows through. */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
}

.site-header .container {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  padding-block: var(--space-1);
  background: #fff;
  border-radius: 0 0 var(--radius) var(--radius);
  box-shadow: 0 10px 30px -12px rgba(38, 49, 61, 0.35);
}

.logo {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.logo img {
  height: 52px;
  width: auto;
  display: block;
}

.main-nav {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
}

.nav-row2 {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.main-nav a {
  text-decoration: none;
  color: var(--color-text);
  font-weight: 500;
  padding: 0.4rem 0;
}

.main-nav a:hover {
  color: var(--color-primary);
}

.main-nav .nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.35rem 0.35rem 0.35rem 1.1rem;
  background: var(--color-accent-warm);
  color: var(--color-text);
  font-weight: 600;
  border-radius: var(--radius-full);
}

.main-nav .nav-cta:hover {
  color: var(--color-text);
  background: #eeccb2;
}

.nav-cta__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--color-primary);
  color: #fff;
  font-size: 0.9rem;
}

@media (min-width: 768px) {
  .main-nav {
    gap: var(--space-3);
  }
}

@media (max-width: 767px) {
  .main-nav a[href="#galeria"] {
    display: none;
  }

  .nav-cta__word {
    display: none;
  }

  .logo img {
    height: 32px;
  }

  .site-header .container {
    gap: 0.5rem;
  }

  .main-nav {
    flex-wrap: nowrap;
    gap: 0.45rem;
  }

  .nav-row2 {
    flex-wrap: nowrap;
    gap: 0.45rem;
  }

  .main-nav a {
    font-size: 0.75rem;
    padding: 0.25rem 0;
    white-space: nowrap;
  }

  .main-nav .nav-cta {
    font-size: 0.75rem;
    padding: 0.28rem 0.28rem 0.28rem 0.6rem;
    white-space: nowrap;
  }

  .nav-cta__icon {
    width: 20px;
    height: 20px;
    font-size: 0.65rem;
  }
}

/* ---- Hero ---- */
.hero {
  position: relative;
  height: 100vh;
  min-height: 100vh;
  color: #fff;
  background-color: var(--color-text);
}

.hero__media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.55) 0%, rgba(0, 0, 0, 0.35) 100%);
  z-index: 1;
}

.hero__content {
  position: sticky;
  top: calc(var(--nav-h) + 24px);
  z-index: 5;
  height: auto;
  display: flex;
  flex-direction: column;
  padding-inline: var(--space-2);
  max-width: 760px;
}

.hero__text {
  margin-top: 4vh;
}

.hero__text h1 {
  font-size: clamp(2.6rem, 6.5vw, 5rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.02em;
  max-width: 16ch;
  color: #fff;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.45);
}

.hero__text p {
  font-size: clamp(1.15rem, 2vw, 1.5rem);
  line-height: 1.6;
  max-width: 52ch;
  color: rgba(255, 255, 255, 0.92);
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.45);
}

.hero-highlight {
  color: #f5a623;
}

@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .hero-highlight {
    background: linear-gradient(90deg, #ffb347, #ff7e5f);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
  }
}

.hero-cta {
  margin-top: var(--space-3);
}

.hero-cta .btn {
  font-size: 1.1rem;
  font-weight: 700;
  padding: 18px 34px;
}

.hero-cta .btn--primary {
  background: #2d5fd1;
  box-shadow: 0 8px 24px rgba(45, 95, 209, 0.4);
}

.hero-cta .btn--primary:hover {
  background: #1e47a8;
}

.hero-cta .btn--secondary {
  border-width: 2px;
}

.hero-cta .btn--secondary:hover {
  background: #fff;
  color: var(--color-text);
  border-color: #fff;
}

@media (max-width: 699px) {
  .hero-cta {
    margin-top: calc(var(--space-3) + 8rem);
    flex-wrap: nowrap;
    gap: 0.5rem;
  }

  .hero-cta .btn {
    flex: 1 1 0;
    min-width: 0;
    padding: 12px 8px;
    font-size: 0.82rem;
    white-space: nowrap;
  }
}

/* ---- Story section ---- */
.story {
  display: grid;
  gap: var(--space-3);
}

.story__portrait {
  width: 220px;
  max-width: 60vw;
  height: auto;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  object-fit: cover;
  margin-inline: auto;
  border: 4px solid var(--color-bg);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.12);
}

.story__text {
  max-width: 68ch;
}

@media (min-width: 768px) {
  .story {
    grid-template-columns: 240px 1fr;
    align-items: start;
  }

  .story__portrait {
    width: 100%;
    max-width: none;
  }
}

/* ---- O združení ---- */
.about-media {
  margin: 3rem 0;
}

.about-media img {
  width: 100%;
  height: auto;
  max-width: 420px;
  display: block;
  margin-inline: auto;
}

@media (max-width: 699px) {
  .about-media img {
    max-width: 210px;
  }
}

.about-media figcaption {
  text-align: center;
  margin-top: var(--space-1);
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

.about-grid {
  display: grid;
  gap: var(--space-3);
  margin-top: var(--space-3);
}

@media (min-width: 768px) {
  .about-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.about-card {
  position: relative;
  background: #fff;
  border-radius: var(--radius);
  padding: var(--space-3);
  padding-bottom: calc(var(--space-3) + 64px);
}

.about-card:nth-of-type(1) {
  background: var(--color-accent-warm); /* hh-broskyna */
}

.about-card:nth-of-type(2) {
  background: #d7f0e3; /* light mint */
}

.about-card:nth-of-type(3) {
  background: #fbe8b8; /* light yellow */
}

.about-card__icon {
  position: absolute;
  right: var(--space-3);
  bottom: var(--space-3);
  width: 64px;
  height: 64px;
  margin: 0;
}

.about-card h3 {
  margin-top: 0;
  color: var(--color-primary-dark);
}

/* ---- 2% section ---- */
.tax-section {
  background: var(--color-bg);
}

.doc-preview {
  margin-top: var(--space-3);
  text-align: center;
}

.doc-preview img {
  width: 100%;
  max-width: 220px;
  height: auto;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.12);
}

.tax-data {
  display: grid;
  gap: var(--space-2);
  margin: var(--space-3) 0;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: var(--space-3);
}

.tax-data__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-1);
  padding-block: 0.6rem;
  border-bottom: 1px solid var(--color-border);
}

.tax-data__row:last-child {
  border-bottom: none;
}

.tax-data__label {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  display: block;
}

.tax-data__value {
  font-weight: 600;
  font-size: 1.05rem;
}

.copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: #fff;
  border: 1px solid var(--color-primary);
  color: var(--color-primary-dark);
  border-radius: var(--radius-sm);
  padding: 0.4rem 0.8rem;
  font-family: inherit;
  font-size: 0.85rem;
  cursor: pointer;
}

.copy-btn:hover {
  background: var(--color-primary);
  color: #fff;
}

.copy-btn[data-copied="true"] {
  background: var(--color-primary-dark);
  color: #fff;
  border-color: var(--color-primary-dark);
}

.tax-steps {
  display: grid;
  gap: var(--space-3);
  margin-top: var(--space-3);
}

@media (min-width: 768px) {
  .tax-steps {
    grid-template-columns: 1fr 1fr;
  }
}

.tax-steps__card {
  background: #fff;
  border-radius: var(--radius);
  padding: var(--space-3);
}

.tax-steps__card:nth-of-type(1) {
  background: var(--color-accent-warm); /* hh-broskyna */
}

.tax-steps__card:nth-of-type(2) {
  background: #d7f0e3; /* light mint */
}

.tax-steps__card ol {
  padding-left: 1.1rem;
}

.tax-steps__card li {
  margin-bottom: var(--space-1);
}

.tax-note {
  background: #fff;
  border-left: 4px solid var(--color-accent);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: var(--space-2) var(--space-3);
  margin-top: var(--space-3);
}

.percent-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: var(--space-2);
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
}

.percent-table th,
.percent-table td {
  text-align: left;
  padding: 0.65rem 0.9rem;
  border-bottom: 1px solid var(--color-border);
  font-size: 0.95rem;
}

.percent-table th {
  background: var(--color-bg-alt);
}

.impact-box {
  margin-top: var(--space-4);
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: var(--space-3);
}

/* ---- Gallery ---- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-1);
  margin-top: var(--space-3);
}

@media (min-width: 768px) {
  .gallery-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-2);
  }
}

@media (min-width: 1200px) {
  .gallery-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.gallery-item {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 4 / 5;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.25s ease;
}

.gallery-item:hover img {
  transform: scale(1.04);
}

/* ---- Lightbox ---- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(38, 49, 61, 0.92);
  padding: var(--space-2);
}

.lightbox[hidden] {
  display: none;
}

.lightbox__figure {
  max-width: min(90vw, 1000px);
  max-height: 85vh;
  margin: 0;
  text-align: center;
}

.lightbox__img {
  max-width: 100%;
  max-height: 75vh;
  border-radius: var(--radius-sm);
  margin-inline: auto;
}

.lightbox__caption {
  color: #fff;
  margin-top: var(--space-1);
  font-size: 0.9rem;
}

.lightbox__close,
.lightbox__prev,
.lightbox__next {
  position: absolute;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.4);
  color: #fff;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  font-size: 1.3rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox__close:hover,
.lightbox__prev:hover,
.lightbox__next:hover {
  background: rgba(255, 255, 255, 0.28);
}

.lightbox__close {
  top: var(--space-2);
  right: var(--space-2);
}

.lightbox__prev {
  left: var(--space-2);
  top: 50%;
  transform: translateY(-50%);
}

.lightbox__next {
  right: var(--space-2);
  top: 50%;
  transform: translateY(-50%);
}

/* ---- "Support us otherwise" section ---- */
.support-other {
  background: var(--color-primary-dark);
  color: #fff;
}

.support-other h2 {
  color: #fff;
}

.support-other ul {
  margin-top: var(--space-2);
}

.support-other .btn--primary {
  background: #fff;
  color: var(--color-primary-dark);
}

.support-other .btn--primary:hover {
  background: var(--color-bg-alt);
}

/* ---- Footer ---- */
.site-footer {
  background: var(--color-text);
  color: var(--color-bg);
  padding-block: var(--space-4);
  font-size: 0.9rem;
}

.site-footer a {
  color: #ffffff;
}

.footer-grid {
  display: grid;
  gap: var(--space-3);
}

@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.footer-grid h3 {
  color: #fff;
  font-size: 1rem;
  margin-bottom: var(--space-1);
}

.footer-bottom {
  margin-top: var(--space-3);
  padding-top: var(--space-2);
  border-top: 1px solid rgba(248, 245, 240, 0.15);
  font-size: 0.8rem;
  color: #aeb8c3;
}

/* ---- Future donation section placeholder (kept hidden intentionally) ---- */
.donation-section--future {
  display: none;
}

/* ---- Reduced motion ---- */
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
  }

  .gallery-item img {
    transition: none !important;
  }
}
