/* ============================================================
   Pinar & Jarno Wedding — site styles
   Built on the wedding-design-style skill (drop-in base) and
   extended for navigation, language switcher, gifts grid, map.
   ============================================================ */

:root {
  /* Palette */
  --pj-paper:        #ffffff;
  --pj-paper-warm:   #fbf9f4;
  --pj-ink:          #282828;
  --pj-gold-frame:   #e0d2a8;
  --pj-gold-script:  #c1a44f;
  --pj-gold-deep:    #a67c00;
  --pj-sage:         #7c9171;

  /* Type */
  --pj-serif:  'Cormorant Garamond', 'EB Garamond', Garamond, Georgia, serif;
  --pj-script: 'Great Vibes', 'Edwardian Script ITC', 'Monotype Corsiva', cursive;

  /* Tracking */
  --pj-tracking-caps: 0.2em;
  --pj-tracking-body: 0.02em;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--pj-paper);
  color: var(--pj-ink);
  font-family: var(--pj-serif);
  font-weight: 300;
  line-height: 1.6;
  letter-spacing: var(--pj-tracking-body);
  font-size: 18px;
}

h1, h2, h3, h4, .caps {
  font-family: var(--pj-serif);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: var(--pj-tracking-caps);
  text-align: center;
  margin: 1em 0 0.6em;
}

h1 { font-size: clamp(1.25rem, 3vw, 1.75rem); }
h2 { font-size: clamp(1.1rem, 2.4vw, 1.4rem); }

p { margin: 0.6em 0; }

a { color: var(--pj-ink); text-decoration: none; }

/* --- Focal script --- */
.script {
  font-family: var(--pj-script);
  font-weight: 400;
  color: var(--pj-gold-script);
  font-size: clamp(4rem, 12vw, 9rem);
  line-height: 0.95;
  text-align: center;
  margin: 0.4em 0;
}
.script .amp {
  display: inline-block;
  font-size: 0.6em;
  vertical-align: middle;
  padding: 0 0.1em;
}

/* --- Gold accents --- */
.gold        { color: var(--pj-gold-deep); }
.gold-script { color: var(--pj-gold-script); }
.gold-soft   { color: var(--pj-gold-frame); }

/* --- The signature frame --- */
.frame {
  position: relative;
  min-height: 100vh;
  padding: clamp(1rem, 3.5vh, 2.5rem) clamp(1.5rem, 5vw, 4rem);
  background: var(--pj-paper);
}
.frame::before {
  content: "";
  position: absolute;
  inset: clamp(0.75rem, 2vh, 1.5rem);
  border: 2px solid var(--pj-gold-frame);
  pointer-events: none;
}
.frame-inner {
  position: relative;
  z-index: 1;
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
  padding: clamp(2rem, 6vw, 4rem) clamp(1rem, 4vw, 2rem);
}

/* --- Top bar inside the frame: nav + language switcher --- */
.topbar {
  position: relative;
  z-index: 2;
  max-width: 960px;
  margin: 0 auto clamp(1rem, 3vw, 2rem);
  padding: 0 clamp(0.5rem, 2vw, 1rem);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}
.nav {
  display: flex;
  gap: clamp(1rem, 3vw, 2rem);
  flex-wrap: wrap;
}
.nav a {
  text-transform: uppercase;
  letter-spacing: var(--pj-tracking-caps);
  font-size: 0.98rem;
  position: relative;
  padding-bottom: 2px;
}
.nav a.active::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  border-bottom: 1px solid var(--pj-gold-frame);
}
.nav a:hover { color: var(--pj-gold-deep); }

.lang-switch {
  display: flex;
  gap: 0.4rem;
  align-items: center;
  font-size: 0.8rem;
  letter-spacing: var(--pj-tracking-caps);
  text-transform: uppercase;
}
.lang-switch button {
  background: transparent;
  border: none;
  font: inherit;
  color: var(--pj-ink);
  letter-spacing: inherit;
  text-transform: inherit;
  cursor: pointer;
  padding: 0.2rem 0.4rem;
  opacity: 0.55;
}
.lang-switch button.active {
  opacity: 1;
  color: var(--pj-gold-deep);
}
.lang-switch .sep {
  color: var(--pj-gold-frame);
}

/* --- Thin gold horizontal rule --- */
.rule {
  width: 4rem;
  border: 0;
  border-top: 1.5px solid var(--pj-gold-frame);
  margin: 1.5rem auto;
}

