/* Tinka Core — elite product face
   Dual identity: Tinka (companion) · Core (platform)
   Aesthetic: Claude-clean calm + golden-hour Tinka tokens
   CM-VE-SS-WEB-001 / TINKA-VISUAL-ALIGN
*/
:root {
  /* Claude-adjacent calm canvas */
  --bg: #f7f4ef;
  --bg-deep: #efe9df;
  --surface: #fffcf8;
  --surface-2: #f3eee6;
  --ink: #1a1814;
  --ink-soft: #4a453c;
  --muted: #7a7266;
  --line: rgba(26, 24, 20, 0.08);
  --line-strong: rgba(26, 24, 20, 0.14);
  /* Tinka golden hour */
  --gold: #e0a04a;
  --gold-deep: #c4882e;
  --gold-soft: rgba(224, 160, 74, 0.14);
  --cyan: #3d9fd4;
  --cyan-soft: rgba(94, 200, 255, 0.16);
  --cream: #f0e6d0;
  --shadow: 0 1px 2px rgba(26, 24, 20, 0.04), 0 18px 48px rgba(26, 24, 20, 0.07);
  --shadow-lg: 0 24px 64px rgba(26, 24, 20, 0.1);
  --radius: 20px;
  --radius-sm: 12px;
  --max: 1080px;
  --font: "Söhne", "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --display: "Tiempos Text", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
  --tinka-size: 28px; /* cursor-adjacent companion */
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(900px 480px at 12% -8%, rgba(224, 160, 74, 0.12), transparent 55%),
    radial-gradient(700px 420px at 92% 0%, rgba(94, 200, 255, 0.08), transparent 50%),
    var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: var(--cyan); text-underline-offset: 3px; }
a:hover { color: var(--gold-deep); }

.skip {
  position: absolute; left: -999px; top: 0; z-index: 200;
  background: var(--gold); color: #1a1814; padding: 8px 12px;
}
.skip:focus { left: 12px; top: 12px; }

