/* Diagoradisa marketing site — design tokens */

:root {
  /* Color */
  --navy-900: #061331;
  --navy-800: #0a1f4a;
  --navy-700: #112a5e;
  --navy-600: #1c3d7a;
  --navy-500: #2d5aa3;
  --navy-400: #3a8fd9;
  --navy-300: #6fb3e8;
  --navy-200: #a8cfee;
  --navy-100: #dde9f5;
  --navy-50:  #eef4fb;

  --ivory:        #eaf2fb;
  --ivory-warm:   #d8e8f7;
  --paper:        #ffffff;
  --paper-warm:   #f1f7fd;

  --ink-900: #0b1220;
  --ink-700: #2c3447;
  --ink-500: #5a6479;
  --ink-300: #8c95a8;
  --ink-200: #b8bfcc;

  --coral:    #b53a2b;
  --coral-soft: #c84a3a;
  --signal-amber: #c08a1f;
  --signal-green: #2a7d5a;

  --rule: rgba(11, 18, 32, 0.12);
  --rule-on-navy: rgba(255, 255, 255, 0.18);

  /* Type */
  --font-sans: "Manrope", "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "Manrope", "Inter", system-ui, sans-serif;
  --font-script: "Caveat", "Kalam", "Comic Sans MS", cursive;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  /* Spacing rhythm */
  --pad-section: clamp(72px, 9vw, 140px);
  --pad-x: clamp(20px, 5vw, 88px);

  /* Motion */
  --ease-out: cubic-bezier(0.2, 0.8, 0.2, 1);

  /* Defaults */
  color-scheme: light;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--ivory);
  color: var(--ink-900);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

/* === DENSITY VARIANTS (set via Tweaks) === */
body[data-density="compact"] {
  --pad-section: clamp(56px, 7vw, 100px);
}
body[data-density="spacious"] {
  --pad-section: clamp(96px, 12vw, 180px);
}

/* === THEME VARIANTS === */
body[data-theme="parchment"] { background: var(--ivory); color: var(--ink-900); }
body[data-theme="navy"]      { background: var(--navy-900); color: var(--ivory); }
body[data-theme="paper"]     { background: var(--paper); color: var(--ink-900); }

/* === Type === */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-500);
  font-weight: 500;
}
.eyebrow.on-navy { color: var(--navy-200); }

.script {
  font-family: var(--font-script);
  font-weight: 500;
  line-height: 0.95;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.05;
  margin: 0;
  text-wrap: balance;
}

p { text-wrap: pretty; margin: 0; }

/* === Layout helpers === */
.wrap {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 var(--pad-x);
  width: 100%;
}

.section {
  padding-top: var(--pad-section);
  padding-bottom: var(--pad-section);
}

/* Viewfinder brackets — borrowed from the app's "Chairside Instrument" system */
.brackets {
  position: relative;
}
.brackets::before,
.brackets::after,
.brackets > .br-tr,
.brackets > .br-br {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  border: 1.5px solid currentColor;
  opacity: 0.7;
}
.brackets::before { top: -8px; left: -8px; border-right: 0; border-bottom: 0; }
.brackets::after  { top: -8px; right: -8px; border-left: 0; border-bottom: 0; }
.brackets > .br-tr { bottom: -8px; left: -8px; border-right: 0; border-top: 0; }
.brackets > .br-br { bottom: -8px; right: -8px; border-left: 0; border-top: 0; }

/* AI detection marker (corner reticle, 4-piece) */
.reticle {
  position: absolute;
  width: 38px;
  height: 38px;
  pointer-events: none;
}
.reticle::before,
.reticle::after,
.reticle .r-tr,
.reticle .r-br {
  content: "";
  position: absolute;
  width: 12px;
  height: 12px;
  border: 2px solid var(--navy-400);
}
.reticle::before { top: 0; left: 0; border-right: 0; border-bottom: 0; }
.reticle::after  { top: 0; right: 0; border-left: 0; border-bottom: 0; }
.reticle .r-tr   { bottom: 0; left: 0; border-right: 0; border-top: 0; }
.reticle .r-br   { bottom: 0; right: 0; border-left: 0; border-top: 0; }
.reticle .dot {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 4px;
  height: 4px;
  background: var(--navy-400);
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(58, 143, 217, 0.18);
}

