/* =========================================================
   Sherehe ya kumuaga Rachel Kayange  |  mtindo wa ukurasa
   Rangi: kijani cha usiku (emerald), lulu, dhahabu ya champagne
   ========================================================= */

:root {
  --emerald-deep: #0A2620;
  --emerald: #0F3A2F;
  --emerald-soft: #1E5444;
  --pearl: #F3F5F1;
  --pearl-dim: #E4E9E3;
  --gold: #C9A55C;
  --gold-soft: #E7D4A6;
  --ink: #17211D;
  --muted: #56655F;
  --danger: #E59A86;

  --font-script: "Pinyon Script", "Snell Roundhand", cursive;
  --font-serif: "Cormorant Garamond", "Iowan Old Style", Georgia, serif;
  --font-sans: "Jost", "Segoe UI", system-ui, -apple-system, sans-serif;

  --column: 34rem;
  --gutter: clamp(1.4rem, 6vw, 2.2rem);
  color-scheme: light;
  box-sizing: border-box;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

*, *::before, *::after { box-sizing: inherit; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--emerald-deep);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

[hidden] { display: none !important; }

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

h1, h2, h3 { margin: 0; font-weight: 500; }

a { color: inherit; }

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

/* ---------- Hero ---------- */

.hero {
  position: relative;
  height: 100vh;
  height: 100svh;
  min-height: 34rem;
  overflow: hidden;
  color: var(--pearl);
  isolation: isolate;
}

.hero__media { position: absolute; inset: 0; z-index: -2; }

.hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 14%;
  transform: scale(1.08);
  transition: transform 2.6s cubic-bezier(.2, .7, .2, 1);
}

.hero__shade {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(10, 38, 32, .35) 0%, rgba(10, 38, 32, 0) 22%),
    linear-gradient(180deg, rgba(10, 38, 32, 0) 38%, rgba(10, 38, 32, .72) 66%, var(--emerald-deep) 96%);
}

.hero__content {
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(4.6rem + env(safe-area-inset-bottom, 0px));
  padding: 0 var(--gutter);
  text-align: center;
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 1.2s ease .5s, transform 1.2s ease .5s;
}

.hero__lead {
  margin: 0 0 .2rem;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(1.25rem, 5.2vw, 1.6rem);
  color: var(--gold-soft);
}

.hero__name { display: flex; flex-direction: column; align-items: center; line-height: 1; }

.hero__first {
  font-family: var(--font-script);
  font-weight: 400;
  font-size: clamp(5rem, 26vw, 8.5rem);
  line-height: .95;
  color: var(--gold);
  text-shadow: 0 2px 24px rgba(10, 38, 32, .45);
  padding: 0 .1em;
}

.hero__last {
  margin-top: .1rem;
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: clamp(1.5rem, 7vw, 2.3rem);
  letter-spacing: .32em;
  padding-left: .32em; /* kusawazisha nafasi ya herufi ya mwisho */
}

.hero__date {
  margin: 1rem 0 0;
  font-size: .95rem;
  letter-spacing: .04em;
  color: rgba(243, 245, 241, .82);
}

