/* Doce Vagar · Boutique Retreat
   Ivory ground, olive type, one quiet column. */

:root {
  color-scheme: light;

  --olive:        #3e3c22;
  --olive-deep:   #2b2a17;
  --olive-soft:   #6e6b4e;
  --olive-faint:  #a8a289;
  --olive-mute:   #86816a;

  --ivory:        #faf6ec;
  --ivory-warm:   #f3ebda;
  --sand:         #ddd2b9;

  --serif: "Cormorant Garamond", "Iowan Old Style", Georgia, serif;
  --sans:  "Jost", "Avenir Next", "Helvetica Neue", Arial, sans-serif;

  --gutter: 24px;
  --column: 36rem;
}

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

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

body {
  margin: 0;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(1.75rem, 5vh, 3rem);
  padding: clamp(2.75rem, 7vh, 4.5rem) var(--gutter) clamp(1.5rem, 4vh, 2.5rem);
  background:
    radial-gradient(120% 90% at 50% 8%, #fffdf7 0%, var(--ivory) 46%, var(--ivory-warm) 100%);
  color: var(--olive);
  font-family: var(--serif);
  text-align: center;
  overflow-x: hidden;
}

/* Paper grain, kept faint enough to read as texture rather than noise. */
.grain {
  position: fixed;
  inset: -50%;
  pointer-events: none;
  z-index: 2;
  opacity: 0.4;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.82' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='220' height='220' filter='url(%23n)' opacity='0.42'/%3E%3C/svg%3E");
}

/* Two olive branches bleeding off opposite corners, faint enough to read as
   watermark rather than ornament. */
.branch {
  position: fixed;
  width: min(62vw, 46rem);
  height: auto;
  opacity: 0.07;
  pointer-events: none;
  z-index: 0;
}

.branch-a { top: -4vh;    left: -14vw;  rotate: 182deg; }
.branch-b { bottom: -6vh; right: -14vw; rotate: 2deg; }

main, footer, .languages { position: relative; z-index: 1; }

/* Language selector */
.languages {
  position: fixed;
  top: clamp(1.1rem, 3vh, 1.9rem);
  right: clamp(1.1rem, 3vw, 2.2rem);
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.languages button {
  appearance: none;
  border: 0;
  background: none;
  cursor: pointer;
  padding: 0.45rem 0.55rem;
  font-family: var(--sans);
  font-size: 0.67rem;
  font-weight: 400;
  letter-spacing: 0.22em;
  color: var(--olive-soft);
  border-bottom: 1px solid transparent;
  transition: color 0.4s ease, border-color 0.4s ease;
}

.languages button:hover { color: var(--olive-soft); }
.languages button[aria-current="true"] {
  color: var(--olive);
  border-bottom-color: var(--olive);
}

main {
  width: 100%;
  max-width: var(--column);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.mark {
  margin: 0;
  width: clamp(12.5rem, 40vw, 19rem);
}

.mark img {
  display: block;
  width: 100%;
  height: auto;
}

.eyebrow {
  margin: clamp(1.2rem, 3vh, 1.9rem) 0 0;
  font-family: var(--sans);
  font-size: 0.68rem;
  font-weight: 400;
  letter-spacing: 0.44em;
  text-indent: 0.44em;
  text-transform: uppercase;
  color: var(--olive-soft);
}

.tagline {
  margin: clamp(0.9rem, 2.4vh, 1.4rem) 0 0;
  font-size: clamp(1.6rem, 4.6vw, 2.35rem);
  font-style: italic;
  font-weight: 300;
  line-height: 1.3;
  letter-spacing: 0.005em;
  text-wrap: balance;
}

.rule {
  width: 3.25rem;
  margin: clamp(1.3rem, 3vh, 1.8rem) 0;
  border: 0;
  border-top: 1px solid var(--olive-faint);
}

.intro {
  margin: 0;
  max-width: 31rem;
  font-size: clamp(1.06rem, 2.3vw, 1.2rem);
  font-weight: 400;
  line-height: 1.75;
  color: var(--olive-soft);
  text-wrap: pretty;
}

/* Sign-up */
.signup { margin-top: clamp(1.9rem, 4.5vh, 2.8rem); width: 100%; }

.signup-label {
  margin: 0 0 1.4rem;
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 300;
  letter-spacing: 0.1em;
  line-height: 1.6;
  color: var(--olive-soft);
}

form {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 1rem;
  max-width: 25rem;
  margin: 0 auto;
}

.field { flex: 1 1 auto; min-width: 0; }

input[type="email"] {
  width: 100%;
  padding: 0.55rem 0.1rem;
  border: 0;
  border-bottom: 1px solid var(--sand);
  border-radius: 0;
  background: none;
  font-family: var(--serif);
  font-size: 1.06rem;
  color: var(--olive);
  text-align: center;
  transition: border-color 0.4s ease;
}

input[type="email"]::placeholder { color: var(--olive-mute); }

input[type="email"]:hover { border-bottom-color: var(--olive-faint); }

input[type="email"]:focus {
  outline: none;
  border-bottom-color: var(--olive);
}

input[type="email"]:focus-visible { border-bottom-width: 1.5px; }

button[type="submit"] {
  flex: 0 0 auto;
  appearance: none;
  cursor: pointer;
  padding: 0.72rem 1.5rem;
  border: 1px solid var(--olive-mute);
  border-radius: 999px;
  background: none;
  font-family: var(--sans);
  font-size: 0.66rem;
  font-weight: 400;
  letter-spacing: 0.22em;
  text-indent: 0.22em;
  text-transform: uppercase;
  color: var(--olive);
  transition: background-color 0.45s ease, color 0.45s ease, border-color 0.45s ease, opacity 0.3s ease;
}

button[type="submit"]:hover {
  border-color: var(--olive);
  background: var(--olive);
  color: var(--ivory);
}

button[type="submit"]:disabled { opacity: 0.45; cursor: default; }
button[type="submit"]:disabled:hover { background: none; color: var(--olive); border-color: var(--olive-mute); }

:focus-visible { outline: 1px solid var(--olive); outline-offset: 3px; }

.honeypot {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden; clip-path: inset(50%);
  white-space: nowrap;
}

.message {
  margin: 1.1rem 0 0;
  min-height: 1.3rem;
  font-size: 1.02rem;
  font-style: italic;
  line-height: 1.5;
  color: var(--olive-soft);
  opacity: 0;
  transition: opacity 0.5s ease;
}

.message.is-shown { opacity: 1; }
.message.is-error { color: #8a5a3c; }

.privacy {
  margin: 1.25rem 0 0;
  font-family: var(--sans);
  font-size: 0.64rem;
  font-weight: 300;
  letter-spacing: 0.12em;
  color: var(--olive-soft);
}

footer { width: 100%; }

.place {
  margin: 0;
  font-family: var(--sans);
  font-size: 0.64rem;
  font-weight: 400;
  letter-spacing: 0.34em;
  text-indent: 0.34em;
  text-transform: uppercase;
  color: var(--olive-soft);
}

.place span { margin: 0 0.5em; color: var(--olive-faint); }

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden; clip-path: inset(50%);
  white-space: nowrap;
}

/* The page settles in rather than appearing. */
.reveal {
  opacity: 0;
  translate: 0 14px;
  animation: settle 1.5s cubic-bezier(0.22, 0.68, 0.3, 1) forwards;
  animation-delay: calc(var(--step) * 170ms + 120ms);
}

@keyframes settle {
  to { opacity: 1; translate: 0 0; }
}

.signup.reveal { animation-duration: 1.7s; }

@media (max-width: 30rem) {
  form {
    flex-direction: column;
    align-items: stretch;
    gap: 1.1rem;
    max-width: 17rem;
  }
  button[type="submit"] { align-self: center; }
  .branch { width: 86vw; opacity: 0.055; }
  .branch-a { left: -30vw; }
  .branch-b { right: -30vw; }
}

@media (prefers-reduced-motion: reduce) {
  .reveal { animation: none; opacity: 1; translate: none; }
  * { transition-duration: 0.01ms !important; }
}

@media print {
  .grain, .branch, .languages, .signup { display: none; }
  body { background: #fff; }
}
