/* ============================================================
   Vinarija Karić — implementation of "Vinarija Karic.dc.html"
   Palette / type ported 1:1 from the Claude Design source.
   ============================================================ */

:root {
  --bg:        #0e0c09;
  --bg-2:      #0b0906;
  --card:      #14110c;
  --text:      #ece5d8;
  --muted:     #b8afa0;
  --muted-2:   #9a9184;
  --gold:      #c9a05a;
  --gold-hi:   #e0bd7e;
  --gold-deep: #d9b06a;
  --idle:      #cfc7b8;
  --blue:      #24408e;
  --blue-2:    #4a66b0;
  --red:       #a41623;
  --error:     #c96a5a;
  --placeholder:#6f675a;
  --serif: 'Cormorant Garamond', Georgia, serif;
  --sans:  'Jost', system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--bg); }
body { font-family: var(--sans); color: var(--text); -webkit-font-smoothing: antialiased; }
a { color: var(--gold); text-decoration: none; }
a:hover { color: var(--gold-hi); }
input, textarea { font-family: var(--sans); }
::placeholder { color: var(--placeholder); }
img { max-width: 100%; }

.app { min-height: 100vh; display: flex; flex-direction: column; background: var(--bg); }
.wrap { max-width: 1280px; margin: 0 auto; }
.hidden { display: none !important; }

/* ---------- image-slot (with graceful placeholder fallback) ---------- */
.imgslot { position: relative; overflow: hidden; display: block; background: #100d09; }
.imgslot img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; display: block;
}
.imgslot.contain img { object-fit: contain; }
.imgslot .ph {
  position: absolute; inset: 0; display: none;
  align-items: center; justify-content: center; text-align: center;
  padding: 18px; color: var(--placeholder); font-weight: 300; font-size: 14px;
  letter-spacing: .5px; line-height: 1.5;
  border: 1px dashed rgba(201,160,90,0.22);
  background:
    repeating-linear-gradient(45deg, rgba(201,160,90,0.03) 0 12px, transparent 12px 24px),
    #14110c;
}
.imgslot.no-img img { display: none; }
.imgslot.no-img .ph { display: flex; }

/* ---------- header ---------- */
.header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(14,12,9,0.96);
  border-bottom: 1px solid rgba(201,160,90,0.15);
  backdrop-filter: blur(6px);
}
.header-inner {
  padding: 14px 32px; display: flex; align-items: center;
  justify-content: space-between; gap: 24px;
}
.brand { display: flex; align-items: center; gap: 14px; cursor: pointer; }
.brand .crest { width: 44px; height: 44px; }
.brand-name {
  font-family: var(--serif); font-size: 20px; letter-spacing: 5px;
  line-height: 1.25; color: var(--text);
}
.nav { display: flex; align-items: center; gap: 36px; font-size: 13px; letter-spacing: 3px; }
.nav span { cursor: pointer; color: var(--idle); transition: color .25s ease; }
.nav span:hover { color: var(--gold-hi); }
.nav span.active { color: var(--gold); }

/* hamburger toggle — hidden on desktop, shown on mobile */
.nav-toggle {
  display: none; flex-direction: column; justify-content: center; gap: 5px;
  width: 42px; height: 42px; padding: 9px; margin: -9px -9px -9px 0;
  background: none; border: 0; cursor: pointer;
}
.nav-toggle span {
  display: block; height: 1.5px; width: 100%; background: var(--gold);
  transition: transform .3s ease, opacity .2s ease;
}
.header.menu-open .nav-toggle span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.header.menu-open .nav-toggle span:nth-child(2) { opacity: 0; }
.header.menu-open .nav-toggle span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* ---------- hero ---------- */
.hero { position: relative; height: 92vh; min-height: 600px; overflow: hidden; }
#hero-parallax { position: absolute; left: 0; right: 0; top: -14%; height: 128%; will-change: transform; }
.hero-overlay {
  position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(14,12,9,0.35) 0%, rgba(14,12,9,0.05) 40%, rgba(14,12,9,0.72) 100%);
}
.hero-content {
  position: absolute; left: 0; right: 0; bottom: 9%;
  display: flex; flex-direction: column; align-items: center; gap: 26px;
  text-align: center; pointer-events: none;
}
.hero-content h1 {
  font-family: var(--serif); font-weight: 500; font-size: clamp(40px, 5vw, 68px);
  margin: 0; color: #f3ecdd; text-shadow: 0 2px 24px rgba(0,0,0,0.45);
}
.hero-content h1 em { color: var(--gold-deep); }
.hero-source {
  font-size: 14px; letter-spacing: 4px; color: var(--gold); text-align: right;
  font-family: var(--sans); font-style: normal; margin-top: 14px;
}
.hero-btn {
  pointer-events: auto; border: 1px solid var(--gold); background: rgba(14,12,9,0.35);
  color: var(--gold-hi); padding: 16px 40px; font-size: 14px; letter-spacing: 5px;
  cursor: pointer; font-family: var(--sans); transition: background .25s ease;
}
.hero-btn:hover { background: rgba(201,160,90,0.25); }

