/* rytento studios — shared styles */

:root {
  --bg: #060b11;
  --bg-2: #0a141c;
  --surface: rgba(223, 246, 255, 0.035);
  --surface-2: rgba(223, 246, 255, 0.06);
  --line: rgba(223, 246, 255, 0.09);
  --line-2: rgba(223, 246, 255, 0.16);
  --ink: #e6f6fd;
  --ink-2: #a2b6c0;
  --muted: #6a7e88;
  --accent: #86d6ee;
  --accent-wash: rgba(134, 214, 238, 0.12);
  --glow: rgba(59, 115, 131, 0.55);
  --glow-2: rgba(44, 92, 110, 0.4);
  --btn-bg: #e6f6fd;
  --btn-fg: #06101a;
  --ok: #7fe0a8;
  --warn: #f0c878;
  --bad: #f09090;
  --shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
  --font: "Poppins", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --r: 20px;
  --nav-h: 68px;
  color-scheme: dark;
}

:root[data-theme="light"] {
  --bg: #f1f5f7;
  --bg-2: #e6eef2;
  --surface: rgba(255, 255, 255, 0.7);
  --surface-2: #ffffff;
  --line: rgba(7, 17, 26, 0.09);
  --line-2: rgba(7, 17, 26, 0.16);
  --ink: #07111a;
  --ink-2: #3b4e59;
  --muted: #6b7e88;
  --accent: #1d6a80;
  --accent-wash: rgba(29, 106, 128, 0.1);
  --glow: rgba(120, 180, 200, 0.45);
  --glow-2: rgba(160, 205, 220, 0.4);
  --btn-bg: #07111a;
  --btn-fg: #f1f5f7;
  --ok: #1f8a52;
  --warn: #a06a10;
  --bad: #b83c3c;
  --shadow: 0 24px 60px rgba(20, 50, 70, 0.1);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 24px); }

body {
  font-family: var(--font);
  font-weight: 400;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  transition: background 0.35s ease, color 0.35s ease;
}

a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }
img, svg { display: block; max-width: 100%; }
::selection { background: var(--accent); color: var(--bg); }

.wrap { width: min(1140px, calc(100% - 40px)); margin-inline: auto; }

/* Backdrop: soft teal glows, echoing the banner */
.backdrop {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(38% 55% at 4% 62%, var(--glow), transparent 70%),
    radial-gradient(34% 50% at 96% 18%, var(--glow), transparent 70%),
    radial-gradient(60% 50% at 50% 110%, var(--glow-2), transparent 70%),
    linear-gradient(180deg, var(--bg), var(--bg-2));
}

.backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(ellipse 70% 50% at 50% 20%, #000 10%, transparent 75%);
  opacity: 0.55;
}

/* Wordmark: light + bold, like the logo */
.wordmark { font-weight: 300; letter-spacing: -0.02em; }
.wordmark b { font-weight: 700; }

/* Nav */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  border-bottom: 1px solid transparent;
  transition: background 0.3s, border-color 0.3s, backdrop-filter 0.3s;
}

.nav.scrolled {
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  border-bottom-color: var(--line);
  backdrop-filter: blur(16px) saturate(1.2);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
}

.nav .wrap { display: flex; align-items: center; justify-content: space-between; gap: 20px; }

.nav-brand { display: inline-flex; align-items: center; gap: 11px; font-size: 1.08rem; }
.nav-brand img { width: 34px; height: 34px; border-radius: 9px; border: 1px solid var(--line-2); }

.nav-links { display: flex; align-items: center; gap: 4px; list-style: none; }
.nav-links a {
  display: block;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--ink-2);
  padding: 8px 14px;
  border-radius: 999px;
  transition: color 0.2s, background 0.2s;
}
.nav-links a:hover, .nav-links a.active { color: var(--ink); background: var(--surface-2); }

.nav-right { display: flex; align-items: center; gap: 8px; }

