/* ===========================================================================
   Laura & Philipp — wedding site theme
   Palette drawn from the invitation: ivory paper, eucalyptus sage, gold rings.
   =========================================================================== */

:root {
  --paper:      #f5f1e8;
  --paper-2:    #faf7f0;
  --card:       #fffdf8;
  --sage:       #7e8c6a;
  --sage-mid:   #61704c;
  --sage-deep:  #4a5538;
  --sage-ink:   #3c4530;
  --gold:       #c2a063;
  --gold-deep:  #a8843f;
  --ink:        #3a382f;
  --muted:      #8c897b;
  --line:       #e4ddcc;

  --serif: "Cormorant Garamond", Georgia, serif;
  --script: "Great Vibes", cursive;
  --sans: "Montserrat", system-ui, sans-serif;

  --shadow: 0 18px 50px -28px rgba(60, 69, 48, .45);
  --radius: 16px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background-color: var(--paper);
  background-image:
    radial-gradient(circle at 20% 0%, rgba(126,140,106,.06), transparent 45%),
    radial-gradient(circle at 100% 100%, rgba(126,140,106,.07), transparent 40%);
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
}

h1, h2 { font-family: var(--serif); font-weight: 500; letter-spacing: .02em; }

a { color: inherit; }

.btn {
  font-family: var(--sans);
  font-size: .82rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #fff;
  background: var(--sage-mid);
  border: none;
  border-radius: 999px;
  padding: .85rem 1.7rem;
  cursor: pointer;
  transition: background .18s ease, transform .18s ease;
}
.btn:hover { background: var(--sage-deep); }
.btn:active { transform: translateY(1px); }
.btn-block { width: 100%; }
.btn:disabled { opacity: .55; cursor: default; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); border: 0;
}

/* --- Navigation ----------------------------------------------------------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(250, 247, 240, .86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  max-width: 1080px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: .65rem 1.4rem;
}
.brand { text-decoration: none; display: flex; align-items: baseline; }
.brand-script {
  font-family: var(--script);
  font-size: 1.85rem;
  color: var(--sage-deep);
  line-height: 1;
}
.nav-links { display: flex; align-items: center; gap: 1.2rem; }
.nav-links a {
  text-decoration: none;
  font-size: .76rem;
  font-weight: 500;
  letter-spacing: .11em;
  text-transform: uppercase;
  color: var(--ink);
  padding: .35rem 0;
  position: relative;
  transition: color .18s ease;
}
.nav-links a::after {
  content: ""; position: absolute; left: 0; right: 100%; bottom: -2px;
  height: 1.5px; background: var(--gold); transition: right .22s ease;
}
.nav-links a:hover { color: var(--sage-deep); }
.nav-links a:hover::after, .nav-links a.is-active::after { right: 0; }
.nav-links a.is-active { color: var(--sage-deep); }
.nav-logout { color: var(--muted) !important; }
.nav-logout::after { display: none; }

.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: .4rem; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--sage-deep); margin: 5px 0; transition: .25s; }

/* --- Page shell ----------------------------------------------------------- */
.page { max-width: 1080px; margin: 0 auto; padding: 3.2rem 1.4rem 4rem; }

.section-head { text-align: center; max-width: 640px; margin: 0 auto 2.6rem; }
.eyebrow {
  font-size: .72rem; letter-spacing: .32em; text-transform: uppercase;
  color: var(--gold-deep); margin: 0 0 .5rem;
}
.section-head h1 { font-size: clamp(2.4rem, 6vw, 3.4rem); margin: 0 0 .6rem; color: var(--sage-deep); }
.lead { color: var(--muted); margin: 0; font-size: 1.02rem; }

/* --- Decorative sprig ----------------------------------------------------- */
.sprig { position: absolute; color: var(--sage); opacity: .5; pointer-events: none; }
.sprig-tl { top: -28px; left: -34px; width: 190px; transform: scaleX(-1) rotate(8deg); }

