/* One Bright Space — Calm editorial.
   Desktop: one full-width screen, no scroll, fluid type scales to fit.
   Mobile: relaxed, beautiful vertical layout. */

:root {
  --ink: #414042;
  --ink-strong: #2c2c2e;
  --muted: #54545a;
  --muted-2: #8a8a90;
  --muted-3: #a0a0a6;
  --line: #ececee;
  --line-2: #e6e6e8;
  --bg: #ffffff;
  --yellow: #ffcc05;
  --yellow-hover: #f0be00;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'Archivo', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.5;
}
h1, h2, h3 { margin: 0; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
img { max-width: 100%; display: block; }
a { color: inherit; }

/* The single screen */
.screen {
  position: relative;
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.pad {
  position: relative;
  z-index: 1;
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: clamp(18px, 2.6vh, 30px) clamp(28px, 6vw, 96px) 0;
}

/* Decorative rings echo, bleeding off the right */
.rings {
  position: absolute;
  z-index: 0;
  pointer-events: none;
  user-select: none;
  right: clamp(-150px, -7vw, -70px);
  top: clamp(56px, 14vh, 150px);
  width: clamp(300px, 42vw, 540px);
  opacity: 0.85;
  perspective: 1200px;
}
.rings-gz, .rings-gx, .rings-gy { transform-style: preserve-3d; }
.rings img { display: block; width: 100%; height: auto; }

.eyebrow {
  font-size: clamp(11px, 1.05vw, 13px);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--yellow);
  font-weight: 700;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--yellow);
  color: var(--ink-strong);
  font-weight: 700;
  font-family: inherit;
  font-size: clamp(14px, 1.05vw, 16px);
  padding: clamp(12px, 1.5vh, 15px) clamp(22px, 2vw, 30px);
  border: none;
  border-radius: 999px;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.16s ease, transform 0.16s ease;
}
.btn:hover { background: var(--yellow-hover); }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: 3px solid rgba(255, 204, 5, 0.55); outline-offset: 2px; }
.btn--sm { font-size: clamp(13px, 0.95vw, 14px); padding: 10px 20px; }

/* Header */
.site-header {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: clamp(8px, 1.6vh, 18px);
}
.brand img { height: clamp(30px, 4.2vh, 42px); width: auto; mix-blend-mode: multiply; }
.nav { display: flex; align-items: center; gap: clamp(16px, 1.8vw, 26px); }
.nav .contact-link { font-size: clamp(12px, 1vw, 14px); color: var(--muted-2); text-decoration: none; white-space: nowrap; }
.nav .contact-link:hover { color: var(--ink); }

/* Hero — grows to absorb slack, content vertically centred */
.hero {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-bottom: clamp(8px, 1.6vh, 20px);
}
.hero h1 {
  font-size: clamp(28px, min(4.7vw, 6.4vh), 56px);
  line-height: 1.04;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -0.018em;
  margin-top: clamp(10px, 1.8vh, 18px);
  max-width: 16ch;
}
.hero .lead {
  font-size: clamp(14px, min(1.75vw, 2.4vh), 19px);
  line-height: 1.55;
  color: var(--muted);
  margin-top: clamp(10px, 1.8vh, 20px);
  max-width: 52ch;
  min-height: 3em;
}
.cta-row {
  display: flex;
  align-items: center;
  gap: clamp(14px, 1.6vw, 22px);
  margin-top: clamp(16px, 3vh, 36px);
  flex-wrap: wrap;
}
.cta-note { font-size: clamp(13px, 1vw, 15px); color: var(--muted-2); }
.cta-note a { color: var(--ink); font-weight: 600; text-decoration: none; }
.cta-note a:hover { color: #000; }

/* Services */
.services { flex: none; border-top: 1px solid var(--line); padding-top: clamp(12px, 2vh, 18px); }
.services h2 {
  font-size: clamp(10px, 0.95vw, 12px);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted-3);
  font-weight: 700;
  margin-bottom: clamp(8px, 1.6vh, 14px);
}
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(8px, 1.5vh, 14px) clamp(24px, 3vw, 48px); }
.grid .name { font-size: clamp(13px, min(1.25vw, 1.7vh), 16px); font-weight: 700; color: var(--ink-strong); }
.grid .desc { font-size: clamp(11px, 1vw, 13px); color: var(--muted-2); margin-top: 1px; }

