/* OddlyFunctional — base layout */

:root {
  --bg: #0e1016;
  --bg-alt: #151925;
  --surface: #1b2030;
  --border: #2a3145;
  --text: #e8ebf2;
  --muted: #9aa3b8;
  --accent: #7c5cff;       /* rift violet */
  --accent-2: #2ee6c5;     /* rift teal */
  --radius: 12px;
  --max: 1120px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --display: "Space Grotesk", var(--font);
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-family: var(--display); line-height: 1.15; margin: 0 0 .5em; }
h2 { font-size: clamp(1.75rem, 3vw, 2.4rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
a { color: inherit; }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .container { padding: 0 32px; } }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: .75em 1.4em;
  border: 1px solid var(--accent);
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font: 600 .95rem var(--font);
  text-decoration: none;
  cursor: pointer;
  transition: transform .15s, background .15s;
}
.btn:hover { transform: translateY(-1px); background: #8f73ff; }
.btn-ghost { background: transparent; border-color: var(--border); }
.btn-ghost:hover { background: var(--surface); }
.btn-small { padding: .45em 1.1em; font-size: .85rem; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: rgba(14, 16, 22, .85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: flex; align-items: center; gap: .6rem; text-decoration: none; }
/* Shows only the multitool from the square logo (tool spans ~x 260-780, y 180-700 of 1024). */
.brand-mark {
  position: relative; flex: none;
  width: 40px; height: 40px; border-radius: 10px;
  background: #fff; overflow: hidden;
}
.brand-mark img {
  position: absolute; width: 194%; max-width: none;
  left: -49%; top: -33%;
}
.brand-name { font: 500 1.1rem var(--display); color: #e05a5a; }
.brand-name b { font-weight: 700; color: var(--text); }
.nav-links { display: flex; align-items: center; gap: 1.5rem; list-style: none; margin: 0; padding: 0; }
.nav-links a:not(.btn) { color: var(--muted); text-decoration: none; font-size: .95rem; }
.nav-links a:not(.btn):hover { color: var(--text); }
@media (max-width: 560px) {
  .nav-links { gap: .9rem; }
  .nav-links li:nth-child(2), .nav-links li:nth-child(3) { display: none; }
}

/* Hero */
.hero {
  position: relative;
  min-height: min(88vh, 760px);
  display: flex; align-items: flex-end;
  padding: 120px 0 72px;
  overflow: hidden;
}
.hero-art {
  position: absolute; inset: 0;
  background: var(--bg-alt) url("assets/art/background/site_hero_riftwake_02.webp") 65% center / cover no-repeat;
}
/* Darken the left and bottom so the headline stays readable over busy art */
.hero-art::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(to top, var(--bg) 4%, rgba(14, 16, 22, .2) 55%, transparent 80%),
    linear-gradient(to right, rgba(14, 16, 22, .92) 0%, rgba(14, 16, 22, .6) 45%, transparent 75%);
}
@media (max-width: 720px) {
  .hero-art::after { background: linear-gradient(to top, var(--bg) 10%, rgba(14, 16, 22, .75) 60%, rgba(14, 16, 22, .45)); }
}
.hero-content { position: relative; max-width: var(--max); }
.hero h1 { font-size: clamp(3rem, 9vw, 6rem); letter-spacing: -.02em; margin: .2em 0 .15em; }
.lead { font-size: clamp(1.05rem, 2vw, 1.3rem); color: var(--muted); max-width: 34em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin: 1.5rem 0 1rem; }
.hero-meta { color: var(--muted); font-size: .85rem; margin: 0; }

.badge {
  display: inline-flex; align-items: center; gap: .5em;
  padding: .3em .85em;
  border: 1px solid rgba(46, 230, 197, .4);
  border-radius: 999px;
  color: var(--accent-2);
  font-size: .8rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase;
}
.badge::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent-2);
  animation: pulse 2s infinite;
}
@keyframes pulse { 50% { opacity: .3; } }
@media (prefers-reduced-motion: reduce) { .badge::before { animation: none; } html { scroll-behavior: auto; } }

/* Sections */
.section { padding: 96px 0; }
.section-alt { background: var(--bg-alt); border-block: 1px solid var(--border); }
.eyebrow {
  color: var(--accent-2); font-size: .8rem; font-weight: 600;
  letter-spacing: .12em; text-transform: uppercase; margin-bottom: .6em;
}
.section-intro { color: var(--muted); max-width: 40em; font-size: 1.05rem; }

/* Features */
.features {
  display: grid; gap: 1rem; margin-top: 2.5rem;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}
