/* Soraline · landing v1.0 */

:root {
  --sora-blue: #1793d1;
  --sora-sky: #5cc0ee;
  --sora-deep: #0b6fa4;

  --font-display: "Outfit", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;

  --radius-s: 10px;
  --radius-m: 16px;
  --radius-l: 24px;
  --ease: cubic-bezier(0.65, 0, 0.35, 1);
}

/* Tema oscuro (por defecto) */
:root,
[data-theme="dark"] {
  color-scheme: dark;
  --bg: #15181d;
  --surface: #1d2127;
  --border: #2c323b;
  --text: #f4f6f8;
  --text-muted: #9aa4b1;
  --accent: var(--sora-blue);
  --accent-text: var(--sora-sky);
  --on-accent: #0b1218;
  --grad-a: #5cc0ee;
  --grad-b: #1793d1;
}

[data-theme="light"] {
  color-scheme: light;
  --bg: #f4f6f8;
  --surface: #ffffff;
  --border: #dde2e8;
  --text: #15181d;
  --text-muted: #556070;
  --accent: var(--sora-deep);
  --accent-text: var(--sora-deep);
  --on-accent: #ffffff;
  --grad-a: #1793d1;
  --grad-b: #0b6fa4;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 88px; }

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

h1, h2, h3, p { margin: 0; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent-text); }
:focus-visible { outline: 3px solid var(--sora-sky); outline-offset: 3px; border-radius: 6px; }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.g-a { stop-color: var(--grad-a); }
.g-b { stop-color: var(--grad-b); }

.wrap { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 24px; }
.wrap--narrow { max-width: 960px; }

.muted { color: var(--text-muted); }
.accent { color: var(--accent-text); }

.skip {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  background: var(--accent); color: var(--on-accent); padding: 10px 16px; border-radius: var(--radius-s);
}
.skip:focus { top: 16px; }

/* Loader */
.loader {
  position: fixed; inset: 0; z-index: 200;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg);
  transition: opacity 0.4s ease, visibility 0.4s ease;
  animation: loader-failsafe 0.4s ease 4s forwards;
}
.loader.is-hidden { opacity: 0; visibility: hidden; }
.loader__spin { animation: spin 1.8s var(--ease) infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes loader-failsafe { to { opacity: 0; visibility: hidden; } }

/* Nav */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.nav__inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 72px; }
.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand__name {
  font-family: var(--font-display); font-weight: 600; font-size: 24px; letter-spacing: -0.03em; line-height: 1;
}
.brand--small .brand__name { font-size: 20px; }
.nav__links { display: flex; gap: 32px; font-size: 15px; }
.nav__links a { color: var(--text-muted); }
.nav__links a:hover { color: var(--text); }
.nav__actions { display: flex; align-items: center; gap: 12px; }

.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: var(--radius-s);
  background: transparent; color: var(--text); border: 1px solid var(--border); cursor: pointer;
}
.icon-btn:hover { border-color: var(--accent-text); color: var(--accent-text); }
[data-theme="dark"] .i-moon { display: none; }
[data-theme="light"] .i-sun { display: none; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 26px;
  background: var(--accent); color: var(--on-accent);
  font-weight: 600; font-size: 16px; border-radius: var(--radius-s);
  border: 1px solid transparent; transition: transform 0.15s ease, filter 0.15s ease;
}
.btn:hover { color: var(--on-accent); filter: brightness(1.08); transform: translateY(-1px); }
.btn--small { min-height: 44px; padding: 0 20px; font-size: 15px; }
.btn--big { min-height: 56px; padding: 0 34px; font-size: 18px; }
.btn--ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn--ghost:hover { color: var(--accent-text); border-color: var(--accent-text); filter: none; }

/* Type */
.eyebrow {
  font-size: 13px; letter-spacing: 0.14em; text-transform: uppercase; font-weight: 500; color: var(--text-muted);
  display: flex; align-items: center; gap: 14px; margin-bottom: 20px;
}
.eyebrow::before { content: ""; width: 40px; height: 2px; background: var(--sora-blue); }

h1, .h2, h3, .statement, .tagline, .entry__word {
  font-family: var(--font-display); font-weight: 600; letter-spacing: -0.03em;
}
h1 { font-size: clamp(48px, 9vw, 104px); line-height: 1.02; letter-spacing: -0.04em; }
.h2 { font-size: clamp(30px, 4.5vw, 48px); line-height: 1.12; margin-bottom: 40px; }
h3 { font-size: 24px; line-height: 1.2; }
.lead { font-size: clamp(18px, 2.2vw, 21px); line-height: 1.6; max-width: 600px; }
.lead--muted { color: var(--text-muted); }

