@import url("fonts.css");

:root {
  --ambient-paper: #e8e5dd;
  --ambient-paper-shade: #ddd9d0;
  --ambient-texture-strength: 0.34; /* 0.0 = invisible, 1.0 = strongest */
  --ambient-texture-image: none;
  --ambient-texture-tile-size: 384px;
  --ambient-ink: #272624;
  --ambient-muted: #777671;
  --ambient-panel: #666764;
  --ambient-panel-copy: #797a77;
  --panel-mode-color: var(--logo-red);
  --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: var(--ambient-texture-image);
  background-position: center;
  background-repeat: no-repeat;
  background-size: 100% 100%;
  opacity: var(--ambient-texture-strength);
  content: "";
}

html.diagnostics-no-texture body::before { opacity: 0; }
html.diagnostics-texture-tile body::before {
  background-position: 0 0;
  background-repeat: repeat;
  background-size: var(--ambient-texture-tile-size) var(--ambient-texture-tile-size);
}
html.diagnostics-no-panel-effects .content-panel { background: var(--ambient-panel); }
html.diagnostics-no-panel-effects .content-panel-shadow { display: none; }
html.diagnostics-no-panel-effects .ambient-footer { background: var(--ambient-paper); }
html.diagnostics-no-ambient .ambient-canvas { display: none; }
html.diagnostics-no-colored-border .panel-copy { border-color: #94958f; }
html.diagnostics-texture-enhanced {
  --ambient-texture-strength: 0.8;
}

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; contain: strict; pointer-events: none; }
.ambient-canvas { display: block; width: 100%; height: 100%; }

.diagnostics-panel {
  position: fixed;
  z-index: 5;
  bottom: 2.9rem;
  left: 1rem;
  width: min(15rem, calc(100vw - 2rem));
  max-height: calc(100svh - 4.5rem);
  overflow-y: auto;
  padding: 0.9rem;
  color: var(--ambient-ink);
  background: rgba(232, 229, 221, 0.96);
  box-shadow: 0 0.75rem 2rem rgba(39, 38, 36, 0.16);
  font-size: 0.75rem;
  line-height: 1.3;
  transition: opacity 220ms ease, transform 220ms ease;
}

html.intro-pending .diagnostics-panel,
html.intro-revealing .diagnostics-panel,
html.intro-pending .diagnostics-launcher,
html.intro-revealing .diagnostics-launcher {
  opacity: 0;
  pointer-events: none;
  transform: translateY(0.5rem);
}

.diagnostics-panel-header { display: flex; align-items: start; justify-content: space-between; gap: 0.75rem; }
.diagnostics-panel-header-actions { display: flex; align-items: center; gap: 0.35rem; }
.diagnostics-eyebrow { margin: 0 0 0.2rem; color: var(--ambient-muted); font-size: 0.58rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; }
.diagnostics-panel h2 { margin: 0; font-size: 1rem; line-height: 1; }
.diagnostics-status { padding: 0.18rem 0.3rem; color: #fff; background: var(--logo-blue); font-size: 0.55rem; font-weight: 800; letter-spacing: 0.08em; }
.diagnostics-close { display: grid; width: 1.25rem; height: 1.25rem; place-items: center; border: 0; padding: 0; color: var(--ambient-muted); background: transparent; cursor: pointer; font: inherit; font-size: 1rem; line-height: 1; }
.diagnostics-close:hover, .diagnostics-close:focus-visible { color: var(--ambient-ink); }
.diagnostics-help { margin: 0.7rem 0; color: var(--ambient-muted); font-size: 0.68rem; }
.diagnostics-options { display: grid; gap: 0.45rem; }
.diagnostics-toggle { display: flex; align-items: start; gap: 0.5rem; cursor: pointer; }
.diagnostics-toggle input { flex: 0 0 auto; width: 0.9rem; height: 0.9rem; margin: 0.05rem 0 0; accent-color: var(--logo-blue); }
.diagnostics-toggle span { flex: 1; }
.diagnostics-variant { min-inline-size: 0; margin: 0.25rem 0 0; padding: 0.55rem; border: 1px solid rgba(39, 38, 36, 0.18); }
.diagnostics-variant legend { padding: 0 0.2rem; color: var(--ambient-muted); font-size: 0.58rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }
.diagnostics-reset { width: 100%; margin-top: 0.85rem; border: 1px solid rgba(39, 38, 36, 0.28); border-radius: 0; padding: 0.48rem 0.55rem; color: var(--ambient-ink); background: transparent; cursor: pointer; font: inherit; font-size: 0.68rem; font-weight: 700; }
.diagnostics-reset:hover, .diagnostics-reset:focus-visible { color: #fff; background: var(--ambient-ink); }
.diagnostics-message { min-height: 1.1em; margin: 0.55rem 0 0; color: var(--ambient-muted); font-size: 0.63rem; }
.diagnostics-launcher { position: fixed; z-index: 4; bottom: 0.85rem; left: 1.25rem; border: 0; padding: 0; color: rgba(39, 38, 36, 0.72); background: transparent; cursor: pointer; font: inherit; font-size: 0.9rem; font-weight: 700; text-decoration: none; text-underline-offset: 0.24em; transition: opacity 220ms ease, transform 220ms ease; }
.diagnostics-launcher:hover, .diagnostics-launcher:focus-visible, .diagnostics-launcher[aria-expanded="true"] { color: var(--ambient-ink); text-decoration: underline; }

.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; contain: layout paint; transform-origin: center; backface-visibility: hidden; 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-pending .content-panel-shadow { opacity: 0; }

html.intro-revealing .content-panel {
  will-change: opacity;
}

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-shell {
  position: relative;
  width: var(--panel-width);
  display: grid;
}

.content-panel-shadow,
.content-panel {
  grid-area: 1 / 1;
}

.content-panel-shadow {
  z-index: 0;
  pointer-events: none;
  box-shadow: 0 1.5rem 4rem rgba(39, 38, 36, 0.16);
  opacity: 1;
  transition: opacity 420ms cubic-bezier(0.22, 1, 0.36, 1) 280ms;
  will-change: opacity;
}

.content-panel {
  position: relative;
  z-index: 1;
  width: 100%;
  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);
}

.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 color-mix(in srgb, var(--panel-mode-color) 48%, #94958f); background: var(--ambient-panel-copy); transition: border-color 240ms ease; }
.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); }
  .diagnostics-panel { bottom: 2.9rem; left: 0.5rem; }
  .diagnostics-launcher { bottom: 0.65rem; left: 0.75rem; }
}

@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-canvas { display: none; }
}