.hero__scroll {
  position: absolute;
  left: 50%;
  bottom: calc(1.4rem + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  border: 1px solid rgba(231, 212, 166, .45);
  color: var(--gold-soft);
  text-decoration: none;
}

body.is-ready .hero__media img { transform: scale(1); }
body.is-ready .hero__content { opacity: 1; transform: none; }

/* ---------- Karibu ---------- */

.welcome {
  background: var(--emerald-deep);
  color: var(--pearl);
  text-align: center;
  padding: 3.2rem var(--gutter) 3.6rem;
}

.welcome__title {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(2rem, 8vw, 2.6rem);
  color: var(--gold-soft);
}

.welcome__text {
  max-width: var(--column);
  margin: 1.1rem auto 0;
  font-family: var(--font-serif);
  font-size: clamp(1.2rem, 4.8vw, 1.4rem);
  line-height: 1.6;
  color: rgba(243, 245, 241, .92);
}

.ornament {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .7rem;
  margin-top: 2.2rem;
}

.ornament span { width: 3.2rem; height: 1px; background: rgba(201, 165, 92, .6); }

.ornament i {
  width: .45rem;
  height: .45rem;
  background: var(--gold);
  transform: rotate(45deg);
}

/* ---------- Picha ---------- */

.gallery {
  background: var(--pearl);
  padding: 3.6rem var(--gutter) 3rem;
  display: grid;
  gap: 1.8rem;
  max-width: none;
}

.gallery > * { width: 100%; max-width: var(--column); margin-left: auto; margin-right: auto; }

.arch { margin: 0; position: relative; }

.arch img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 999px 999px 1.2rem 1.2rem;
  box-shadow: 0 18px 40px -22px rgba(10, 38, 32, .55);
}

/* fremu ya dhahabu nyuma ya kila picha */
.arch::before {
  content: "";
  position: absolute;
  inset: -.6rem .6rem .6rem -.6rem;
  border: 1px solid var(--gold);
  border-radius: 999px 999px 1.4rem 1.4rem;
  z-index: 0;
}

.arch img { position: relative; z-index: 1; }

.arch--one { width: 82%; justify-self: start; margin-left: max(.6rem, calc((100% - var(--column)) / 2)); }
.arch--one img { object-position: 50% 30%; }

.arch--two { width: 74%; justify-self: end; margin-right: max(.6rem, calc((100% - var(--column)) / 2)); }
.arch--two::before { inset: -.6rem -.6rem .6rem .6rem; }
.arch--two img { object-position: 50% 20%; }

.gallery__quote {
  margin: .4rem auto;
  padding: 0 .4rem;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(1.35rem, 5.6vw, 1.65rem);
  line-height: 1.4;
  text-align: center;
  color: var(--emerald);
}

/* ---------- Kuhusu tukio ---------- */

.details {
  background: var(--pearl);
  padding: 1rem var(--gutter) 3.6rem;
}

.section-title {
  max-width: var(--column);
  margin: 0 auto 1.2rem;
  font-family: var(--font-serif);
  font-size: clamp(1.9rem, 7.5vw, 2.4rem);
  color: var(--emerald);
  text-align: center;
}

.details__list { max-width: var(--column); margin: 0 auto; border-bottom: 1px solid rgba(201, 165, 92, .45); }

.details__row {
  display: grid;
  grid-template-columns: 5.5rem 1fr;
  gap: 1rem;
  align-items: baseline;
  padding: 1rem 0;
  border-top: 1px solid rgba(201, 165, 92, .45);
}

.details__row[hidden] { display: none; }

.details dt {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.15rem;
  color: var(--muted);
}

.details dd {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--ink);
}

/* ---------- Ujumbe wa heri ---------- */

.wish {
  background: var(--emerald);
  color: var(--pearl);
  padding: 3.6rem var(--gutter) 4rem;
}

.wish > * { max-width: var(--column); margin-left: auto; margin-right: auto; }

.wish__title {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 8vw, 2.6rem);
  text-align: center;
  color: var(--gold-soft);
}

.wish__intro {
  margin-top: .7rem;
  text-align: center;
  color: rgba(243, 245, 241, .85);
}

.wish__count {
  margin-top: .4rem;
  text-align: center;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.15rem;
  color: var(--gold-soft);
}

.form { margin-top: 2rem; display: grid; gap: 1.35rem; }

.field { position: relative; display: grid; gap: .45rem; }

.field label {
  font-size: .9rem;
  font-weight: 500;
  color: var(--gold-soft);
}