/* Hairline dividers */
.hr-thin { border: 0; height: 1px; background: var(--rule); margin: 0; }
.hr-thin.on-navy { background: var(--rule-on-navy); }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  border-radius: 4px;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -0.005em;
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: transform 200ms var(--ease-out), background 200ms, color 200ms, border-color 200ms;
  white-space: nowrap;
}
.btn-primary {
  background: var(--navy-800);
  color: var(--ivory);
  border-color: var(--navy-800);
}
.btn-primary:hover { background: var(--navy-700); transform: translateY(-1px); }
.btn-ghost {
  background: transparent;
  color: var(--navy-800);
  border-color: var(--navy-800);
}
.btn-ghost:hover { background: var(--navy-800); color: var(--ivory); }
.btn-on-navy {
  background: var(--ivory);
  color: var(--navy-800);
  border-color: var(--ivory);
}
.btn-on-navy:hover { background: var(--paper); transform: translateY(-1px); }
.btn-ghost-on-navy {
  background: transparent;
  color: var(--ivory);
  border-color: rgba(255,255,255,0.4);
}
.btn-ghost-on-navy:hover { border-color: var(--ivory); }

/* Vertical "spine" text (like brochure spine) */
.spine {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 13px;
}

/* Marquee for funding strip */
@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* Tag pills */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border: 1px solid currentColor;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-family: var(--font-mono);
}
.tag .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: currentColor;
}

/* Animated entrance */
@keyframes rise {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
.rise { animation: rise 700ms var(--ease-out) both; }
.rise-1 { animation-delay: 80ms; }
.rise-2 { animation-delay: 180ms; }
.rise-3 { animation-delay: 280ms; }
.rise-4 { animation-delay: 380ms; }

/* Scan line shimmer for the AI demo */
@keyframes scan {
  0%   { transform: translateY(-10%); opacity: 0; }
  20%  { opacity: 1; }
  80%  { opacity: 1; }
  100% { transform: translateY(110%); opacity: 0; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .rise, [class*="rise-"] { animation: none !important; opacity: 1 !important; transform: none !important; }
}

/* Selection */
::selection { background: var(--navy-400); color: var(--ivory); }

/* Hide nav status pill on narrow viewports (beats inline display:flex) */
@media (max-width: 1100px) {
  nav .nav-status { display: none !important; }
}
@media (max-width: 860px) {
  nav .nav-links { display: none !important; }
}

/* === Cinematic enhancements === */

/* Slow Ken Burns drift on the hero background photo */
@keyframes kenBurns {
  0%   { transform: scale(1.06) translate3d(0, 0, 0); }
  50%  { transform: scale(1.14) translate3d(-1.2%, -0.8%, 0); }
  100% { transform: scale(1.06) translate3d(0, 0, 0); }
}
.hero-bg { animation: kenBurns 22s ease-in-out infinite; will-change: transform; transform-origin: center center; }

/* Cinematic grain — adds film texture over the hero */
.grain {
  position: absolute; inset: 0; pointer-events: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)' opacity='0.55'/></svg>");
  mix-blend-mode: overlay;
  opacity: 0.18;
}

/* Gentle float for floating chips/cards */
@keyframes floatY {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-6px); }
}
.float-y { animation: floatY 5.5s ease-in-out infinite; }

/* Scroll-reveal — sections fade up as they enter the viewport */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 900ms var(--ease-out), transform 900ms var(--ease-out);
}
.reveal.in-view { opacity: 1; transform: translateY(0); }

/* Tech cards: lift on hover + slow image zoom */
.tech-grid > article {
  transition: transform 500ms var(--ease-out), box-shadow 500ms var(--ease-out);
  will-change: transform;
}
.tech-grid > article:hover {
  transform: translateY(-8px);
  box-shadow: 0 40px 90px -28px rgba(10,16,24,0.65);
}
.tech-grid > article > div:first-child {
  transition: transform 1400ms var(--ease-out), opacity 600ms var(--ease-out);
}
.tech-grid > article:hover > div:first-child {
  transform: scale(1.08);
  opacity: 1;
}

/* Button sheen on hover */
.btn { position: relative; overflow: hidden; }
.btn::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(120deg, transparent 30%, rgba(255,255,255,0.28) 50%, transparent 70%);
  transform: translateX(-100%);
  transition: transform 750ms var(--ease-out);
  pointer-events: none;
}
.btn:hover::after { transform: translateX(100%); }

/* Reduced-motion: disable all the new motion */
@media (prefers-reduced-motion: reduce) {
  .hero-bg, .float-y { animation: none !important; }
  .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
  .btn::after { display: none !important; }
  .tech-grid > article, .tech-grid > article > div:first-child { transition: none !important; }
}
