/* ════════════════════════════════════════════════════════════════
   Keramika u Jizerky – style.css
   Grid: 8-point system  |  Max width: 2 × 600px = 1200px
   Fonts: EB Garamond (headings) + Figtree (body)
════════════════════════════════════════════════════════════════ */

/* ─── Design tokens ──────────────────────────────────────────── */
:root {
  /* Palette */
  --cream-light:#FDFBF8;    /* pozadí světlých sekcí */
  --cream:      #F5F0E8;    /* pozadí světlých sekcí */
  --cream-dark: #EDE7D9;    /* alternativní světlé pozadí */
  --cream-blue: #EAECE9;    /* alternativní světlé pozadí */
  --sand:       #C9B99A;    /* akcent, borders */
  --clay:       #8B6F52;    /* tmavší akcent */
  --charcoal:   #2F323A;    /* text, footer bg */
  --white:      #FFFFFF;

  /* Typography */
  --font-heading: 'EB Garamond', Georgia, serif;
  --font-body:    'Figtree', system-ui, sans-serif;

  /* 8-point scale */
  --s1:  8px;
  --s2:  16px;
  --s3:  24px;
  --s4:  32px;
  --s5:  40px;
  --s6:  48px;
  --s7:  56px;
  --s8:  64px;
  --s10: 80px;
  --s12: 96px;

  /* Grid */
  --cell: 580px;               /* polovina max-width */
  --max-w: calc(var(--cell) * 2); /* 1200px */

}

/* ─── Reset & base ───────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  color: var(--charcoal);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }

a { color: inherit; text-decoration: none; }

ul { list-style: none; }

address { font-style: normal; }

/* ─── Typography scale ───────────────────────────────────────── */
h1, h2, h3 {
  font-family: var(--font-heading);
  font-weight: 400;
}

h1 { font-size: clamp(52px, 16vw, 160px); }
h2 { font-size: clamp(32px, 4vw, 52px); margin-bottom: var(--s3); }
h3 { font-size: 18px; font-weight: 500; font-family: var(--font-body); letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: var(--s2); }

p { max-width: 52ch; }

/* ─── Obrázky – skutečné <img> tagy ─────────────────────────── */
.hero__img-wrap {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.hero__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.cell-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.wide-photo__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

/* ─── Mockup images (placeholders) ──────────────────────────── */
.img-mock,
.wide-photo__mock,
.hero__img-mock {
  width: 100%;
  height: 100%;
  min-height: 400px;
  background: var(--cream-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.img-mock::after,
.wide-photo__mock::after,
.hero__img-mock::after {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    45deg,
    transparent,
    transparent 24px,
    rgba(0,0,0,0.04) 24px,
    rgba(0,0,0,0.04) 25px
  );
}

.mock-label {
  font-family: var(--font-body);
  font-size: 12px;
  color: var(--clay);
  text-align: center;
  padding: var(--s2);
  max-width: 280px;
  line-height: 1.5;
  position: relative;
  z-index: 1;
  border: 1px dashed var(--sand);
  background: rgba(255,255,255,0.6);
}

/* Cookie */

.cookie-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--charcoal);
  color: rgba(255,255,255,0.8);
  padding: var(--s3) var(--s4);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s4);
  z-index: 200;
  font-size: 14px;
}

.cookie-bar a {
  color: var(--sand);
  text-decoration: underline;
}

.cookie-bar.is-hidden {
  display: none;
}


/* ─── Navigace ───────────────────────────────────────────────── */
.main-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: var(--s4);
  padding: var(--s2) var(--s4);
  background: rgba(42, 42, 40, 0.72);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.main-nav a {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.82);
}

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

.main-nav .nav-cta {
  padding: var(--s1) var(--s3);
  border: 1px solid rgba(255,255,255,0.4);
  color: var(--white);
}

.main-nav .nav-cta:hover {
  background: var(--white);
  color: var(--charcoal);
}

/* ─── HERO ───────────────────────────────────────────────────── */
.hero {
  position: relative;
  width: 100%;
  height: 100svh;
  min-height: 600px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

.hero__img-mock {
  position: absolute;
  inset: 0;
  min-height: unset;
  background: #C4AE91;
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(42, 42, 40, 0.75) 0%,
    rgba(42, 42, 40, 0.1) 60%,
    transparent 100%
  );
  z-index: 1;
}

.hero__content {
  position: relative;
  z-index: 2;
  padding: var(--s8) var(--s8) var(--s10);
  max-width: var(--max-w);
  margin: 0 auto;
  width: 100%;
}