/* Footer — coastline flush at the very bottom; caption always clear of it.
   Wide screens: caption bottom-left, scene bottom-right. Narrow: caption stacks above. */
.site-footer {
  position: relative;
  z-index: 1;
  flex: none;
  width: 100%;
  margin-top: clamp(12px, 2vh, 18px);
}
.footer-scene {
  position: relative;
  width: 100%;
  height: clamp(122px, 17vh, 170px);
  --band-h: clamp(16px, 2.4vh, 26px);
}
.footer-scene .coast { position: absolute; right: 0; bottom: calc(var(--band-h) - 3px); width: min(800px, 50%); height: auto; }
.footer-scene .band {
  position: absolute; left: 0; right: 0; bottom: 0;
  height: var(--band-h);
  background: #f1c976 url('assets/footer-band.png') center/100% 100% no-repeat;
}
.footer-caption {
  position: absolute;
  left: clamp(28px, 6vw, 96px);
  bottom: clamp(30px, 5vh, 46px);
  max-width: 44%;
  z-index: 2;
  font-size: clamp(12px, 1vw, 13px);
  color: #9a9a9a;
}
.footer-caption strong { color: var(--ink); font-weight: 600; }

/* ---------- Mobile: relaxed, beautiful, scrolls naturally ---------- */
@media (max-width: 760px) {
  .screen { height: auto; min-height: 100dvh; overflow: visible; }
  .pad { padding: 24px 24px 0; }
  .site-header { padding-bottom: 20px; }
  .nav .contact-link { display: none; }
  .rings { opacity: 0.28; width: min(86vw, 360px); right: -30vw; top: 6vh; }
  .hero { padding: clamp(28px, 9vh, 64px) 0 clamp(22px, 6vh, 44px); }
  .hero h1 { font-size: clamp(33px, 8.6vw, 48px); max-width: 18ch; }
  .hero .lead { font-size: clamp(16px, 4.3vw, 19px); max-width: 40ch; }
  .cta-row { margin-top: 30px; gap: 16px; }
  .cta-note { font-size: 14px; }
  .services { padding-top: 24px; }
  .services h2 { margin-bottom: 16px; }
  .grid { grid-template-columns: 1fr 1fr; gap: 20px 26px; }
  .grid .name { font-size: 15px; }
  .grid .desc { font-size: 13px; }
  .site-footer { margin-top: 30px; }
  .footer-caption { position: static; max-width: none; left: auto; bottom: auto; padding: 0 24px 12px; font-size: 12.5px; }
  .footer-scene { height: clamp(150px, 42vw, 200px); }
  .footer-scene .coast { width: 84%; }
}
@media (max-width: 430px) {
  .grid { grid-template-columns: 1fr; gap: 14px; }
  .hero h1 { font-size: clamp(30px, 9.2vw, 42px); }
}

/* ---------- Rings — gentle spin, with occasional independent 3D tumbles ---------- */
@keyframes ring-spin { to { transform: rotate(360deg); } }
@keyframes ring-tiltx { 0%, 70%, 100% { transform: rotateX(0); } 80% { transform: rotateX(-26deg); } 90% { transform: rotateX(7deg); } 96% { transform: rotateX(0); } }
@keyframes ring-tilty { 0%, 52%, 100% { transform: rotateY(0); } 62% { transform: rotateY(30deg); } 73% { transform: rotateY(-8deg); } 82% { transform: rotateY(0); } }
@media (prefers-reduced-motion: no-preference) {
  .rings-gz { animation: ring-spin 48s linear infinite; will-change: transform; }
}
@media (min-width: 761px) and (prefers-reduced-motion: no-preference) {
  .rings-gx { animation: ring-tiltx 41s ease-in-out infinite; }
  .rings-gy { animation: ring-tilty 53s ease-in-out infinite; }
}