/* --- Home ----------------------------------------------------------------- */
.home { position: relative; }
.home-figure { margin: 0; text-align: center; }
.home-figure img {
  max-width: 100%; max-height: 76vh; border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.hero {
  position: relative;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: var(--shadow);
  padding: clamp(2.4rem, 6vw, 4.5rem) 1.5rem;
  text-align: center;
  overflow: hidden;
}
.hero-script {
  font-family: var(--script);
  font-size: clamp(2.6rem, 9vw, 4.6rem);
  color: var(--sage-mid);
  margin: 0 0 .4rem;
  line-height: 1;
}
.hero-names {
  display: flex; align-items: center; justify-content: center;
  gap: clamp(.6rem, 3vw, 1.6rem);
  flex-wrap: wrap;
  font-size: clamp(2rem, 8vw, 3.6rem);
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--sage-deep);
  margin: .3rem 0 1rem;
}
.hero-sub { color: var(--ink); font-size: clamp(1.1rem, 3vw, 1.5rem); font-family: var(--serif); margin: 0; }
.hero-date { color: var(--gold-deep); letter-spacing: .2em; text-transform: uppercase; font-size: .8rem; margin-top: 1.4rem; }
.hero-hint { text-align: center; color: var(--muted); font-size: .82rem; margin-top: 1.4rem; }
.hero-hint code { background: var(--paper); padding: .1rem .4rem; border-radius: 6px; }

.rings { display: block; margin: 0 auto; }

/* --- Panels (shared) ------------------------------------------------------ */
.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.6rem;
}
.panel-title {
  font-family: var(--serif); font-size: 1.5rem; color: var(--sage-deep);
  margin: 0 0 .3rem;
}
.panel-sub { color: var(--muted); font-size: .9rem; margin: 0 0 1.1rem; }

/* --- Fotos ---------------------------------------------------------------- */
.fotos-grid { display: grid; grid-template-columns: 1.25fr 1fr; gap: 1.6rem; align-items: start; }