.feature {
  padding: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.feature p { color: var(--muted); margin: 0; font-size: .95rem; }

/* Concept art */
.concepts {
  display: grid; gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}
@media (max-width: 360px) { .concepts { grid-template-columns: 1fr; } }
.concept {
  position: relative; display: block; overflow: hidden;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
}
.concept img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform .3s;
}
.concept:hover img { transform: scale(1.04); }
.concept span {
  position: absolute; left: .75rem; bottom: .6rem;
  padding: .2em .7em; border-radius: 999px;
  background: rgba(14, 16, 22, .75);
  font-size: .8rem; font-weight: 600; text-decoration: none;
}
/* Concept art tabs */
.tabs {
  display: flex; gap: .5rem; margin-top: 2rem;
  overflow-x: auto; scrollbar-width: none; padding-bottom: 2px;
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
  flex: none;
  padding: .5em 1.1em;
  border: 1px solid var(--border); border-radius: 999px;
  background: transparent; color: var(--muted);
  font: 500 .9rem var(--font); cursor: pointer;
}
.tab:hover { color: var(--text); background: var(--surface); }
.tab[aria-selected="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }
.tab:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px; }
.tab .count { opacity: .7; font-size: .8em; margin-left: .2em; }
.tab-panel { margin-top: 1.25rem; }
.tab-panel:focus-visible { outline: none; }
.tab-panel[hidden] { display: none; }

/* Square concept sheets: objects on white, shown on light tiles */
.concepts-square { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
.concept-square { aspect-ratio: 1; background: #fff; border-color: transparent; }
.concept-square img { object-fit: contain; padding: 8%; }
.concept-square span {
  left: .5rem; right: .5rem; bottom: .45rem;
  text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  font-size: .75rem;
}
.concept-fill { background: var(--surface); }
.concept-fill img { object-fit: cover; padding: 0; }
.concepts-scene { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.concepts-scene .concept-square { background: var(--surface); border-color: var(--border); }
.concepts-scene .concept-square img { object-fit: cover; padding: 0; }
@media (max-width: 480px) { .concepts-square { grid-template-columns: repeat(2, 1fr); gap: .6rem; } }

.concept:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) { .concept img { transition: none; } }

/* Devlog */
.devlog-intro { color: var(--muted); max-width: 62ch; }
.timeline {
  list-style: none; margin: 2.5rem 0 0; padding: 0 0 0 1.75rem;
  position: relative; max-width: 760px;
}
.timeline::before {
  content: ""; position: absolute; left: .45rem; top: .4rem; bottom: .4rem; width: 2px;
  background: linear-gradient(var(--accent), var(--accent-2));
}
.milestone { position: relative; padding-bottom: 2.25rem; }
.milestone:last-child { padding-bottom: 0; }
.milestone::before {
  content: ""; position: absolute; left: calc(-1.75rem + .45rem - 6px); top: .35rem;
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--bg); border: 3px solid var(--accent);
}
.milestone-next::before { border-color: var(--accent-2); border-style: dashed; }
.milestone-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; margin: 0 0 .35rem; }
.milestone-meta time { color: var(--muted); font-size: .85rem; }
.tag {
  font-size: .72rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  color: var(--accent-2); border: 1px solid var(--border); background: var(--surface);
  padding: .15em .6em; border-radius: 999px;
}
.milestone p:not(.milestone-meta) { color: var(--muted); margin: 0; }
.link { color: var(--accent-2); text-decoration: none; font-weight: 600; font-size: .9rem; }
.link:hover { text-decoration: underline; }

/* About */
.about { display: grid; gap: 3rem; align-items: center; }
@media (min-width: 820px) { .about { grid-template-columns: 1.1fr 1fr; } }
.about p { color: var(--muted); }
.about-art {
  width: 100%; height: auto; display: block;
  aspect-ratio: 4 / 3; object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
}

/* CTA */
.section-cta { background: linear-gradient(135deg, rgba(124, 92, 255, .18), rgba(46, 230, 197, .1)); border-top: 1px solid var(--border); }
.cta { text-align: center; }
.cta p { color: var(--muted); }
.signup { display: flex; flex-wrap: wrap; justify-content: center; gap: .6rem; margin-top: 1.5rem; }

/* Footer */
.site-footer { border-top: 1px solid var(--border); padding: 32px 0; }
.footer { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; align-items: center; color: var(--muted); font-size: .9rem; }
.footer p { margin: 0; }
.footer-links { display: flex; gap: 1.25rem; list-style: none; margin: 0; padding: 0; }
.footer a { text-decoration: none; }
.footer a:hover { color: var(--text); }