/* --- Subpage script masthead (echoes the home page) --- */
.page-masthead {
  max-width: 720px;
  margin: 0 auto clamp(1.5rem, 4vw, 2.5rem);
  text-align: center;
}
.page-masthead .script {
  font-size: clamp(2.75rem, 8vw, 5rem);
  line-height: 1;
  margin: 0;
}
.page-masthead .script .amp { font-size: 0.55em; }
.page-masthead .rule { margin: clamp(0.75rem, 2vw, 1.25rem) auto 0; }

/* Give subpages the same airy top rhythm and width as home */
.subpage .frame-inner {
  max-width: 720px;
  padding-top: clamp(1.5rem, 5vh, 3rem);
}
.subpage .frame-inner > h1:first-of-type { margin-top: 0; }

/* Subpages (Programme + Gift list): shared compact masthead + intro */
.subpage .frame-inner { padding-top: clamp(0.75rem, 3vh, 2rem); }
.subpage .page-masthead { margin-bottom: clamp(0.5rem, 2vh, 1.25rem); }
.subpage .page-masthead .script { font-size: clamp(2.25rem, 6vh, 3.75rem); }
.subpage .page-masthead .rule { margin-top: clamp(0.4rem, 1.2vh, 0.9rem); }
.subpage .invite-intro,
.subpage .gift-intro {
  font-size: clamp(0.9rem, 1.9vh, 1.1rem);
  margin: clamp(0.4rem, 1.2vh, 0.9rem) auto;
  max-width: 540px;
}

/* Programme / Timeline & Inspiration page */
.programme .frame-inner { max-width: 960px; }
.programme .timeline { max-width: 900px; padding: clamp(0.4rem, 1.5vh, 1.25rem) 0; }
.programme .timeline-item { margin: clamp(1.25rem, 3vh, 2.5rem) 0; }