.icon-btn {
  width: 40px;
  height: 40px;
  display: inline-grid;
  place-items: center;
  border-radius: 12px;
  border: 1px solid var(--line-2);
  background: var(--surface);
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}
.icon-btn:hover { background: var(--surface-2); transform: translateY(-1px); }
.icon-btn svg { width: 18px; height: 18px; }
.theme-toggle .i-sun { display: none; }
[data-theme="light"] .theme-toggle .i-sun { display: block; }
[data-theme="light"] .theme-toggle .i-moon { display: none; }
.menu-btn { display: none; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 22px;
  border-radius: 999px;
  font-size: 0.93rem;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.2s, background 0.2s, box-shadow 0.2s, border-color 0.2s;
}
.btn:hover { transform: translateY(-2px); }
.btn svg { width: 16px; height: 16px; }
.btn-primary { background: var(--btn-bg); color: var(--btn-fg); }
.btn-primary:hover { box-shadow: 0 10px 30px var(--glow); }
.btn-ghost { border-color: var(--line-2); background: var(--surface); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-sm { padding: 9px 16px; font-size: 0.85rem; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

/* Sections */
section { padding: 110px 0; position: relative; }

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 18px;
}
.kicker::before { content: ""; width: 22px; height: 1px; background: currentColor; }

.title {
  font-size: clamp(2rem, 4.4vw, 3.2rem);
  font-weight: 300;
  line-height: 1.08;
  letter-spacing: -0.035em;
  margin-bottom: 18px;
}
.title b { font-weight: 700; }

.lead { color: var(--ink-2); font-size: 1.05rem; max-width: 54ch; margin-bottom: 48px; }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--mono);
  font-size: 0.74rem;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  color: var(--ink-2);
  white-space: nowrap;
}

/* `hidden` must win over component display rules (e.g. `.panel form { display: grid }`). */
[hidden] { display: none !important; }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
code { font-family: var(--mono); font-size: 0.9em; padding: 1px 6px; border-radius: 6px; background: var(--surface-2); border: 1px solid var(--line); }

.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.8s ease, transform 0.8s ease; }
.reveal.in { opacity: 1; transform: none; }

/* Forms */
.field { display: flex; flex-direction: column; gap: 8px; }
.field label {
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.field input, .field textarea, .field select {
  width: 100%;
  padding: 13px 15px;
  border-radius: 12px;
  border: 1px solid var(--line-2);
  background: color-mix(in srgb, var(--bg) 60%, transparent);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.field select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 20px) 55%, calc(100% - 15px) 55%; background-size: 5px 5px; background-repeat: no-repeat; }
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-wash); }
.field textarea { min-height: 140px; resize: vertical; }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.status-line { font-family: var(--mono); font-size: 0.8rem; color: var(--accent); min-height: 1.3em; }

/* Footer */
footer { padding: 48px 0 60px; border-top: 1px solid var(--line); }
.foot { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.foot-brand { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 0.88rem; }
.foot-brand img { width: 28px; height: 28px; border-radius: 8px; }
.foot-links { display: flex; gap: 6px; list-style: none; }
.foot-links a { font-size: 0.86rem; color: var(--ink-2); padding: 6px 10px; }
.foot-links a:hover { color: var(--ink); }

/* Responsive */
@media (max-width: 820px) {
  .menu-btn { display: inline-grid; }
  .nav-links {
    display: none;
    position: absolute;
    top: calc(var(--nav-h) - 4px);
    left: 16px;
    right: 16px;
    flex-direction: column;
    align-items: stretch;
    padding: 10px;
    border-radius: 16px;
    background: var(--bg-2);
    border: 1px solid var(--line-2);
    box-shadow: var(--shadow);
  }
  .nav-links.open { display: flex; }
  .row-2 { grid-template-columns: 1fr; }
  section { padding: 80px 0; }
  .wrap { width: calc(100% - 32px); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}