.field input,
.field textarea {
  width: 100%;
  font: inherit;
  font-size: 1.05rem; /* angalau 16px ili iPhone isizoom */
  color: var(--pearl);
  background: rgba(10, 38, 32, .45);
  border: 1px solid rgba(231, 212, 166, .28);
  border-radius: .9rem;
  padding: .9rem 1rem;
  transition: border-color .2s ease, background .2s ease;
  -webkit-appearance: none;
  appearance: none;
}

.field textarea { resize: vertical; min-height: 8.5rem; line-height: 1.5; }

.field input::placeholder,
.field textarea::placeholder { color: rgba(243, 245, 241, .42); }

.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--gold);
  background: rgba(10, 38, 32, .7);
}

.field.is-invalid input,
.field.is-invalid textarea { border-color: var(--danger); }

.field__count {
  justify-self: end;
  font-size: .8rem;
  color: rgba(243, 245, 241, .55);
}

.field--trap {
  position: absolute !important;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form__note {
  margin: -.3rem 0 0;
  font-size: .85rem;
  color: rgba(243, 245, 241, .62);
}

.form__error {
  margin: 0;
  padding: .8rem 1rem;
  border-radius: .8rem;
  background: rgba(229, 154, 134, .14);
  border: 1px solid rgba(229, 154, 134, .5);
  color: #F6CFC4;
  font-size: .95rem;
}

.button {
  width: 100%;
  min-height: 3.4rem;
  border: 0;
  border-radius: 999px;
  background: var(--gold);
  color: var(--emerald-deep);
  font: inherit;
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: .02em;
  cursor: pointer;
  transition: background .2s ease, transform .15s ease;
}

.button:hover { background: var(--gold-soft); }
.button:active { transform: scale(.985); }
.button[disabled] { opacity: .65; cursor: progress; }

.done {
  margin-top: 2.2rem;
  text-align: center;
  padding: 2.4rem 1.4rem;
  border: 1px solid rgba(201, 165, 92, .55);
  border-radius: 1.4rem;
  background: rgba(10, 38, 32, .4);
  outline: none;
  animation: done-in .6s ease both;
}

.done[hidden] { display: none; }

.done__icon { margin: 0 auto 1rem; color: var(--gold); }

.done__title {
  font-family: var(--font-serif);
  font-size: 2rem;
  color: var(--gold-soft);
}

.done__text { margin: .7rem 0 0; font-size: 1.05rem; }

.done__sms { margin: .8rem 0 0; font-size: .92rem; color: rgba(243, 245, 241, .72); }

@keyframes done-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

/* ---------- Footer ---------- */

.footer {
  background: var(--emerald-deep);
  color: rgba(243, 245, 241, .7);
  text-align: center;
  padding: 2.6rem var(--gutter) calc(2.6rem + env(safe-area-inset-bottom, 0px));
}

.footer__script {
  margin: 0;
  font-family: var(--font-script);
  font-size: 2.6rem;
  line-height: 1;
  color: var(--gold);
}

.footer__text { margin: .6rem 0 0; font-family: var(--font-serif); font-style: italic; font-size: 1.1rem; }

/* ---------- Skrini kubwa (kompyuta / tablet) ---------- */

@media (min-width: 900px) {
  .hero { display: grid; grid-template-columns: 1fr 1fr; background: var(--emerald-deep); }
  .hero__media { position: relative; inset: auto; grid-column: 1; }
  .hero__shade { background: linear-gradient(90deg, rgba(10, 38, 32, 0) 30%, var(--emerald-deep) 50%); }
  .hero__content {
    position: relative;
    grid-column: 2;
    align-self: center;
    bottom: auto;
  }
  .gallery { grid-template-columns: 1fr 1fr; align-items: center; column-gap: 3rem; padding-top: 5rem; }
  .gallery > * { max-width: 24rem; }
  .arch--one, .arch--two { width: 100%; margin: 0; justify-self: center; }
  .gallery__quote { grid-column: 1 / -1; grid-row: 2; max-width: 36rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero__media img, .hero__content { transition: none; transform: none; }
  .done { animation: none; }
}
