/* ============================================================
   Whyrl Digital — whyrl.digital
   Palette derived from the logo: cyan → deep indigo swirl.
   ============================================================ */

:root {
  --paper:  #FAFBFD;
  --ink:    #10143C;
  --indigo: #2E3192;
  --deep:   #181C63;
  --cyan:   #18A0E0;
  --sky:    #E8F4FC;
  --line:   #DCE3EE;
  --muted:  #4A5070;

  --font-sans: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "IBM Plex Mono", "SF Mono", Menlo, monospace;

  --shell-max: 1120px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.6;
  font-size: 1.0625rem;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

.shell {
  max-width: var(--shell-max);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- type ---------- */

h1, h2, h3 {
  font-stretch: 115%;
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2.3rem, 4.6vw, 3.3rem); font-stretch: 122%; font-weight: 850; }
h2 { font-size: clamp(1.9rem, 4vw, 2.9rem); }
h3 { font-size: 1.45rem; line-height: 1.2; }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--cyan);
  margin-bottom: 1rem;
}

.accent { color: var(--cyan); }

/* ---------- buttons ---------- */

.btn {
  display: inline-block;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  padding: 0.8rem 1.6rem;
  border-radius: 999px;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.btn:hover { transform: translateY(-2px); }
.btn:focus-visible { outline: 3px solid var(--cyan); outline-offset: 3px; }

.btn-solid {
  background: var(--indigo);
  color: #fff;
}
.btn-solid:hover {
  background: var(--deep);
  box-shadow: 0 8px 24px rgba(46, 49, 146, 0.28);
}

.btn-ghost {
  color: var(--indigo);
  border: 2px solid var(--line);
}
.btn-ghost:hover { border-color: var(--cyan); }

.btn-lg { font-size: 1.15rem; padding: 1rem 2.2rem; }

/* ---------- header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(250, 251, 253, 0.88);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.header-row {
  display: flex;
  align-items: center;
  gap: 2rem;
  padding-top: 14px;
  padding-bottom: 14px;
}

.brand-logo { height: 30px; width: auto; }

.site-nav {
  display: flex;
  gap: 1.6rem;
  margin-left: auto;
}

.site-nav a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
}
.site-nav a:hover { color: var(--cyan); }
.site-nav a:focus-visible { outline: 3px solid var(--cyan); outline-offset: 3px; }

.header-cta { padding: 0.55rem 1.2rem; font-size: 0.9rem; }

/* ---------- hero ---------- */

.hero { overflow: hidden; }

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: center;
  gap: 3rem;
  padding-top: 90px;
  padding-bottom: 100px;
}

.lede {
  font-size: 1.2rem;
  color: var(--muted);
  max-width: 34em;
  margin-top: 1.4rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 2.2rem;
}

/* the signature: the swirl mark inside slow elliptical orbits,
   tilted like the ellipse of the logo itself */
.hero-mark {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 380px;
}

.hero-icon {
  width: min(46%, 240px);
  filter: drop-shadow(0 18px 40px rgba(24, 160, 224, 0.25));
}

.orbit {
  position: absolute;
  border: 1.5px solid var(--line);
  border-radius: 50%;
  transform: rotate(-18deg);
}

.orbit-outer {
  width: 120%;
  aspect-ratio: 1.45;
  animation: spin 46s linear infinite;
}

.orbit-inner {
  width: 86%;
  aspect-ratio: 1.45;
  border-style: dashed;
  border-color: #C7E5F7;
  animation: spin 30s linear infinite reverse;
}

.orbit-dot {
  position: absolute;
  top: 50%;
  left: -6px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--cyan);
}

@keyframes spin {
  from { transform: rotate(-18deg); }
  to   { transform: rotate(342deg); }
}

/* ---------- products ---------- */

.products {
  border-top: 1px solid var(--line);
  padding: 90px 0;
  background: #fff;
}

.product {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 3rem;
  align-items: center;
  margin-top: 3.5rem;
  padding: 2.6rem;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--paper);
}

.product-alt .product-info { order: 2; }
.product-alt .product-visual { order: 1; }

.product-tag {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  margin-bottom: 0.6rem;
}

.product-info h3 { font-size: 2rem; margin-bottom: 0.9rem; }
.product-info p { color: var(--muted); }

.chips {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.4rem;
}

.chips li {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  background: var(--sky);
  color: var(--indigo);
}

.product-more { margin-top: 1.3rem; }

.product-more a {
  color: var(--cyan);
  font-weight: 700;
  text-decoration: none;
}
.product-more a:hover { text-decoration: underline; }
.product-more a:focus-visible { outline: 3px solid var(--cyan); outline-offset: 3px; }

/* portal map — OMS visual */
.portal-map {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.8rem;
  padding-top: 4.5rem;
}