/* Walk-in / doors-close note at the top of the timeline */
.timeline-note {
  text-align: center;
  margin: clamp(0.75rem, 2vh, 1.5rem) auto clamp(0.25rem, 1vh, 0.75rem);
}
.timeline-note {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.timeline-note p {
  margin: 0.25rem 0;
  text-transform: none;
  letter-spacing: var(--pj-tracking-body);
}
.timeline-note .time { margin-right: 0.5rem; }
.timeline-note .note-line {
  display: block;
  height: 22px;
  border-left: 1.5px dashed var(--pj-sage);
  margin: 0.15rem 0;
}

/* Inspiration photos beside each event (in the column opposite the text) */
.timeline-item .insp {
  display: flex;
  flex-direction: column;
  gap: clamp(0.5rem, 1.5vw, 0.85rem);
}
.timeline-item.right .insp { align-items: flex-end; }
.timeline-item.left .insp { align-items: flex-start; }
.timeline-item .insp img {
  max-width: 200px;
  max-height: 200px;
  width: auto;
  height: auto;
  display: block;
  border: 1px solid var(--pj-gold-frame);
  padding: 4px;
  background: var(--pj-paper);
}

@media (max-width: 640px) {
  /* On phones: stack each event with the text first, photos underneath */
  .programme .timeline-item.has-insp {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.75rem;
  }
  .programme .timeline-item.has-insp::after { display: none; }
  .programme .timeline-item.has-insp .icon { order: 1; }
  .programme .timeline-item.has-insp .text { order: 2; }
  .programme .timeline-item.has-insp .insp { order: 3; }
  .programme .timeline-item .insp {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    align-items: flex-start;
  }
  .programme .timeline-item .insp img { width: min(46%, 200px); }
}

/* Gift list page: centered, fits one screen */
.gifts .frame {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100svh;
}
.gifts .frame-inner {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
}
.gifts .gift-intro { max-width: 560px; }
.gift-cta {
  display: inline-block;
  margin-top: clamp(1.25rem, 3vh, 2rem);
  padding: 0.75rem 1.75rem;
  border: 1.5px solid var(--pj-gold-deep);
  color: var(--pj-gold-deep);
  text-transform: uppercase;
  letter-spacing: var(--pj-tracking-caps);
  font-size: 0.9rem;
  transition: background 0.2s ease, color 0.2s ease;
}
.gift-cta:hover {
  background: var(--pj-gold-deep);
  color: var(--pj-paper);
}

/* Contact details page */
.contact-block {
  max-width: 540px;
  margin: clamp(1.5rem, 4vh, 2.5rem) auto 0;
  text-align: center;
}
.contact-block h2 {
  font-size: 1.1rem;
  margin-bottom: 0.4rem;
}
.contact-block p {
  font-size: clamp(1rem, 1.9vh, 1.15rem);
  margin: 0;
}

/* --- Home page details block --- */
.invite-intro {
  font-size: clamp(1rem, 2vw, 1.25rem);
  letter-spacing: var(--pj-tracking-caps);
  text-transform: uppercase;
  line-height: 1.5;
}
.invite-meta {
  font-size: clamp(1.1rem, 2.2vw, 1.4rem);
  letter-spacing: 0.15em;
  margin-top: 2rem;
  line-height: 1.9;
}
.invite-address {
  font-size: clamp(0.95rem, 1.8vw, 1.15rem);
  letter-spacing: var(--pj-tracking-caps);
  text-transform: uppercase;
  margin-top: 2rem;
}
.ornament {
  display: block;
  margin: 2rem auto 0;
  width: clamp(120px, 18vw, 170px);
  height: auto;
}
.ornament img { display: block; width: 100%; height: auto; }

/* --- Home page hero: the invitation fills the first screen --- */
.home .frame-inner { max-width: 1500px; }
.home .section:not(.venue-section) { max-width: 640px; }
.home .hero {
  min-height: calc(100vh - 9rem);
  min-height: calc(100svh - 9rem);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  gap: clamp(0.2rem, 1vh, 0.6rem);
}
.home .hero > * { margin-top: 0; margin-bottom: 0; }
.home .hero h1 { font-size: clamp(1rem, 2.4vh, 1.5rem); }
.home .hero .script {
  font-size: clamp(3rem, 11vh, 7rem);
  margin: 0;
}
.home .hero .ornament {
  width: clamp(88px, 12vh, 120px);
  margin: clamp(0.5rem, 1.5vh, 1.25rem) auto 0;
}
.home .hero .invite-meta { margin-top: clamp(0.4rem, 1.5vh, 1rem); }
.home .hero .rule { margin: clamp(0.5rem, 1.5vh, 1.25rem) auto; }

/* --- Venue with photos flanking the text --- */
.home .venue-section { max-width: 100%; width: 100%; }
.venue-grid {
  display: grid;
  grid-template-columns: 1fr minmax(0, 600px) 1fr;
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: start;
  margin-top: 1.5rem;
}
.venue-photos {
  display: flex;
  flex-direction: column;
  gap: clamp(0.75rem, 2vw, 1.5rem);
}
.venue-photos img {
  width: 100%;
  height: auto;
  display: block;
  border: 1px solid var(--pj-gold-frame);
  padding: 5px;
  background: var(--pj-paper);
}
.venue-text { text-align: center; }
.venue-text .map-wrap { margin-top: 1.25rem; }

@media (max-width: 760px) {
  .venue-grid { grid-template-columns: 1fr; }
  .venue-photos {
    flex-direction: row;
  }
  .venue-photos img { width: 50%; }
  .venue-text { order: -1; }
}

/* --- Dashed sage timeline --- */
.timeline {
  position: relative;
  padding: 2rem 0;
  margin: 0 auto;
  max-width: 560px;
}
.timeline::before {
  content: "";
  position: absolute;
  top: 0; bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  border-left: 1.5px dashed var(--pj-sage);
}
.timeline-item {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: clamp(1rem, 3vw, 1.75rem);
  margin: 2rem 0;
  position: relative;
}
/* Dashed connector from spine to icon */
.timeline-item::after {
  content: "";
  position: absolute;
  top: 50%;
  left: calc(50% - 28px);
  width: 28px;
  border-top: 1.5px dashed var(--pj-sage);
}
.timeline-item.right::after {
  left: 50%;
}
.timeline-item .icon {
  width: 58px; height: 58px;
  display: grid; place-items: center;
  background: var(--pj-paper);
  position: relative;
  z-index: 1;
}
.timeline-item .icon svg {
  width: 100%;
  height: 100%;
  stroke: var(--pj-ink);
  fill: none;
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.timeline-item .icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.timeline .time,
.timeline-note .time {
  color: var(--pj-gold-deep);
  font-size: clamp(1.45rem, 2.4vw, 1.75rem);
  letter-spacing: 0.05em;
  line-height: 1.2;
}
.timeline .label,
.timeline-note .label {
  font-size: clamp(1.2rem, 2vw, 1.4rem);
  color: var(--pj-ink);
  line-height: 1.2;
}
.timeline-item.left  > .text { text-align: right; }
.timeline-item.left  > .spacer { visibility: hidden; }
.timeline-item.right > .spacer { visibility: hidden; }
.timeline-item.right > .text { text-align: left; }

/* --- Section spacing on long pages --- */
.section {
  margin: clamp(3rem, 6vw, 5rem) auto 0;
  max-width: 640px;
}
.section h2 + .rule { margin-top: 0.4rem; }
.section p { text-align: center; }

/* --- Map embed --- */
.map-wrap {
  margin: 1.5rem auto 0;
  border: 1.5px solid var(--pj-gold-frame);
  padding: 6px;
  background: var(--pj-paper);
}
.map-wrap iframe {
  display: block;
  width: 100%;
  height: 320px;
  border: 0;
}

/* --- Gifts grid --- */
.gift-intro {
  max-width: 540px;
  margin: 0 auto 2rem;
  text-align: center;
  font-size: 1.05rem;
}

.claimer-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin: 0 auto 2rem;
  max-width: 540px;
}
.claimer-row label {
  font-size: 0.85rem;
  letter-spacing: var(--pj-tracking-caps);
  text-transform: uppercase;
  color: var(--pj-ink);
  opacity: 0.7;
}
.claimer-row input {
  font: inherit;
  font-size: 1rem;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--pj-gold-frame);
  background: var(--pj-paper);
  color: var(--pj-ink);
  min-width: 200px;
  letter-spacing: var(--pj-tracking-body);
}
.claimer-row input:focus {
  outline: none;
  border-color: var(--pj-gold-deep);
}