.hero__title {
  color: var(--white);
  margin-bottom: var(--s8);
  line-height: 0.8;
}

.hero__subtitle {
  font-family: var(--font-heading);
  font-size: 24px;
  color: var(--white);
  margin-bottom: var(--s4);
  max-width: none;
}

.hero__desc {
    color: var(--white);
  font-size: 16px;
  max-width: 44ch;
  line-height: 1.7;
}

/* ─── Grid sekce (dvě kostky 600px) ─────────────────────────── */
.grid-section {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: var(--cell); /* čtvercové kostky */
}

.grid-cell--text::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0.06;  /* ← průhlednost jen obrázku, text zůstane plný */
  z-index: 0;
}

.grid-cell--text > * {
  position: relative;
  z-index: 1;
}

.grid-cell--text {
  position: relative;
  overflow: hidden;
}

/* Forma */

#forma .grid-cell--text::before {
  background-image: url('img/cup_background.png');
  background-size: 60%;
  background-position: 75% 70%;
  background-repeat: no-repeat;
}

/* Design */
#design .grid-cell--text::before {
  background-image: url('img/mug_background.png');
  background-size: 65%;
  background-position: 20% 65%;
  background-repeat: no-repeat;
}

/* Autor */
#autor .grid-cell--text::before {
  background-image: url('img/pot_background.png');
  background-size: 70%;
  background-position: 80% 60%;
  background-repeat: no-repeat;
}

/* Obchod */
#obchod .grid-cell--text::before {
  background-size: 70%;
  background-position: 15% 70%;
  background-repeat: no-repeat;
}



.grid-section h2 {
    text-align: center;
}

.grid-section p {
    text-align: justify;
    hyphens: auto;
    -webkit-hyphens: auto;
}

.grid-cell--img {
  position: relative;
  overflow: hidden;
}

.grid-cell--img .img-mock {
  position: absolute;
  inset: 0;
  min-height: unset;
}

.grid-cell--text {
  padding: var(--s8);
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: var(--cream);
}

/* Alternativní pozadí pro liché sekce */
.grid-section:nth-of-type(even) .grid-cell--text {
  background: var(--cream-dark);
}

#design .grid-cell--text {
  background: var(--cream-blue);
}

/* ─── Wide photo ─────────────────────────────────────────────── */
.wide-photo {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  height: var(--cell);
  overflow: hidden;
}

.wide-photo__mock {
  height: 100%;
  min-height: unset;
  background: #B8A388;
}

/* ─── Autor ikona ────────────────────────────────────────────── */
.autor-icon {
  margin-top: var(--s4);
  color: var(--sand);
}

/* ─── Obchod ─────────────────────────────────────────────────── */
.obchod-note {
  margin-top: var(--s3);
}

.obchod-list {
  margin: var(--s1) 0 var(--s4);
  display: flex;
  flex-direction: column;
  gap: var(--s1);
  font-size: 15px;
  color: var(--clay);
}

.obchod-list li::before {
  content: '–  ';
  color: var(--sand);
}

.obchod-links {
  display: flex;
  gap: var(--s2);
  flex-wrap: wrap;
}

/* ─── Buttons ────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s1);
  padding: 14px var(--s4);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border: none;
  cursor: pointer;
}

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

.btn--primary:hover { background: #3e3e3a; }

.btn--secondary {
  background: transparent;
  color: var(--charcoal);
  border: 1px solid var(--charcoal);
}

.btn--secondary:hover {
  background: var(--charcoal);
  color: var(--white);
}

.btn--submit { min-width: 160px; position: relative; }

/* Loading stav tlačítka */
.btn--loading .btn-text { opacity: 0; }
.btn--loading .btn-spinner { display: block; }
.btn-spinner {
  display: none;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: var(--white);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  position: absolute;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ─── Kontakt ────────────────────────────────────────────────── */
.kontakt-section {
  background: var(--cream-dark);
  padding: var(--s12) var(--s4);
}

.kontakt-inner {
  max-width: 600px;
  margin: 0 auto;
}

.kontakt-inner h2 { text-align: center; }

.kontakt-desc {
  text-align: center;
  margin: 0 auto var(--s1);
  font-size: 16px;
  color: var(--charcoal);
}

.kontakt-reply {
  text-align: center;
  margin: 0 auto var(--s6);
  margin-top var(--s2)
  font-size: 16px;
  color: var(--charcoal);

}

/* Formulář */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: var(--s2);
  margin-bottom: var(--s2);
}

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

.form-group--full { margin-bottom: var(--s2); }

label {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--charcoal);
}

