/* EverBonds public teaser.
   Inter is self-hosted (SIL OFL).
   Ink follows the word in the mark; the coral split-wordmark is gone. */

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/inter-400.woff2") format("woff2");
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("fonts/inter-500.woff2") format("woff2");
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("fonts/inter-700.woff2") format("woff2");
}

:root {
  /* Near-black ink, close to the word drawn in the mark. */
  --ink: #1A1A1A;
  --bg: #FFFFFF;
  --text: var(--ink);
  --text-secondary: #6E6E6E;
  --border: #E0DCD4;
  --shadow-card: 0 8px 20px rgba(26, 26, 26, 0.06);
  --shadow-cta: 0 6px 16px rgba(26, 26, 26, 0.1);
  --space-md: 16px;
  --space-lg: 24px;
  --space-xxl: 48px;
  --radius-full: 9999px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scrollbar-color: var(--border) transparent;
}

html,
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
}

body {
  display: grid;
  place-items: center;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", sans-serif;
  font-weight: 400;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body.home {
  grid-template-rows: 1fr auto;
  align-content: stretch;
}

::selection {
  background: var(--ink);
  color: var(--bg);
}

.dawn {
  position: absolute;
  z-index: 0;
  width: min(88vw, 40rem);
  aspect-ratio: 1;
  top: max(-32vw, -16rem);
  left: 50%;
  border-radius: 50%;
  transform: translateX(-50%);
  background: radial-gradient(
    circle,
    rgba(212, 175, 95, 0.14) 0%,
    rgba(140, 176, 214, 0.05) 46%,
    rgba(255, 255, 255, 0) 72%
  );
  filter: blur(18px);
  pointer-events: none;
}

main {
  position: relative;
  z-index: 1;
  width: min(100%, 28rem);
  padding: var(--space-xxl) var(--space-lg);
  text-align: center;
}

h1 {
  margin: 0;
}

.mark {
  display: block;
  /* Tight crop (no canvas padding) — sized so glyph matches previous visual weight */
  width: min(65vw, 13.25rem);
  height: auto;
  max-width: 100%;
  margin-inline: auto;
}

.whisper {
  margin: var(--space-md) 0 0;
  color: var(--text);
  font-size: 1.375rem;
  font-weight: 500;
  line-height: 1.75rem;
  text-wrap: balance;
}

/* Soft water-light sweep on “reflet” (home) */
.word-reflet {
  display: inline-block;
  color: var(--ink);
  background-image: linear-gradient(
    100deg,
    var(--ink) 0%,
    var(--ink) 40%,
    #5b87b0 47%,
    #d4af5f 50%,
    #5b87b0 53%,
    var(--ink) 60%,
    var(--ink) 100%
  );
  background-size: 240% 100%;
  background-position: 100% 50%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

@media (prefers-reduced-motion: no-preference) {
  .word-reflet {
    animation: reflet-shimmer 4.8s ease-in-out infinite;
  }
}

@keyframes reflet-shimmer {
  0%,
  18% {
    background-position: 100% 50%;
  }
  50%,
  100% {
    background-position: 0% 50%;
  }
}

/* Solid ink during ripples capture — avoids clipped-text glitches */
body.is-rippling .word-reflet {
  animation: none;
  background: none;
  -webkit-text-fill-color: var(--ink);
  color: var(--ink);
}

.soon {
  margin: var(--space-xxl) 0 0;
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.25rem;
}

.invite {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  margin-top: var(--space-md);
  padding: 12px 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  background: var(--bg);
  box-shadow: var(--shadow-card);
  color: var(--text);
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.25rem;
  text-decoration: none;
  text-underline-offset: 0.2em;
}

.invite:hover {
  border-color: #B8B4AC;
  box-shadow: var(--shadow-cta);
}

.invite:active {
  color: var(--ink);
}

.invite:focus {
  outline: none;
}

.invite:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 4px;
}

@media (min-width: 30rem) {
  .mark {
    width: min(52vw, 13.25rem);
  }
}

@media (prefers-reduced-motion: no-preference) {
  .dawn {
    animation: dawn-settle 2.8s cubic-bezier(0.16, 1, 0.3, 1) both;
  }

  .invite {
    transition: border-color 180ms cubic-bezier(0.16, 1, 0.3, 1),
      box-shadow 180ms cubic-bezier(0.16, 1, 0.3, 1),
      color 180ms cubic-bezier(0.16, 1, 0.3, 1);
  }
}

@keyframes dawn-settle {
  from {
    transform: translateX(-50%) translateY(-4%) scale(1.12);
    filter: blur(36px);
  }

  to {
    transform: translateX(-50%) scale(1);
    filter: blur(18px);
  }
}

/* Contact subpage -------------------------------------------------------- */

main.contact {
  width: min(100%, 26rem);
  text-align: left;
}

.back {
  margin: 0 0 var(--space-lg);
  font-size: 0.875rem;
  font-weight: 500;
}

.back a {
  color: var(--text-secondary);
  text-decoration: none;
}

.back a:hover {
  color: var(--text);
}

.back a:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 4px;
}