.gift-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: clamp(1rem, 2vw, 1.5rem);
  max-width: 880px;
  margin: 0 auto;
}
.gift-card {
  border: 1.5px solid var(--pj-gold-frame);
  padding: 1.25rem 1.25rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  background: var(--pj-paper);
  transition: opacity 0.25s ease;
}
.gift-card .name {
  font-size: 1.2rem;
  letter-spacing: 0.04em;
  font-weight: 400;
  color: var(--pj-ink);
}
.gift-card .desc {
  font-size: 0.95rem;
  color: var(--pj-ink);
  opacity: 0.75;
  flex-grow: 1;
}
.gift-card .price {
  font-size: 0.85rem;
  letter-spacing: var(--pj-tracking-caps);
  text-transform: uppercase;
  color: var(--pj-gold-deep);
}
.gift-card .claimed-by {
  font-size: 0.85rem;
  color: var(--pj-sage);
  font-style: italic;
  letter-spacing: var(--pj-tracking-body);
}
.gift-card .claim-btn {
  background: transparent;
  border: 1px solid var(--pj-gold-frame);
  font: inherit;
  font-size: 0.85rem;
  letter-spacing: var(--pj-tracking-caps);
  text-transform: uppercase;
  padding: 0.55rem 0.75rem;
  color: var(--pj-gold-deep);
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}
.gift-card .claim-btn:hover:not(:disabled) {
  background: var(--pj-gold-frame);
  color: var(--pj-ink);
}
.gift-card .claim-btn:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

/* Claimed state: strike through name + desc, dim card */
.gift-card.claimed {
  opacity: 0.6;
}
.gift-card.claimed .name,
.gift-card.claimed .desc,
.gift-card.claimed .price {
  text-decoration: line-through;
  text-decoration-color: var(--pj-gold-deep);
  text-decoration-thickness: 1px;
}
.gift-card.mine .claim-btn {
  color: var(--pj-ink);
  border-color: var(--pj-ink);
}

.gift-status {
  text-align: center;
  margin: 1.5rem auto;
  font-size: 0.95rem;
  color: var(--pj-sage);
  min-height: 1.4em;
}
.gift-status.error { color: #b04545; }

/* --- Utility --- */
.center { text-align: center; }
.muted  { opacity: 0.7; }
.spacer { height: 2rem; }

/* --- Small screens --- */
@media (max-width: 560px) {
  body { font-size: 17px; }
  .topbar { flex-direction: column; }
  .timeline-item { gap: 0.75rem; }
  .timeline-item .icon { width: 50px; height: 50px; }
}

@media (max-width: 420px) {
  .frame { padding: 1rem; }
  .frame::before { inset: 0.75rem; }
  .frame-inner { padding: 2rem 0.5rem; }
}