.slide-stage {
  position: relative; aspect-ratio: 4 / 3; width: 100%;
  background: var(--paper); border-radius: 12px; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.slide-stage img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; opacity: 0; transition: opacity .7s ease;
}
.slide-stage img.is-active { opacity: 1; }
.slide-empty { color: var(--muted); font-size: .92rem; padding: 1rem; text-align: center; }
.slide-controls { display: flex; align-items: center; justify-content: center; gap: 1.3rem; margin-top: 1rem; }
.slide-btn {
  width: 42px; height: 42px; border-radius: 50%;
  border: 1px solid var(--line); background: var(--paper-2);
  font-size: 1.4rem; line-height: 1; color: var(--sage-deep); cursor: pointer;
  transition: background .15s, transform .15s;
}
.slide-btn:hover { background: #fff; transform: scale(1.06); }
.slide-count { color: var(--muted); font-size: .85rem; min-width: 54px; text-align: center; letter-spacing: .08em; }

/* --- Upload --------------------------------------------------------------- */
.dropzone {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: .6rem; text-align: center;
  border: 1.5px dashed #c8cdb6; border-radius: 12px;
  padding: 2.2rem 1rem; color: var(--muted); cursor: pointer;
  transition: border-color .2s, background .2s;
  min-height: 160px;
}
.dropzone:hover, .dropzone.is-drag { border-color: var(--sage); background: rgba(126,140,106,.06); color: var(--sage-deep); }
.dz-icon { font-size: 2rem; color: var(--sage); }
.dz-text u { text-decoration-color: var(--gold); }

.upload-list { list-style: none; margin: 1rem 0 0; padding: 0; display: flex; flex-direction: column; gap: .5rem; }
.upload-item {
  display: flex; align-items: center; gap: .7rem;
  font-size: .85rem; padding: .55rem .7rem; border-radius: 9px; background: var(--paper);
}
.upload-item .u-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.upload-item .u-state { font-size: .76rem; letter-spacing: .04em; }
.upload-item.is-ok { background: rgba(126,140,106,.12); }
.upload-item.is-ok .u-state { color: var(--sage-deep); }
.upload-item.is-err { background: rgba(168,90,70,.1); }
.upload-item.is-err .u-state { color: #a8553f; }
.u-spin {
  width: 14px; height: 14px; border-radius: 50%;
  border: 2px solid var(--line); border-top-color: var(--sage);
  animation: spin .7s linear infinite; flex: none;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* --- Kuchenbuffet --------------------------------------------------------- */
.kuchen-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 1.6rem; align-items: start; }
.kuchen-form { display: flex; flex-direction: column; gap: 1rem; }
.kuchen-form label { font-size: .82rem; font-weight: 500; letter-spacing: .04em; color: var(--sage-deep); display: flex; flex-direction: column; gap: .35rem; }
.kuchen-form input[type=text] {
  font-family: var(--sans); font-size: .98rem;
  padding: .7rem .85rem; border: 1px solid var(--line); border-radius: 10px;
  background: var(--paper-2); color: var(--ink);
}
.kuchen-form input[type=text]:focus { outline: none; border-color: var(--sage); background: #fff; }
.form-msg { font-size: .85rem; margin: 0; min-height: 1.1em; }
.form-msg.ok { color: var(--sage-deep); }
.form-msg.err { color: #a8553f; }

.count { font-family: var(--sans); font-size: .85rem; color: var(--muted); letter-spacing: .04em; }
.cake-list { list-style: none; margin: .4rem 0 0; padding: 0; display: flex; flex-direction: column; }
.cake-list li.cake-row {
  display: flex; align-items: center; gap: .9rem;
  padding: .8rem .2rem; border-bottom: 1px solid var(--line);
}
.cake-row:last-child { border-bottom: none; }
.cake-bullet { color: var(--gold); font-size: 1.1rem; line-height: 1; }
.cake-main { flex: 1; }
.cake-what { font-family: var(--serif); font-size: 1.18rem; color: var(--sage-deep); }
.cake-who { font-size: .8rem; color: var(--muted); }
.cake-del {
  border: 0; background: none; color: var(--muted); cursor: pointer;
  font-size: 1.1rem; padding: .2rem .4rem; border-radius: 6px; line-height: 1;
  opacity: .55; transition: opacity .15s, color .15s, background .15s;
}
.cake-del:hover { opacity: 1; color: #a8553f; background: rgba(168,90,70,.1); }
.cake-loading, .cake-empty { color: var(--muted); font-size: .9rem; padding: .8rem .2rem; }

/* --- Anfahrt placeholder -------------------------------------------------- */
.placeholder { text-align: center; max-width: 560px; margin: 0 auto; padding: 3rem 1.6rem; }
.placeholder-title { font-family: var(--serif); font-size: 1.6rem; color: var(--sage-deep); margin: 1rem 0 .4rem; }
.placeholder-text { color: var(--muted); margin: 0; }

/* --- Einladung ------------------------------------------------------------ */
.invite-pages {
  display: grid; gap: 1.6rem;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  max-width: 920px; margin: 0 auto;
}
.invite-figure { margin: 0; }
.invite-figure img {
  width: 100%; border-radius: var(--radius);
  border: 1px solid var(--line); box-shadow: var(--shadow);
}
.invite-actions {
  display: flex; flex-wrap: wrap; gap: .9rem; justify-content: center;
  margin-top: 2rem;
}
.btn-ghost {
  font-family: var(--sans); font-size: .82rem; font-weight: 600;
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--sage-deep); text-decoration: none;
  border: 1px solid var(--sage); border-radius: 999px;
  padding: .85rem 1.7rem; transition: background .18s ease;
}
.btn-ghost:hover { background: rgba(126,140,106,.1); }

/* --- Grill / Menü ---------------------------------------------------------- */
.menu-hint {
  max-width: 760px; margin: 0 auto 2rem; text-align: center;
  background: var(--sage); color: #fff;
  font-family: var(--serif); font-size: 1.18rem;
  padding: 1rem 1.4rem; border-radius: 12px;
}
.menu-hint strong { color: #fff; }
.menu-card { max-width: 880px; margin: 0 auto; padding: 2.2rem 2rem; }
.menu { columns: 2; column-gap: 2.8rem; }
.menu-cat { break-inside: avoid; margin: 0 0 1.7rem; }
.menu-cat h2 {
  font-size: 1.55rem; color: var(--sage-deep);
  margin: 0 0 .5rem; padding-bottom: .25rem;
  border-bottom: 1px solid var(--line);
}
.menu-list { list-style: none; margin: 0; padding: 0; }
.menu-item {
  display: flex; align-items: baseline; gap: .6rem;
  padding: .4rem 0;
}
.menu-name { font-family: var(--serif); font-size: 1.12rem; color: var(--ink); }
.diet {
  font-size: .6rem; letter-spacing: .12em; text-transform: uppercase;
  padding: .14rem .5rem; border-radius: 999px; white-space: nowrap;
  align-self: center;
}
.diet-vegan { background: rgba(126,140,106,.2); color: var(--sage-deep); }
.diet-veg   { background: rgba(194,160,99,.22); color: var(--gold-deep); }
.menu-legend {
  display: flex; gap: .7rem; justify-content: center;
  margin-top: 1rem; padding-top: 1.2rem; border-top: 1px solid var(--line);
}

/* --- Footer --------------------------------------------------------------- */
.foot { text-align: center; padding: 3rem 1.4rem 3.5rem; border-top: 1px solid var(--line); color: var(--muted); }
.foot-script { font-family: var(--script); font-size: 2rem; color: var(--sage-mid); margin: .6rem 0 0; }
.foot-date { letter-spacing: .22em; text-transform: uppercase; font-size: .72rem; margin: .3rem 0 0; }

/* --- Login ---------------------------------------------------------------- */
.login-body {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: 1.5rem; position: relative; overflow: hidden;
}
.sprig-login-tl { top: -40px; left: -40px; width: 230px; transform: scaleX(-1) rotate(6deg); }
.sprig-login-br { bottom: -40px; right: -40px; width: 230px; transform: rotate(6deg); }
.login-card {
  position: relative; z-index: 2;
  width: 100%; max-width: 420px;
  background: var(--card); border: 1px solid var(--line);
  border-radius: 22px; box-shadow: var(--shadow);
  padding: 2.6rem 2.2rem; text-align: center;
}
.login-script { font-family: var(--script); font-size: 2.4rem; color: var(--sage-mid); margin: .6rem 0 0; line-height: 1; }
.login-title { font-size: 1.7rem; color: var(--sage-deep); margin: .2rem 0 .7rem; }
.login-sub { color: var(--muted); font-size: .9rem; margin: 0 0 1.6rem; }
.login-error {
  background: rgba(168,90,70,.1); color: #a8553f; font-size: .86rem;
  padding: .65rem .8rem; border-radius: 10px; margin: 0 0 1rem;
}
.login-form { display: flex; flex-direction: column; gap: .7rem; text-align: left; }
.login-label { font-size: .76rem; letter-spacing: .14em; text-transform: uppercase; color: var(--sage-deep); }
.login-input {
  font-family: var(--sans); font-size: 1rem;
  padding: .8rem .9rem; border: 1px solid var(--line); border-radius: 10px;
  background: var(--paper-2);
}
.login-input:focus { outline: none; border-color: var(--sage); background: #fff; }
.login-remember { font-size: .82rem; color: var(--muted); display: flex; align-items: center; gap: .5rem; margin: .2rem 0 .6rem; }

/* --- Responsive ----------------------------------------------------------- */
@media (max-width: 760px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: flex-start; gap: 0;
    background: var(--paper-2); border-bottom: 1px solid var(--line);
    padding: .4rem 1.4rem 1rem;
    max-height: 0; overflow: hidden; transition: max-height .28s ease;
  }
  .nav-links.is-open { max-height: 360px; }
  .nav-links a { width: 100%; padding: .7rem 0; border-bottom: 1px solid var(--line); }
  .nav-links a::after { display: none; }

  .fotos-grid, .kuchen-grid { grid-template-columns: 1fr; }
  .menu { columns: 1; }
  .sprig-tl { width: 130px; top: -20px; left: -26px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; scroll-behavior: auto; }
  .slide-stage img { transition: none; }
}

:focus-visible { outline: 2px solid var(--sage-mid); outline-offset: 2px; border-radius: 4px; }