/* ---------- Hero typewriter ---------- */
.tw { display: block; }
.tw-line { display: block; white-space: nowrap; height: 1lh; }
.tw-off { color: transparent; }
.tw-line.caret .tw-on::after {
  content: '';
  display: inline-block;
  width: 2px;
  height: 1em;
  margin-left: 2px;
  margin-right: -4px;
  background: currentColor;
  vertical-align: -0.12em;
  animation: caret-blink 1.05s steps(1) infinite;
}
@keyframes caret-blink { 50% { opacity: 0; } }

/* ---------- Contact modal ---------- */
.modal[hidden] { display: none; }
.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(28, 28, 30, 0.5);
  backdrop-filter: saturate(140%) blur(4px);
  animation: fade 0.25s ease;
}
.modal__sheet {
  position: relative;
  width: 100%;
  max-width: 460px;
  background: #fff;
  border-radius: 18px;
  padding: clamp(24px, 3vw, 36px);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
  animation: pop 0.28s cubic-bezier(0.2, 0.8, 0.25, 1);
  max-height: calc(100dvh - 48px);
  overflow-y: auto;
}
.modal__close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 38px;
  height: 38px;
  border: none;
  border-radius: 50%;
  background: #f3f3f4;
  color: #54545a;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.modal__close:hover { background: #e8e8ea; color: #2c2c2e; }
.modal__sheet h2 {
  font-size: clamp(24px, 3.4vw, 32px);
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -0.015em;
  margin-top: 10px;
}
.modal__sub { font-size: 15px; color: var(--muted); margin-top: 12px; line-height: 1.5; }
.modal__sub a { color: var(--ink); font-weight: 600; text-decoration: none; white-space: nowrap; }
.modal form { margin-top: 22px; }
.field { margin-bottom: 15px; }
.field label { display: block; font-size: 13px; font-weight: 600; color: var(--ink); margin-bottom: 6px; }
.field input, .field textarea {
  width: 100%;
  font-family: inherit;
  font-size: 16px;
  color: var(--ink-strong);
  background: #fff;
  border: 1px solid var(--line-2);
  border-radius: 10px;
  padding: 12px 14px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.field input:focus, .field textarea:focus {
  outline: none;
  border-color: var(--yellow);
  box-shadow: 0 0 0 3px rgba(255, 204, 5, 0.25);
}
.field textarea { resize: vertical; min-height: 110px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.modal__actions { display: flex; align-items: center; gap: 14px; margin-top: 6px; flex-wrap: wrap; }
.modal__status { font-size: 14px; line-height: 1.4; margin: 0; }
.modal__status.ok { color: #1c7a46; }
.modal__status.err { color: #c0392b; }
.modal__note { font-size: 12.5px; color: var(--muted-3); margin-top: 14px; }
body.modal-open { overflow: hidden; }

@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop { from { opacity: 0; transform: translateY(12px) scale(0.98); } to { opacity: 1; transform: none; } }
@keyframes slideup { from { transform: translateY(100%); } to { transform: none; } }

@media (max-width: 560px) {
  .modal { padding: 0; align-items: flex-end; }
  .modal__sheet {
    max-width: none;
    border-radius: 20px 20px 0 0;
    max-height: 92dvh;
    padding: 26px 22px calc(22px + env(safe-area-inset-bottom));
    animation: slideup 0.32s cubic-bezier(0.2, 0.8, 0.25, 1);
  }
}
@media (prefers-reduced-motion: reduce) {
  .modal__overlay, .modal__sheet { animation: none; }
  .rings { animation: none; }
}