/* ---------- generic section bits ---------- */
.section-pad { padding: 80px 32px; }
.divider { padding: 0 32px; }
.divider > div { height: 1px; background: rgba(201,160,90,0.15); }
.frame { border: 1px solid rgba(201,160,90,0.2); padding: 14px; background: var(--card); }
.h2 { font-family: var(--serif); font-weight: 500; margin: 0; }
.flag-bars { display: flex; gap: 8px; }
.flag-bars > div { width: 48px; height: 2px; }
.flag-bars .b-blue { background: var(--blue); }
.flag-bars .b-white { background: rgba(236,229,216,0.55); }
.flag-bars .b-red { background: var(--red); }

/* ---------- adria section ---------- */
.grid-2 {
  display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr);
  gap: 60px; align-items: center;
}
.adria .h2 { font-size: 54px; }
.adria .lead { font-weight: 300; font-size: 17px; color: var(--muted); margin: 0 0 36px; line-height: 1.6; }
.wine-card {
  border: 1px solid rgba(201,160,90,0.25); padding: 26px 28px; position: relative;
  cursor: pointer; transition: background .25s ease;
}
.wine-card:hover { background: rgba(201,160,90,0.07); }
.wine-card .accent { position: absolute; left: 0; top: 0; bottom: 0; width: 3px; }
.wine-card .accent.blue { background: var(--blue-2); }
.wine-card .accent.red { background: var(--red); }
.wine-card .row { display: flex; justify-content: space-between; align-items: center; gap: 18px; }
.wine-card .name { font-family: var(--serif); font-size: 30px; }
.wine-card .comp { font-family: var(--serif); font-style: italic; font-size: 17px; color: var(--muted-2); margin-top: 6px; }
.wine-card .more { color: var(--gold); letter-spacing: 3px; font-size: 13px; white-space: nowrap; }

/* ---------- vinarija (prose) ---------- */
.prose { max-width: 960px; margin: 0 auto; text-align: center; }
.prose .h2 { font-size: 48px; margin: 0 0 44px; }
.prose p { font-weight: 300; font-size: 18px; line-height: 1.8; color: var(--muted); text-align: left; }
.prose p + p { margin-top: 26px; }

/* ---------- vinar ---------- */
.vinar .h2 { font-size: 52px; line-height: 1.15; margin: 0 0 30px; }
.vinar .h2 em { color: var(--gold-deep); }
.vinar p { font-weight: 300; font-size: 18px; line-height: 1.75; color: var(--muted); margin: 0 0 22px; }
.vinar p:last-child { margin-bottom: 0; }
.mirror { transform: scaleX(-1); }

/* ---------- kontakt ---------- */
.kontakt .head { text-align: center; margin-bottom: 64px; }
.kontakt .head .h2 { font-size: 54px; }
.kontakt .head .h2 em { color: var(--gold-deep); }
.kontakt .grid-2 { align-items: stretch; }
.kontakt iframe { width: 100%; aspect-ratio: 1; border: 0; display: block; filter: grayscale(0.35) contrast(0.95); }
.form-col { display: flex; flex-direction: column; justify-content: center; }
.form { display: flex; flex-direction: column; gap: 28px; }
.field-row { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 28px; }
.field label { display: block; letter-spacing: 3px; font-size: 13px; color: var(--muted); margin-bottom: 10px; }
.field input, .field textarea {
  width: 100%; background: rgba(20,17,12,0.6); border: 1px solid rgba(201,160,90,0.35);
  color: var(--text); font-size: 17px; font-weight: 300; padding: 14px 16px; outline: none;
}
.field textarea { resize: vertical; }
.field input:focus, .field textarea:focus { border: 1px solid var(--gold); }
.field .err { color: var(--error); font-size: 13px; margin-top: 6px; min-height: 16px; }
.btn-send {
  background: none; border: 1px solid var(--gold); color: var(--gold);
  letter-spacing: 5px; font-size: 14px; padding: 20px; cursor: pointer;
  font-family: var(--sans); transition: background .25s ease;
}
.btn-send:hover { background: rgba(201,160,90,0.12); }
.form-ok { border: 1px solid var(--gold); padding: 36px; text-align: center; }
.form-ok .t { font-family: var(--serif); font-size: 28px; color: var(--gold-deep); margin-bottom: 10px; }
.form-ok .s { font-weight: 300; color: var(--muted); }