/* Hero */
.hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--border); }
.hero__lines {
  position: absolute; right: 0; top: 0; height: 100%; width: min(620px, 70%);
  color: var(--sora-blue); pointer-events: none;
}
.hero__inner { position: relative; padding-top: 120px; padding-bottom: 120px; display: flex; flex-direction: column; gap: 28px; }
.hero__inner .eyebrow { margin-bottom: 0; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 8px; }

/* Sections */
.section { padding: 112px 0; }
.section--alt { background: var(--surface); border-block: 1px solid var(--border); }

.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-m);
  padding: 32px; display: flex; flex-direction: column; gap: 14px;
}
.card p { color: var(--text-muted); }
.card__n { font-family: var(--font-mono); font-size: 14px; color: var(--accent-text); }

/* Proyectos */
.project {
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-l);
  padding: 40px; display: flex; flex-wrap: wrap; gap: 28px 48px; justify-content: space-between; align-items: flex-end;
}
.project__body { display: flex; flex-direction: column; gap: 14px; max-width: 560px; }
.project__body h3 { font-size: 40px; letter-spacing: -0.03em; }
.project__body p { color: var(--text-muted); }
.project__tags { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; margin: 0; padding: 0; }
.project__tags li {
  font-family: var(--font-mono); font-size: 14px; padding: 8px 14px;
  border: 1px solid var(--border); border-radius: 999px; color: var(--text-muted);
}
.badge {
  align-self: flex-start; font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase;
  background: var(--accent); color: var(--on-accent); padding: 6px 12px; border-radius: 999px;
}

/* Nosotros · diccionario */
.entry { display: flex; flex-direction: column; gap: 18px; margin-bottom: 40px; }
.entry__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 12px 32px; }
.entry__word { font-size: clamp(64px, 12vw, 128px); line-height: 1; letter-spacing: -0.04em; }
.entry__say { display: flex; flex-direction: column; gap: 4px; }
.say { font-family: var(--font-mono); font-weight: 500; color: var(--accent-text); }
.entry__say .say { font-size: clamp(20px, 2.8vw, 30px); }
.ipa { font-family: var(--font-mono); font-size: 15px; color: var(--text-muted); }
.entry__type { font-style: italic; color: var(--text-muted); }

.dict { border: 1px solid var(--border); border-radius: var(--radius-m); overflow: hidden; margin-bottom: 72px; }
.dict__row {
  display: grid; grid-template-columns: 1fr 1fr 2fr; gap: 8px 24px; align-items: baseline;
  padding: 20px 24px; border-top: 1px solid var(--border);
}
.dict__row--head {
  background: var(--surface); border-top: 0; padding: 14px 24px;
  font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; font-weight: 500; color: var(--text-muted);
}
.dict__row--hl { background: var(--surface); }
.dict__w { font-family: var(--font-display); font-weight: 600; font-size: 24px; }
.kanji { font-family: "Noto Sans JP", sans-serif; font-weight: 500; color: var(--text-muted); }

.statement {
  font-size: clamp(30px, 4.6vw, 54px); line-height: 1.6; letter-spacing: -0.03em; max-width: 920px; margin-bottom: 56px;
}
.statement .hl { color: var(--accent-text); }
.statement .kanji { font-size: 0.85em; }
ruby { ruby-position: over; }
rt { font-family: var(--font-mono); font-size: 0.26em; font-weight: 500; letter-spacing: 0.06em; color: var(--accent-text); }

.about { display: flex; flex-wrap: wrap; gap: 32px 64px; align-items: flex-start; }
.about .lead { flex: 1 1 380px; }
.about__tag { flex: 0 1 320px; display: flex; flex-direction: column; gap: 14px; border-left: 2px solid var(--sora-blue); padding-left: 20px; }
.tagline { font-size: 28px; line-height: 1.2; }

/* Contacto */
.section--cta { background: var(--surface); border-top: 1px solid var(--border); }
.cta { display: flex; flex-direction: column; align-items: flex-start; gap: 20px; }
.cta .h2 { margin-bottom: 0; }
.cta .btn { margin-top: 12px; }

/* Footer */
.footer { border-top: 1px solid var(--border); padding: 32px 0; }
.footer__inner { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between; font-size: 15px; }

/* Responsive */
@media (max-width: 820px) {
  .nav__links { display: none; }
  .grid3 { grid-template-columns: 1fr; }
  .section { padding: 80px 0; }
  .hero__inner { padding-top: 88px; padding-bottom: 88px; }
  .hero__lines { opacity: 0.45; }
  .project { padding: 28px; }
  .dict__row { grid-template-columns: 1fr; gap: 4px; }
  .dict__row--head { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .loader__spin { animation: none; }
  .btn { transition: none; }
}