.portal-node {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  text-align: center;
  padding: 0.9rem 0.4rem;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
}

.portal-core {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  min-width: 40%;
  background: var(--indigo);
  border-color: var(--indigo);
  color: #fff;
  font-weight: 700;
}

/* flow line — Order-Flow Pro visual */
.flow-line {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.flow-step {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  padding: 0.9rem 1.1rem;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.flow-arrow { color: var(--cyan); font-weight: 700; }

/* ---------- approach (dark band) ---------- */

.approach {
  background: var(--deep);
  color: #fff;
  padding: 100px 0;
}

.approach h2 { color: #fff; }

.eyebrow-light { color: #6FC8F0; }

.approach-lede {
  color: #B9C1E8;
  font-size: 1.15rem;
  max-width: 38em;
  margin-top: 1.4rem;
}

.steps {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  margin-top: 4rem;
}

.step-num {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--cyan);
  display: block;
  margin-bottom: 0.9rem;
  padding-bottom: 0.9rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
}

.step h3 { color: #fff; margin-bottom: 0.7rem; }
.step p { color: #B9C1E8; font-size: 0.98rem; }

/* ---------- about ---------- */

.about { padding: 100px 0; background: #fff; border-bottom: 1px solid var(--line); }

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 3rem;
  align-items: start;
}

.about-copy p { color: var(--muted); }
.about-copy p + p { margin-top: 1.1rem; }

/* ---------- contact ---------- */

.contact { padding: 100px 0; }

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 4rem;
  align-items: start;
}

.contact-lede {
  color: var(--muted);
  font-size: 1.15rem;
  margin-top: 1.2rem;
  max-width: 30em;
}

.contact-direct {
  color: var(--muted);
  font-size: 0.98rem;
  margin-top: 1.6rem;
  padding-top: 1.6rem;
  border-top: 1px solid var(--line);
}
.contact-direct strong { color: var(--indigo); font-weight: 700; }

.contact-form {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 2.2rem;
  display: grid;
  gap: 1.2rem;
}

.field { display: grid; gap: 0.45rem; }

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2rem;
}

.field label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
}

.field .optional {
  text-transform: none;
  letter-spacing: 0;
  color: #9AA3BD;
}

.field input,
.field select,
.field textarea {
  font-family: var(--font-sans);
  font-size: 1rem;
  color: var(--ink);
  background: var(--paper);
  border: 1.5px solid var(--line);
  border-radius: 10px;
  padding: 0.7rem 0.9rem;
  width: 100%;
}

.field select { appearance: auto; }
.field textarea { resize: vertical; min-height: 120px; }

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: 3px solid rgba(24, 160, 224, 0.35);
  outline-offset: 0;
  border-color: var(--cyan);
}

.field input.invalid,
.field select.invalid,
.field textarea.invalid { border-color: #C0392B; }

.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.form-submit { justify-self: start; }
.form-submit[disabled] { opacity: 0.6; cursor: default; }

.form-status { font-size: 0.95rem; color: var(--muted); min-height: 1.4em; margin: 0; }
.form-status.error { color: #C0392B; }

.form-sent { text-align: left; padding: 1rem 0; }
.form-sent h3 { margin-bottom: 0.6rem; }
.form-sent p { color: var(--muted); }

/* ---------- footer ---------- */

.site-footer {
  background: var(--deep);
  padding: 40px 0;
}

.footer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.footer-logo {
  height: 24px;
  width: auto;
  filter: brightness(0) invert(1);   /* black logo → white on the dark footer */
}

.site-footer p {
  color: #B9C1E8;
  font-family: var(--font-mono);
  font-size: 0.8rem;
}

/* ---------- scroll reveal ---------- */

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
  opacity: 1;
  transform: none;
}

/* ---------- reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .orbit-outer, .orbit-inner { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .btn { transition: none; }
  .btn:hover { transform: none; }
}

/* ---------- responsive ---------- */

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; padding-top: 60px; padding-bottom: 60px; }
  .hero-mark { min-height: 300px; order: -1; }
  .hero-icon { width: min(40%, 180px); }

  .product,
  .product-alt { grid-template-columns: 1fr; gap: 2rem; padding: 1.8rem; }
  .product-alt .product-info { order: 1; }
  .product-alt .product-visual { order: 2; }

  .steps { grid-template-columns: repeat(2, 1fr); }

  .about-grid { grid-template-columns: 1fr; gap: 1.5rem; }

  .contact-grid { grid-template-columns: 1fr; gap: 2.5rem; }
}

@media (max-width: 640px) {
  .site-nav { display: none; }
  .steps { grid-template-columns: 1fr; }
  .footer-row { flex-direction: column; }
  .field-row { grid-template-columns: 1fr; }
  .contact-form { padding: 1.5rem; }
}