/* ---------- footer ---------- */
.footer { margin-top: auto; background: var(--bg-2); border-top: 1px solid rgba(201,160,90,0.15); }
.footer-inner { padding: 56px 32px 32px; text-align: center; }
.footer .crest { width: 56px; height: 64px; margin: 0 auto; }
.footer .name { font-family: var(--serif); font-size: 20px; letter-spacing: 6px; color: var(--text); margin: 16px 0 30px; }
.footer .fnav { display: flex; gap: 36px; justify-content: center; flex-wrap: wrap; font-size: 13px; letter-spacing: 3px; color: var(--muted); margin-bottom: 26px; }
.footer .fnav span { cursor: pointer; transition: color .25s ease; }
.footer .fnav span:hover { color: var(--gold-hi); }
.footer .contact { font-weight: 300; color: var(--muted-2); font-size: 15px; }
.footer .flag-bars { justify-content: center; margin: 30px 0 26px; }
.footer .flag-bars > div { width: 36px; }
.footer .flag-bars .b-white { background: rgba(236,229,216,0.4); }
.footer .copy { color: #7d7466; font-weight: 300; font-size: 14px; }

/* ---------- detail page (light) ---------- */
.detail { background: #faf7f1; color: #221d16; }
.detail-inner { padding: 44px 32px 90px; }
.crumb { font-size: 13px; letter-spacing: 3px; margin-bottom: 36px; }
.crumb .link { color: #8a6a33; cursor: pointer; }
.crumb .link:hover { color: #b08a4a; }
.crumb .sep { color: #b0a793; margin: 0 10px; }
.detail-hero {
  background: #f1ebe0; display: grid;
  grid-template-columns: minmax(300px,480px) minmax(0,1fr);
  gap: 40px; padding: 56px 64px; align-items: center;
}
.detail-hero .bottle { width: 100%; height: 560px; background: transparent; }
.detail-hero .kicker { letter-spacing: 5px; font-size: 13px; margin-bottom: 18px; }
.detail-hero h1 { font-family: var(--serif); font-weight: 500; font-size: 70px; margin: 0; line-height: 1; }
.detail-hero .sub { font-family: var(--serif); font-style: italic; font-size: 25px; color: #6d6455; margin: 16px 0 28px; }
.detail-hero .sastav { font-family: var(--serif); font-style: italic; font-size: 20px; color: #4d463b; max-width: 460px; line-height: 1.5; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); border-bottom: 1px solid #d8cfbd; }
.stats .cell { padding: 30px; border-right: 1px solid #d8cfbd; }
.stats .cell:first-child { padding-left: 0; }
.stats .cell:last-child { border-right: 0; }
.stats .lab { letter-spacing: 3px; font-size: 12px; color: #9a9080; margin-bottom: 6px; }
.stats .val { font-family: var(--serif); font-size: 30px; }
.detail-body { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 60px; padding-top: 52px; }
.detail-body .lab { letter-spacing: 4px; font-size: 13px; color: #8a6a33; margin-bottom: 16px; }
.detail-body .lab.mt { margin: 30px 0 12px; }
.detail-body p { font-weight: 300; font-size: 16px; line-height: 1.75; color: #4d463b; margin: 0; }
.detail-body p.mb { margin-bottom: 28px; }
.detail-body .note { font-family: var(--serif); font-style: italic; font-size: 19px; color: #4d463b; }

/* ---------- reveal animation base ---------- */
[data-reveal] { will-change: opacity, transform; }

/* ============================================================
   Responsive
   ============================================================ */

/* Tablet / small-desktop: single-column layouts */
@media (max-width: 960px) {
  .section-pad { padding: 60px 24px; }
  .divider { padding: 0 24px; }
  .grid-2 { grid-template-columns: 1fr; gap: 40px; }
  .field-row { grid-template-columns: 1fr; gap: 20px; }
  /* stack the winemaker image above the text for reading order */
  .vinar { display: flex; flex-direction: column-reverse; }
  .detail-inner { padding: 32px 24px 64px; }
  .detail-hero { grid-template-columns: 1fr; padding: 36px 32px; gap: 28px; }
  .detail-hero .bottle { height: 420px; }
  .detail-hero h1 { font-size: 56px; }
  .prose .h2 { font-size: 36px; }
  .adria .h2, .kontakt .head .h2 { font-size: 40px; }
  .vinar .h2 { font-size: 40px; }
}

/* Mobile: hamburger nav + tighter type */
@media (max-width: 820px) {
  .header-inner { padding: 14px 20px; }
  .nav-toggle { display: flex; }
  .nav {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: rgba(11,9,6,0.98); border-bottom: 1px solid rgba(201,160,90,0.15);
    backdrop-filter: blur(8px);
    max-height: 0; overflow: hidden; opacity: 0;
    transition: max-height .32s ease, opacity .2s ease;
  }
  .header.menu-open .nav { max-height: 340px; opacity: 1; }
  .nav span {
    padding: 16px 24px; font-size: 13px; letter-spacing: 3px;
    border-top: 1px solid rgba(201,160,90,0.08);
  }
  .nav span:first-child { border-top: 0; }
}

/* Phones */
@media (max-width: 560px) {
  .header-inner { padding: 12px 18px; }
  .brand .crest { width: 38px; height: 38px; }
  .brand-name { font-size: 17px; letter-spacing: 4px; }

  .hero { height: 88vh; min-height: 520px; }
  .hero-content { bottom: 8%; gap: 20px; padding: 0 22px; }
  .hero-content h1 { font-size: clamp(27px, 8.2vw, 40px); line-height: 1.15; overflow-wrap: break-word; }
  .hero-source { font-size: 12px; letter-spacing: 3px; margin-top: 10px; }
  .hero-btn { padding: 14px 30px; font-size: 12px; letter-spacing: 4px; }

  .section-pad { padding: 48px 20px; }
  .divider { padding: 0 20px; }
  .frame { padding: 10px; }

  .adria .h2 { font-size: 34px; }
  .adria .lead { font-size: 16px; margin-bottom: 28px; }
  .wine-card { padding: 20px 20px 20px 22px; }
  .wine-card .row { flex-direction: column; align-items: flex-start; gap: 12px; }
  .wine-card .name { font-size: 26px; }
  .wine-card .comp { font-size: 15px; }

  .prose .h2 { font-size: 28px; margin-bottom: 28px; }
  .prose p { font-size: 16px; line-height: 1.7; }
  .vinar .h2 { font-size: 32px; }
  .vinar p { font-size: 16px; }

  .kontakt .head { margin-bottom: 40px; }
  .kontakt .head .h2 { font-size: 30px; }
  .field input, .field textarea { font-size: 16px; } /* 16px avoids iOS zoom-on-focus */
  .btn-send { padding: 18px; letter-spacing: 4px; }

  .detail-inner { padding: 28px 18px 56px; }
  .detail-hero { padding: 28px 20px; gap: 22px; }
  .detail-hero .bottle { height: 340px; }
  .detail-hero .kicker { letter-spacing: 4px; margin-bottom: 12px; }
  .detail-hero h1 { font-size: 44px; }
  .detail-hero .sub { font-size: 21px; margin: 12px 0 20px; }
  .detail-hero .sastav { font-size: 18px; }
  .stats { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .stats .cell { padding: 20px; }
  .stats .cell:nth-child(odd) { padding-left: 0; }
  .stats .cell:nth-child(2) { border-right: 0; }
  .stats .cell:nth-child(3), .stats .cell:nth-child(4) { border-top: 1px solid #d8cfbd; }
  .stats .val { font-size: 26px; }
  .detail-body { grid-template-columns: 1fr; gap: 32px; padding-top: 40px; }

  .footer-inner { padding: 48px 20px 28px; }
  .footer .fnav { gap: 18px 22px; }
  .footer .contact { font-size: 13px; line-height: 1.7; }
}
