/* =========================================================
   strompgabriel.sk — dizajnový systém
   Farby, typografia a spoločné komponenty pre celý web.
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,400;0,9..144,500;0,9..144,600;1,9..144,500&family=Inter:wght@400;500;600&display=swap');

:root{
  --forest:      #1B4332;
  --forest-deep: #10281D;
  --sage:        #52796F;
  --sage-light:  #CAD2C5;
  --paper:       #F7F3EA;
  --paper-dim:   #EFE9DA;
  --gold:        #C9A227;
  --ink:         #1A1A1A;
  --ink-soft:    #4B5348;

  --serif: 'Fraunces', Georgia, serif;
  --sans:  'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --max: 1040px;
  --edge: clamp(20px, 5vw, 64px);
}

*, *::before, *::after{ box-sizing: border-box; }
html{ scroll-behavior: smooth; }

body{
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

img{ max-width: 100%; display: block; }
a{ color: inherit; }

h1, h2, h3{
  font-family: var(--serif);
  font-weight: 500;
  line-height: 1.12;
  margin: 0 0 0.4em;
  letter-spacing: -0.01em;
}
h1{ font-size: clamp(2.4rem, 5vw, 4rem); font-weight: 600; }
h2{ font-size: clamp(1.7rem, 3.2vw, 2.5rem); }
h3{ font-size: 1.25rem; font-weight: 600; }

p{ margin: 0 0 1em; max-width: 62ch; }

:focus-visible{
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

/* ---------- layout helpers ---------- */
.wrap{
  max-width: var(--max);
  margin: 0 auto;
  padding-left: var(--edge);
  padding-right: var(--edge);
}
section{ padding: clamp(20px, 3vw, 32px) 0; }