label span { color: var(--charcoal); }

input[type="text"],
input[type="email"],
input[type="tel"],
textarea {
  width: 100%;
  padding: 12px var(--s2);
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--charcoal);
  background: var(--white);
  border: 1px solid var(--cream);
  outline: none;
}

input::placeholder, textarea::placeholder {
  color: rgba(42,42,40,0.35);
}

input:focus, textarea:focus {
  border-color: var(--clay);
  box-shadow: 0 0 0 3px rgba(139,111,82,0.12);
}

textarea { resize: vertical; min-height: 140px; }

.form-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s2);
  flex-wrap: wrap;
}

.recaptcha-note {
  font-size: 11px;
  color: rgba(42,42,40,0.45);
  max-width: 38ch;
  line-height: 1.5;
}

.recaptcha-note a {
  color: var(--clay);
  text-decoration: underline;
}

/* Formulářové zprávy */
.form-message {
  padding: var(--s2) var(--s3);
  margin-bottom: var(--s3);
  font-size: 15px;
  border-left: 3px solid;
}

.form-message--success {
  background: rgba(139,111,82,0.08);
  border-color: var(--clay);
  color: var(--clay);
}

.form-message--error {
  background: rgba(180,60,60,0.07);
  border-color: #B43C3C;
  color: #8B2C2C;
}

/* ─── Footer ─────────────────────────────────────────────────── */
.site-footer {
  background: var(--charcoal);
  color: rgba(255,255,255,0.6);
  padding: var(--s8) var(--s4) var(--s4);
}

.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto var(--s6);
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: var(--s8);
}

.site-footer h3 {
  color: rgba(255,255,255,0.4);
  font-size: 11px;
  margin-bottom: var(--s2);
}

.site-footer address,
.site-footer p,
.site-footer li {
  font-size: 14px;
  line-height: 1.9;
}

.site-footer a {
  color: rgba(255,255,255,0.7);
  transition: color 0.2s;
}

.site-footer a:hover { color: var(--white); }

.site-footer ul { display: flex; flex-direction: column; gap: 2px; }

.footer-copy {
  max-width: var(--max-w);
  margin: 0 auto;
  font-size: 12px;
  color: rgba(255,255,255,0.25);
  text-align: center;
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: var(--s3);
}


/* ─── Responsive ─────────────────────────────────────────────── */

/* Tablety (≤ 1024px) – zúžené buňky, ale stále 2 sloupce */
@media (max-width: 1024px) {
  .hero__content { padding: var(--s6) var(--s4) var(--s8); }
  .grid-cell--text { padding: var(--s6); }
  .wide-photo { height: 360px; }
}

/* Mobilní zařízení (≤ 600px) – vše na 1 sloupec */
@media (max-width: 600px) {
  :root { --s8: 48px; }

  .main-nav {
    gap: var(--s2);
    padding: var(--s2);
    justify-content: center;
    flex-wrap: wrap;
  }

  .main-nav a { font-size: 11px; }

  .hero { height: 100svh; min-height: 500px; }
  .hero__content { padding: var(--s4) var(--s3) var(--s8); }

  /* Grid sekce na 1 sloupec – foto nahoře, text dole */
  .grid-section {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  /* Foto vždy nahoře bez ohledu na pořadí v HTML */
  .grid-section--img-right .grid-cell--img { order: -1; }

  .grid-cell--img { min-height: 300px; position: relative; }
  .grid-cell--img .img-mock { position: absolute; inset: 0; min-height: unset; }

  .grid-cell--text { padding: var(--s6) var(--s4); }
  
  .grid-cell--img,
    .grid-cell--text {
      aspect-ratio: 1 / 1;  /* ← přesný čtverec */
    }

  .wide-photo { height: 240px; }

  /* Kontakt */
  .kontakt-section { padding: var(--s8) var(--s3); }

  .form-row {
    grid-template-columns: 1fr;
    gap: var(--s2);
  }

  .form-footer {
    flex-direction: column;
    align-items: stretch;
  }

  .btn--submit { width: 100%; }

  /* Footer */
  .footer-inner {
    grid-template-columns: 1fr;
    gap: var(--s4);
  }

  /* Obchod */
  .obchod-links { flex-direction: column; }
  .obchod-links .btn { text-align: center; }
}

/* Velmi malé telefony (≤ 400px) */
@media (max-width: 400px) {
  .main-nav { gap: var(--s1); }
  .main-nav a { font-size: 10px; letter-spacing: 0.03em; }
  .main-nav .nav-cta { padding: var(--s1) var(--s2); }
}
