@import url("fonts.css");

:root {
  --ambient-paper: #e8e5dd;
  --ambient-paper-shade: #ddd9d0;
  --ambient-texture-strength: 0.45; /* 0.0 = invisible, 1.0 = strongest */
  --ambient-ink: #272624;
  --ambient-muted: #777671;
  --ambient-panel: #666764;
  --logo-green: #00933e;
  --logo-blue: #006695;
  --logo-red: #dd1e54;
  --logo-yellow: #fff500;
  --panel-width: min(46rem, calc(100vw - 2rem));
  color: var(--ambient-ink);
  background: var(--ambient-paper);
  font-family: var(--site-font);
  font-synthesis: none;
  line-height: 1.5;
}

* { box-sizing: border-box; }

html { min-height: 100%; }

body {
  position: relative;
  isolation: isolate;
  min-height: 100svh;
  margin: 0;
  overflow-x: hidden;
  background: var(--ambient-paper);
}

body::before {
  position: fixed;
  z-index: 0;
  inset: 0;
  pointer-events: none;
  background-image:
    repeating-radial-gradient(circle at 0 0, rgba(39, 38, 36, 0.06) 0 0.35px, transparent 0.5px 3px),
    repeating-linear-gradient(102deg, transparent 0 3px, rgba(255, 255, 255, 0.1) 3px 4px, transparent 4px 8px);
  background-size: 5px 5px, 13px 13px;
  mix-blend-mode: multiply;
  opacity: var(--ambient-texture-strength);
  content: "";
}

a { color: inherit; }

[hidden] { display: none !important; }

.skip-link {
  position: fixed;
  z-index: 20;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.6rem 0.9rem;
  color: #fff;
  background: var(--ambient-ink);
  transform: translateY(-180%);
}

.skip-link:focus { transform: translateY(0); }

.ambient-field { position: fixed; z-index: 1; inset: 0; overflow: hidden; pointer-events: none; }
.ambient-square { position: absolute; display: block; will-change: transform, opacity; }
.ambient-square-shape, .ambient-at-symbol { position: absolute; inset: 0; transition: opacity 720ms cubic-bezier(0.22, 1, 0.36, 1), background-color 720ms cubic-bezier(0.22, 1, 0.36, 1), color 720ms cubic-bezier(0.22, 1, 0.36, 1); }
.ambient-square-shape { background: var(--particle-color); }
.ambient-at-symbol { display: grid; place-items: center; color: var(--particle-color); font-weight: 800; line-height: 1; opacity: 0; }
.ambient-square.is-shapeshifter.is-contact-mode .ambient-square-shape { opacity: 0; }
.ambient-square.is-shapeshifter.is-contact-mode .ambient-at-symbol { opacity: 1; }

.intro-overlay { position: fixed; z-index: 12; inset: 0; display: grid; place-items: center; overflow: hidden; pointer-events: none; }
.intro-logo-shell { width: min(96vmin, 52rem); aspect-ratio: 1; transform-origin: center; will-change: transform; }
.intro-logo-shell iframe { display: block; width: 100%; height: 100%; border: 0; background: transparent; }