/* ---------- nav ---------- */
.site-nav{
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(247, 243, 234, 0.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(27, 67, 50, 0.12);
}
.site-nav .wrap{
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 18px;
  padding-bottom: 18px;
}
.brand{
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.15rem;
  color: var(--forest);
  text-decoration: none;
}
.nav-links{
  display: flex;
  gap: clamp(16px, 3vw, 34px);
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a{
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--ink-soft);
  padding-bottom: 3px;
  border-bottom: 2px solid transparent;
  transition: border-color 0.2s ease, color 0.2s ease;
}
.nav-links a:hover,
.nav-links a[aria-current="page"]{
  color: var(--forest);
  border-color: var(--gold);
}
.nav-toggle{ display: none; }

@media (max-width: 640px){
  .nav-links{
    position: fixed;
    inset: 62px 0 auto 0;
    flex-direction: column;
    background: var(--paper);
    padding: 8px var(--edge) 20px;
    border-bottom: 1px solid rgba(27,67,50,0.12);
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.18s ease, transform 0.18s ease;
  }
  .nav-links.open{
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }
  .nav-toggle{
    display: block;
    background: none;
    border: 1px solid var(--forest);
    border-radius: 6px;
    width: 38px;
    height: 34px;
    color: var(--forest);
    font-size: 1.1rem;
  }
}

/* ---------- buttons / links ---------- */
.btn{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
}
.btn-primary{ background: var(--forest); color: var(--paper); }
.btn-primary:hover{ background: var(--forest-deep); }
.btn-ghost{ background: transparent; color: var(--forest); border-color: var(--forest); }
.btn-ghost:hover{ background: rgba(27,67,50,0.06); }

.eyebrow-label{
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.05rem;
  color: var(--sage);
  margin: 0 0 6px;
}

/* ---------- hero ---------- */
.hero{
  padding-top: clamp(24px, 4vw, 48px);
  padding-bottom: clamp(24px, 4vw, 40px);
}
.hero .wrap{
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: clamp(28px, 5vw, 56px);
  align-items: center;
}
@media (max-width: 860px){
  .hero .wrap{ grid-template-columns: 1fr; }
}
.hero-photo{
  aspect-ratio: 4 / 5;
  border-radius: 18px;
  background: linear-gradient(155deg, var(--sage) 0%, var(--forest) 100%);
  display: flex;
  align-items: flex-end;
  padding: 20px;
  color: var(--paper-dim);
  font-family: var(--serif);
  font-style: italic;
  font-size: 0.95rem;
  position: relative;
  overflow: hidden;
}
.hero-photo img{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero-photo span{ position: relative; z-index: 1; }
.hero-actions{ display: flex; gap: 14px; flex-wrap: wrap; margin-top: 28px; }

/* ---------- section heading pattern ---------- */
.section-head{
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: clamp(14px, 2vw, 22px);
  flex-wrap: wrap;
}
.section-head p{ margin: 0; color: var(--ink-soft); max-width: 44ch; }

hr.rule{
  border: none;
  border-top: 1px solid rgba(27,67,50,0.15);
  margin: 0;
}

/* ---------- cards (activities) ---------- */
.card-grid{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 22px;
}
.card{
  background: #fff;
  border: 1px solid rgba(27,67,50,0.1);
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.card-img{
  aspect-ratio: 16/10;
  background: var(--sage-light);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--forest);
  font-family: var(--serif);
  font-style: italic;
  font-size: 0.9rem;
  text-align: center;
  padding: 12px;
  overflow: hidden;
}
.card-img img{ width: 100%; height: 100%; object-fit: cover; }
.card-body{ padding: 20px 22px 24px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.card-tag{
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--sage);
  text-transform: none;
}
.card-body p{ font-size: 0.95rem; color: var(--ink-soft); margin-bottom: 0; }
.card-link{
  margin-top: auto;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--forest);
  text-decoration: none;
  border-bottom: 1px solid var(--gold);
  align-self: flex-start;
}

/* ---------- footer ---------- */
.site-footer{
  background: var(--forest-deep);
  color: var(--sage-light);
  padding: 36px 0 24px;
  margin-top: 16px;
}
.site-footer .wrap{
  display: flex;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.site-footer h3{ color: var(--paper); font-size: 1rem; margin-bottom: 10px; }
.footer-links{ list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.footer-links a{ text-decoration: none; color: var(--sage-light); font-size: 0.92rem; }
.footer-links a:hover{ color: var(--gold); }
.footer-bottom{
  max-width: var(--max);
  margin: 32px auto 0;
  padding: 18px var(--edge) 0;
  border-top: 1px solid rgba(202,210,197,0.18);
  font-size: 0.82rem;
  color: rgba(202,210,197,0.7);
}

/* ---------- password gate (skola.html) ---------- */
.gate{
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px var(--edge);
}
.gate-box{
  max-width: 380px;
  width: 100%;
  background: #fff;
  border: 1px solid rgba(27,67,50,0.12);
  border-radius: 16px;
  padding: 36px 32px;
  text-align: center;
}
.gate-box input[type="password"]{
  width: 100%;
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid rgba(27,67,50,0.25);
  font-size: 1rem;
  font-family: var(--sans);
  margin: 18px 0 10px;
}
.gate-error{ color: #9C3B2E; font-size: 0.88rem; min-height: 1.2em; margin-bottom: 6px; }
.gate-note{ font-size: 0.8rem; color: var(--ink-soft); margin-top: 18px; }
.protected-content{ display: none; }
.protected-content.visible{ display: block; }
#gate-wrapper.hidden{ display: none; }

/* ---------- timeline (zivot.html) ---------- */
.timeline{
  position: relative;
  margin-top: 10px;
}
.timeline::before{
  content: "";
  position: absolute;
  left: 20px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(var(--sage), var(--sage-light));
}
@media (min-width: 760px){
  .timeline::before{ left: 50%; transform: translateX(-1px); }
}
.milestone{
  position: relative;
  padding-left: 56px;
  margin-bottom: 32px;
}
.milestone::before{
  content: "";
  position: absolute;
  left: 20px;
  top: 6px;
  width: 14px;
  height: 14px;
  background: var(--gold);
  border: 3px solid var(--paper);
  border-radius: 50%;
  transform: translateX(-50%);
  box-shadow: 0 0 0 2px var(--forest);
}
@media (min-width: 760px){
  .milestone{
    width: calc(50% - 44px);
    padding-left: 0;
    padding-right: 0;
  }
  .milestone::before{ transform: translateX(-50%); }
  .milestone:nth-child(odd){ margin-left: 0; text-align: right; padding-right: 40px; }
  .milestone:nth-child(odd)::before{ left: calc(100% + 44px); }
  .milestone:nth-child(even){ margin-left: calc(50% + 44px); padding-left: 40px; }
  .milestone:nth-child(even)::before{ left: -44px; }
}
.milestone-year{
  font-family: var(--serif);
  font-style: italic;
  color: var(--sage);
  font-size: 1rem;
  margin-bottom: 4px;
}
.milestone h3{ margin-bottom: 6px; }
.milestone-result{
  display: inline-block;
  margin-top: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--forest);
  background: rgba(201,162,39,0.16);
  padding: 5px 12px;
  border-radius: 999px;
}

/* ---------- compact mode (napr. skola.html) ----------
   Cieľ: aby sa celá stránka po odomknutí zmestila na výšku
   bežnej FullHD (1920×1080) obrazovky bez rolovania. */
body.compact .site-nav .wrap{ padding-top: 10px; padding-bottom: 10px; }

body.compact .page-hero{
  padding-top: clamp(16px, 3vw, 28px);
  padding-bottom: clamp(8px, 1.5vw, 14px);
}
body.compact .page-hero h1{ font-size: clamp(1.7rem, 3.4vw, 2.4rem); margin-bottom: 0.2em; }
body.compact .page-hero .eyebrow-label{ margin-bottom: 2px; }
body.compact .page-hero p{ margin-bottom: 0; font-size: 0.95rem; }

body.compact section{ padding: 20px 0; }
body.compact .section-head{ margin-bottom: 16px; }
body.compact .card-grid{ gap: 14px; }
body.compact .card-body{ padding: 14px 16px 16px; gap: 6px; }
body.compact .card-body h3{ font-size: 1.1rem; }
body.compact .card-body p{ font-size: 0.88rem; }

body.compact .gate{ min-height: auto; padding: 48px var(--edge); }

body.compact #lockAgain{ margin: 4px auto 24px; }

body.compact .site-footer{ padding: 20px 0 14px; margin-top: 8px; }
body.compact .site-footer h3{ font-size: 0.92rem; margin-bottom: 6px; }
body.compact .footer-links{ gap: 3px; }
body.compact .footer-bottom{ margin-top: 14px; padding-top: 10px; }

/* ---------- generic page hero (subpages) ---------- */
.page-hero{
  padding: clamp(16px,2.5vw,28px) 0 0;
}
.page-hero h1{ margin-bottom: 0.15em; }
.page-hero p{ color: var(--ink-soft); font-size: 1.05rem; margin-bottom: 0; }

/* karta ako odkaz */
a.card{ text-decoration: none; color: inherit; transition: transform .15s ease, box-shadow .15s ease; }
a.card:hover{ transform: translateY(-2px); box-shadow: 0 6px 18px rgba(27,67,50,0.10); }