/* —— Nav —— */
.nav {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(16px) saturate(1.15);
  background: rgba(247, 244, 239, 0.82);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 14px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand {
  display: flex; align-items: center; gap: 11px;
  text-decoration: none; color: var(--ink); font-weight: 600;
}
.brand-mark {
  width: 34px; height: 34px; border-radius: 11px;
  background:
    radial-gradient(circle at 30% 30%, #fff6e6, transparent 45%),
    linear-gradient(145deg, #f0c27a, var(--gold-deep) 55%, #5ec8ff);
  box-shadow: 0 0 0 1px rgba(255,255,255,0.5) inset, 0 8px 20px rgba(224, 160, 74, 0.28);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.12; }
.brand-text strong { font-size: 15px; letter-spacing: -0.02em; }
.brand-text span { font-size: 11px; color: var(--muted); font-weight: 500; }
.nav-links {
  display: flex; flex-wrap: wrap; gap: 4px 16px; align-items: center;
  font-size: 13.5px;
}
.nav-links a {
  color: var(--ink-soft); text-decoration: none; padding: 6px 2px;
}
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--ink); }
.nav-cta {
  display: inline-flex; align-items: center;
  background: var(--ink); color: #f7f4ef !important;
  font-weight: 600; font-size: 13px;
  padding: 9px 15px; border-radius: 999px;
  text-decoration: none !important;
  box-shadow: var(--shadow);
}
.nav-cta:hover { filter: brightness(1.08); color: #fff !important; }

/* Identity switch */
.phase-bar {
  max-width: var(--max);
  margin: 0 auto;
  padding: 18px 22px 0;
}
.phase-toggle {
  display: inline-flex;
  padding: 4px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: var(--shadow);
  gap: 2px;
}
.phase-toggle button {
  appearance: none; border: 0; cursor: pointer;
  font: inherit; font-size: 13px; font-weight: 600;
  padding: 9px 16px; border-radius: 999px;
  background: transparent; color: var(--muted);
  transition: background .2s, color .2s, box-shadow .2s;
}
.phase-toggle button[aria-pressed="true"] {
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 1px 3px rgba(26,24,20,.08), 0 0 0 1px var(--line);
}
.phase-toggle button[data-phase="tinka"][aria-pressed="true"] {
  background: linear-gradient(180deg, #fff9ef, #f6e4c4);
  color: #5a3d12;
  box-shadow: 0 0 0 1px rgba(224,160,74,.35), 0 6px 16px rgba(224,160,74,.18);
}
.phase-toggle button[data-phase="core"][aria-pressed="true"] {
  background: linear-gradient(180deg, #eef6fb, #d9ebf6);
  color: #16384a;
  box-shadow: 0 0 0 1px rgba(61,159,212,.3), 0 6px 16px rgba(61,159,212,.12);
}

/* Layout */
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 22px; }
.hero {
  padding: 40px 0 28px;
  display: grid;
  grid-template-columns: 1.12fr 0.88fr;
  gap: 36px;
  align-items: center;
}
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; padding-top: 28px; }
  .nav-links { display: none; }
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 650; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--gold-deep);
  background: var(--gold-soft);
  border: 1px solid rgba(224, 160, 74, 0.28);
  border-radius: 999px; padding: 6px 12px; margin-bottom: 16px;
}
.eyebrow i {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 4px rgba(224,160,74,.2);
  display: inline-block;
  animation: pulse 2.2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .7; transform: scale(.9); }
}
h1 {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(2.35rem, 5vw, 3.55rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
  margin: 0 0 16px;
  color: var(--ink);
}
h1 em {
  font-style: italic;
  color: var(--gold-deep);
  background: linear-gradient(120deg, var(--gold-deep), #b56a1a 40%, var(--cyan));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.lead {
  font-size: 1.12rem;
  color: var(--ink-soft);
  max-width: 36em;
  margin: 0 0 24px;
}
.cta-row { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px; border-radius: 999px; padding: 12px 18px;
  font-weight: 650; font-size: 14.5px; text-decoration: none;
  border: 1px solid transparent; transition: transform .15s, filter .15s, box-shadow .15s;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary {
  background: var(--ink);
  color: #f7f4ef !important;
  box-shadow: var(--shadow);
}
.btn-gold {
  background: linear-gradient(180deg, #f0c27a, var(--gold-deep));
  color: #1a140a !important;
  box-shadow: 0 10px 24px rgba(224, 160, 74, 0.28);
}
.btn-ghost {
  background: var(--surface);
  color: var(--ink) !important;
  border-color: var(--line-strong);
}
.meta-line {
  font-size: 13px; color: var(--muted);
  font-family: var(--mono);
}
.meta-line code { color: var(--gold-deep); font-size: 12px; }

/* Hero visual */
.hero-visual {
  position: relative;
  border-radius: calc(var(--radius) + 6px);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  aspect-ratio: 1;
  max-height: 440px;
}
.hero-visual img {
  width: 100%; height: 100%;
  object-fit: cover;
}
.hero-visual .cap {
  position: absolute; left: 14px; right: 14px; bottom: 14px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: rgba(255, 252, 248, 0.88);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.6);
  font-size: 13px; color: var(--ink-soft);
}
.hero-visual .cap strong { color: var(--ink); display: block; margin-bottom: 2px; }

/* Dual identity cards */
.dual {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  padding: 12px 0 8px;
}
@media (max-width: 800px) { .dual { grid-template-columns: 1fr; } }
.id-card {
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 22px;
  position: relative;
  overflow: hidden;
}
.id-card::before {
  content: "";
  position: absolute; inset: 0 auto 0 0; width: 4px;
}
.id-card.tinka::before { background: linear-gradient(180deg, var(--gold), #f0c27a); }
.id-card.core::before { background: linear-gradient(180deg, var(--cyan), #7ec8ea); }
.id-card h3 {
  margin: 0 0 6px;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}
.id-card .role {
  font-size: 11px; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; margin-bottom: 10px;
}
.id-card.tinka .role { color: var(--gold-deep); }
.id-card.core .role { color: var(--cyan); }
.id-card p { margin: 0; color: var(--ink-soft); font-size: 0.96rem; }
.id-card ul {
  margin: 12px 0 0; padding-left: 1.1rem; color: var(--ink-soft); font-size: 0.92rem;
}
.id-card li { margin: 4px 0; }

/* Sections */
section { padding: 52px 0; }
section.band {
  background: var(--bg-deep);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.section-head { max-width: 620px; margin-bottom: 26px; }
.section-head h2 {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  letter-spacing: -0.02em;
  margin: 0 0 10px;
}
.section-head p { margin: 0; color: var(--ink-soft); }
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
@media (max-width: 800px) {
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
}
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}
.card h3 { margin: 0 0 8px; font-size: 1.02rem; }
.card p { margin: 0; color: var(--ink-soft); font-size: 0.95rem; }
.kicker {
  font-size: 11px; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--gold-deep); margin-bottom: 8px;
}

/* Phase panels */
.phase-panel[hidden] { display: none !important; }
.phase-panel { animation: fadeIn .35s ease; }
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

/* Steps */
.steps { display: grid; gap: 12px; counter-reset: st; }
.step {
  display: grid; grid-template-columns: 44px 1fr; gap: 14px;
  align-items: start;
  padding: 16px 18px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
}
.step::before {
  counter-increment: st;
  content: counter(st);
  width: 36px; height: 36px; border-radius: 11px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 13px;
  color: #1a140a;
  background: linear-gradient(180deg, #f0c27a, var(--gold-deep));
}
.step h3 { margin: 0 0 4px; font-size: 1rem; }
.step p { margin: 0; color: var(--ink-soft); font-size: 0.94rem; }

/* Pay */
.pay-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 14px;
}
@media (max-width: 800px) { .pay-grid { grid-template-columns: 1fr; } }
.pay-card {
  border-radius: var(--radius);
  border: 1px solid rgba(224, 160, 74, 0.35);
  background:
    linear-gradient(145deg, rgba(224,160,74,0.1), transparent 50%),
    var(--surface);
  padding: 22px;
  box-shadow: var(--shadow);
}
.payid {
  font-family: var(--mono);
  font-size: 1.12rem;
  color: var(--gold-deep);
  margin: 10px 0 6px;
  word-break: break-all;
}
.note { font-size: 13px; color: var(--muted); margin-top: 10px; }

/* Footer */
footer {
  border-top: 1px solid var(--line);
  padding: 36px 0 48px;
  color: var(--muted);
  font-size: 13px;
  background: var(--surface);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 22px;
  margin-bottom: 22px;
}
@media (max-width: 800px) { .footer-grid { grid-template-columns: 1fr; } }
footer a { color: var(--ink-soft); text-decoration: none; }
footer a:hover { color: var(--gold-deep); }
footer ul { list-style: none; padding: 0; margin: 8px 0 0; }
footer li { margin: 6px 0; }
.footer-bottom {
  display: flex; flex-wrap: wrap; gap: 10px 18px;
  justify-content: space-between;
  border-top: 1px solid var(--line);
  padding-top: 16px;
}

/* —— Flying Tinka (cursor-sized companion) —— */
#tinka-companion {
  position: fixed;
  top: 0; left: 0;
  width: var(--tinka-size);
  height: var(--tinka-size);
  pointer-events: none;
  z-index: 9999;
  transform: translate3d(-100px, -100px, 0);
  will-change: transform;
  filter: drop-shadow(0 2px 6px rgba(224, 160, 74, 0.45));
}
#tinka-companion .sprite {
  width: 100%;
  height: 100%;
  display: block;
  animation: bob 1.1s ease-in-out infinite, wing 0.18s ease-in-out infinite alternate;
  transform-origin: 50% 55%;
}
#tinka-companion.is-idle .sprite {
  animation: bob 2.4s ease-in-out infinite, wander-hint 6s ease-in-out infinite, wing 0.28s ease-in-out infinite alternate;
}
@keyframes bob {
  0%, 100% { transform: translateY(0) rotate(-4deg); }
  50% { transform: translateY(-3px) rotate(4deg); }
}
@keyframes wing {
  from { scale: 1 1; }
  to { scale: 1.04 0.94; }
}
@keyframes wander-hint {
  0%, 100% { translate: 0 0; }
  25% { translate: 2px -1px; }
  75% { translate: -2px 1px; }
}
.sparkle {
  position: fixed;
  width: 4px; height: 4px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 9998;
  background: radial-gradient(circle, #fff6d8 0%, var(--gold) 40%, transparent 70%);
  opacity: 0.85;
  animation: spark 0.7s ease-out forwards;
}
@keyframes spark {
  to { opacity: 0; transform: translateY(8px) scale(0.2); }
}

/* Reduce motion */
@media (prefers-reduced-motion: reduce) {
  #tinka-companion .sprite,
  .eyebrow i,
  .phase-panel,
  .sparkle { animation: none !important; }
  html { scroll-behavior: auto; }
}

/* Page secondary */
.page-hero { padding: 48px 0 20px; max-width: 720px; }
.page-hero h1 { font-size: clamp(2rem, 4vw, 2.7rem); }
.prose { max-width: 720px; padding-bottom: 64px; color: var(--ink-soft); }
.prose h2 { font-family: var(--display); font-weight: 400; color: var(--ink); margin: 1.8rem 0 0.5rem; }
.table {
  width: 100%; border-collapse: collapse; margin: 16px 0 24px; font-size: 14px;
}
.table th, .table td {
  text-align: left; padding: 11px 10px;
  border-bottom: 1px solid var(--line); vertical-align: top;
}
.table th {
  color: var(--muted); font-size: 11px; letter-spacing: 0.05em;
  text-transform: uppercase; font-weight: 650;
}