html.intro-pending .content-panel,
html.intro-pending .ambient-footer {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

html.intro-pending .content-panel,
html.intro-pending .ambient-footer,
html.intro-revealing .content-panel,
html.intro-revealing .ambient-footer {
  transition: opacity 500ms cubic-bezier(0.22, 1, 0.36, 1);
}

html.intro-revealing .ambient-brand img { opacity: 0; }

.ambient-stage { position: relative; z-index: 2; min-height: 100svh; display: grid; place-items: center; padding: 2rem 1rem; }

.content-panel {
  width: var(--panel-width);
  height: min(39rem, calc(100svh - 4rem));
  min-height: min(34rem, calc(100svh - 4rem));
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding: clamp(1.25rem, 3vw, 2.5rem);
  color: #f5f4ef;
  background: color-mix(in srgb, var(--ambient-panel) 94%, transparent);
  box-shadow: 0 1.5rem 4rem rgba(39, 38, 36, 0.16);
  backdrop-filter: blur(0.35rem);
}

.content-panel.is-contact { height: auto; min-height: 0; }

.panel-header { display: grid; grid-template-columns: minmax(0, 1fr) minmax(17rem, 19rem); align-items: center; gap: 1rem 1.5rem; }

.ambient-brand { min-width: 0; display: inline-flex; align-items: center; gap: 1rem; color: #fff; text-decoration: none; }
.ambient-brand img { width: 5.2rem; height: 5.2rem; flex: 0 0 auto; }
.ambient-brand-copy { min-width: 0; display: grid; gap: 0.25rem; align-content: center; }
.ambient-brand-name { font-size: 1.5rem; font-weight: 850; letter-spacing: 0.18em; white-space: nowrap; }
.ambient-brand-subtitle { color: rgba(255, 255, 255, 0.86); font-size: 0.9rem; font-weight: 650; letter-spacing: 0.06em; }

.panel-nav { width: 100%; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); justify-self: end; gap: 0.5rem; font-size: 0.86rem; }
.panel-nav a { color: rgba(255, 255, 255, 0.9); text-align: center; text-decoration: none; text-underline-offset: 0.25em; }
.panel-nav a:hover, .panel-nav a:focus-visible { color: var(--logo-yellow); text-decoration: underline; }
.panel-nav a[aria-current="page"] { color: #fff; font-weight: 800; }

.panel-copy { flex: 1; display: grid; align-content: center; gap: 1.05rem; min-height: 0; padding: clamp(1.5rem, 5vw, 4rem); border: 1px solid rgba(255, 255, 255, 0.2); background: rgba(255, 255, 255, 0.08); }
.panel-copy h1 { max-width: 20ch; margin: 0; color: #fff; font-size: clamp(2.1rem, 5.3vw, 4.3rem); line-height: 0.95; letter-spacing: -0.07em; }
.panel-copy.is-landing h1 { max-width: 24ch; }
.panel-copy.is-contact { flex: 0 0 auto; align-content: start; gap: 0.75rem; padding: 1rem; overflow-y: visible; }
.panel-copy.is-contact h1 { font-size: clamp(1.8rem, 3.5vw, 2.4rem); }
.panel-copy.is-legal { align-content: start; padding: clamp(1.25rem, 3.2vw, 2.2rem); }
.panel-copy.is-legal h1 { font-size: clamp(2rem, 4.2vw, 3.2rem); }
.panel-copy.is-privacy { overflow-y: auto; scrollbar-color: rgba(255, 255, 255, 0.55) transparent; scrollbar-width: thin; }
.panel-copy.is-privacy::-webkit-scrollbar { width: 0.55rem; }
.panel-copy.is-privacy::-webkit-scrollbar-track { background: transparent; }
.panel-copy.is-privacy::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.42); }
.panel-copy .panel-lead { max-width: 34rem; margin: 0; color: rgba(255, 255, 255, 0.82); font-size: clamp(1rem, 1.8vw, 1.2rem); }
.panel-copy .panel-body { max-width: 35rem; margin: 0; color: rgba(255, 255, 255, 0.62); font-size: 0.88rem; }
.panel-actions { display: flex; flex-wrap: wrap; gap: 0.75rem 1rem; margin-top: 0.35rem; }
.panel-action { display: inline-flex; align-items: center; gap: 0.55rem; padding: 0.75rem 0.95rem; color: var(--button-ink, var(--ambient-ink)); background: var(--button-color, var(--logo-yellow)); font-size: 0.72rem; font-weight: 800; text-decoration: none; transition: filter 180ms ease; }
.panel-action:hover, .panel-action:focus-visible { filter: brightness(1.08); }
.panel-back { display: inline-flex; align-items: center; gap: 0.45rem; color: rgba(255, 255, 255, 0.72); font-size: 0.72rem; text-decoration: none; }
.panel-back:hover, .panel-back:focus-visible { color: #fff; text-decoration: underline; }

.contact-form { display: grid; gap: 0.65rem; max-width: 42rem; }
.contact-form-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.65rem; }
.contact-field { display: grid; gap: 0.25rem; color: rgba(255, 255, 255, 0.72); font-size: 0.65rem; font-weight: 750; letter-spacing: 0.08em; text-transform: uppercase; }
.contact-field small { color: rgba(255, 255, 255, 0.5); font-size: inherit; font-weight: 500; }
.contact-field input, .contact-field textarea { width: 100%; border: 1px solid rgba(255, 255, 255, 0.28); border-radius: 0; padding: 0.58rem 0.65rem; color: #fff; background: rgba(255, 255, 255, 0.09); font: inherit; font-size: 0.82rem; font-weight: 500; letter-spacing: normal; text-transform: none; }
.contact-field textarea { min-height: 4.5rem; resize: vertical; }
.contact-field input::placeholder, .contact-field textarea::placeholder { color: rgba(255, 255, 255, 0.45); }
.contact-field input:focus, .contact-field textarea:focus { border-color: rgba(255, 255, 255, 0.72); outline: none; }
.contact-consent { display: flex; align-items: flex-start; gap: 0.5rem; color: rgba(255, 255, 255, 0.66); font-size: 0.68rem; line-height: 1.35; }
.contact-consent input { flex: 0 0 auto; margin: 0.12rem 0 0; accent-color: var(--logo-yellow); }
.contact-consent a { color: #fff; text-underline-offset: 0.2em; }
.contact-submit { justify-self: start; border: 0; border-radius: 0; padding: 0.7rem 1rem; color: var(--ambient-ink); background: var(--ambient-paper); cursor: pointer; font: inherit; font-size: 0.72rem; font-weight: 800; }
.contact-submit:hover, .contact-submit:focus-visible { background: #fff; }
.contact-form-status { margin: 0; color: rgba(255, 255, 255, 0.78); font-size: 0.75rem; }

.legal-content { display: grid; gap: 1rem; color: rgba(255, 255, 255, 0.74); font-size: 0.84rem; line-height: 1.5; }
.legal-content p { margin: 0; }
.legal-content a { color: #fff; text-underline-offset: 0.2em; }
.legal-content strong { color: #fff; }
.legal-content address { margin: 0; font-style: normal; }
.legal-content section { display: grid; gap: 0.35rem; }
.legal-content h2 { margin: 0; color: #fff; font-size: 1rem; line-height: 1.2; letter-spacing: 0.01em; }
.legal-intro { color: rgba(255, 255, 255, 0.62); }
.legal-contact-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; }
.legal-placeholder { padding: 0.8rem 0.9rem; border-left: 0.25rem solid var(--logo-yellow); background: rgba(255, 255, 255, 0.08); }

.ambient-footer { position: fixed; z-index: 3; right: 1.25rem; bottom: 0.85rem; display: flex; gap: 1.15rem; color: rgba(39, 38, 36, 0.72); font-size: 0.9rem; font-weight: 700; }
.ambient-footer a { text-decoration: none; text-underline-offset: 0.24em; }
.ambient-footer a:hover, .ambient-footer a:focus-visible, .ambient-footer a[aria-current="page"] { color: var(--ambient-ink); text-decoration: underline; }

:focus-visible { outline: 3px solid var(--logo-blue); outline-offset: 4px; }

@media (max-width: 800px) {
  .content-panel { height: auto; min-height: 0; gap: 1.25rem; }
  .panel-header { grid-template-columns: 1fr; align-items: start; }
  .panel-nav { justify-self: stretch; }
  .panel-copy { flex: 0 0 auto; min-height: clamp(24rem, 68vw, 30rem); }
  .panel-copy.is-contact { min-height: 0; overflow-y: visible; }
  .panel-copy.is-privacy { height: min(30rem, 54svh); min-height: min(18rem, 54svh); }
}

@media (max-width: 700px) {
  .ambient-stage { padding: 1rem 0.7rem 3.4rem; }
  .content-panel { width: 100%; }
  .panel-copy { padding: 1.35rem; }
  .panel-copy.is-contact { padding: 1rem; }
  .panel-copy h1 { font-size: clamp(2.1rem, 10vw, 3.6rem); }
  .panel-copy.is-contact h1 { font-size: clamp(1.6rem, 7vw, 2.2rem); }
  .contact-form-row { grid-template-columns: 1fr; }
  .contact-submit { width: 100%; }
  .legal-contact-grid { grid-template-columns: 1fr; gap: 0.8rem; }
  .ambient-footer { right: 0; bottom: 0; left: 0; justify-content: center; padding: 0.65rem 0.75rem; background: color-mix(in srgb, var(--ambient-paper) 90%, transparent); backdrop-filter: blur(0.35rem); }
}

@media (max-width: 420px) {
  .ambient-brand { align-items: flex-start; flex-direction: column; gap: 0.75rem; }
  .panel-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.65rem 0.5rem; }
  .panel-nav a { text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
  .intro-overlay { display: none !important; }
  .ambient-square-shape, .ambient-at-symbol { transition: none; }
  .ambient-square { display: none; }
}