.page-title {
  margin: 0;
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.contact-lead {
  margin-top: var(--space-md);
  font-size: 1.0625rem;
  line-height: 1.5rem;
}

.contact-form {
  display: grid;
  gap: var(--space-md);
  margin-top: var(--space-xxl);
}

.field {
  display: grid;
  gap: 6px;
}

.field-label {
  color: var(--text-secondary);
  font-size: 0.8125rem;
  font-weight: 500;
}

/* display:grid on .field would otherwise override the [hidden] UA rule */
.field[hidden],
.field.is-collapsed,
.notify-success[hidden],
#notify-form-view[hidden] {
  display: none !important;
}

.field input,
.field textarea,
.field select {
  width: 100%;
  margin: 0;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg);
  color: var(--text);
  font-family: inherit;
  font-size: 1rem;
  line-height: 1.4;
  resize: vertical;
}

.field select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--text-secondary) 50%),
    linear-gradient(135deg, var(--text-secondary) 50%, transparent 50%);
  background-position: calc(100% - 18px) calc(50% + 2px), calc(100% - 12px) calc(50% + 2px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-right: 40px;
  cursor: pointer;
}

.field select:invalid {
  color: #A3A3A3;
}

.field select option {
  color: var(--text);
}

.field input:focus-visible,
.field textarea:focus-visible,
.field select:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

.field input::placeholder,
.field textarea::placeholder {
  color: #A3A3A3;
}

.hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-status {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.35;
}

.form-status--ok {
  color: var(--text);
}

.form-status--error {
  color: #8b2e2e;
}

.form-status--pending {
  color: var(--text-secondary);
}

.form-submit {
  width: 100%;
  margin-top: 0;
  cursor: pointer;
}

.form-submit:disabled {
  opacity: 0.55;
  cursor: wait;
}

.notify-success-body {
  margin: var(--space-lg) 0 0;
  color: var(--text);
  font-size: 1.0625rem;
  font-weight: 400;
  line-height: 1.55;
}

.notify-success-body--muted {
  color: var(--text-secondary);
}

.notify-success-cta {
  display: inline-flex;
  margin-top: var(--space-xxl);
  text-align: center;
  text-decoration: none;
}

.toggle {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: start;
  cursor: pointer;
}

.toggle input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.toggle-ui {
  position: relative;
  width: 44px;
  height: 26px;
  margin-top: 1px;
  border-radius: var(--radius-full);
  background: #E0E0E0;
  transition: background 160ms ease;
}

.toggle-ui::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--bg);
  box-shadow: 0 1px 3px rgba(26, 26, 26, 0.18);
  /* transform for check; opacity/visibility for pre/post ripples (100ms) */
  transition: transform 160ms ease, opacity 100ms linear, visibility 100ms linear;
}

.toggle input:checked + .toggle-ui {
  background: var(--ink);
}

.toggle input:checked + .toggle-ui::after {
  transform: translateX(18px);
}

body.is-rippling .toggle-ui::after {
  visibility: hidden;
  opacity: 0;
}

/* html2canvas turns box-shadow into a muddy grey fill — flat white during ripples */
body.is-rippling .invite,
body.is-rippling .invite:hover,
body.is-rippling .invite:active,
body.is-rippling .invite:focus,
body.is-rippling .invite:focus-visible,
body.is-rippling .form-submit,
body.is-rippling .form-submit:hover,
body.is-rippling .form-submit:active,
body.is-rippling .form-submit:focus,
body.is-rippling .form-submit:focus-visible {
  border-color: #E0DCD4 !important;
  box-shadow: none !important;
  color: #1A1A1A !important;
  outline: none !important;
  background: #FFFFFF !important;
  filter: none !important;
  -webkit-filter: none !important;
}

.toggle input:focus-visible + .toggle-ui {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

.toggle-label {
  color: var(--text);
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1.4;
}

.form-note {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1.4;
}

.lang-switch {
  position: fixed;
  z-index: 5;
  top: 14px;
  right: 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(8px);
}

.lang-switch button {
  margin: 0;
  padding: 2px 4px;
  border: 0;
  background: transparent;
  color: var(--text-secondary);
  font: inherit;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
}

.lang-switch button.is-active,
.lang-switch button[aria-pressed="true"] {
  color: var(--ink);
}

.lang-switch button:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

.lang-switch-sep {
  color: var(--border);
  font-size: 0.75rem;
  user-select: none;
}

.site-footer {
  position: relative;
  z-index: 1;
  padding: var(--space-lg);
  text-align: center;
}

.site-footer a {
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--text);
}

.site-footer a:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 4px;
}

@media (prefers-reduced-motion: reduce) {
  .toggle-ui,
  .toggle-ui::after {
    transition: none;
  }

  .word-reflet {
    animation: none;
    background: none;
    -webkit-text-fill-color: var(--ink);
    color: var(--ink);
  }

  #fx {
    display: none !important;
  }
}

/* Soft SPA views --------------------------------------------------------- */

.view[hidden],
.site-footer[hidden] {
  display: none !important;
}

#fx {
  position: fixed;
  inset: 0;
  z-index: 40;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
}

#fx.is-on {
  visibility: visible;
}
