/*
CatInCloud Labs — Bright Theme (Blue Variant)
Purpose: pivot the site to a clean sky blue + blue + white color scheme.
Drop-in: /public/styles/styles.css
*/

:root {
  /* Blue accent range */
  --accent-50:  #f0f9ff;
  --accent-100: #e0f2fe;
  --accent-200: #bae6fd;
  --accent-300: #7dd3fc;
  --accent-400: #38bdf8;
  --accent-500: #0ea5e9; /* primary */
  --accent-600: #0284c7;
  --accent-700: #0369a1;
  --accent-800: #075985;
  --accent-900: #0c4a6e;

  /* Neutral scale (cool gray) */
  --gray-50:  #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;

  /* Semantic tokens */
  --bg-page: var(--gray-50);
  --bg-surface: #ffffff;
  --bg-elevated: #ffffff;
  --text: var(--gray-900);
  --text-muted: var(--gray-600);
  --link: var(--accent-600);
  --link-hover: var(--accent-500);
  --primary: var(--accent-500);
  --primary-hover: var(--accent-600);
  --primary-pressed: var(--accent-700);
  --ring: var(--accent-400);

  /* Radius, shadows, transitions */
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --shadow-sm: 0 1px 2px rgba(17, 24, 39, 0.06);
  --shadow-md: 0 6px 16px rgba(17, 24, 39, 0.08);
  --shadow-lg: 0 12px 30px rgba(17, 24, 39, 0.12);
  --transition-fast: 120ms ease;
  --transition: 200ms cubic-bezier(.2,.7,.2,1);
  --maxw-readable: 72ch;

  /* Safe area for notches */
  --safe-top: env(safe-area-inset-top, 0px);
}

/* Base */
html { color-scheme: light; }
body {
  margin: 0;
  background: var(--bg-page);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Inter, "Helvetica Neue", Arial, "Apple Color Emoji", "Segoe UI Emoji";
  line-height: 1.6;
}

/* Typography */
h1 { font-size: clamp(2rem, 1.2rem + 3vw, 3rem); line-height: 1.15; margin: 0 0 .5rem; }
h2 { font-size: clamp(1.5rem, 1rem + 1.5vw, 2rem); margin: 2rem 0 .75rem; }
h3 { font-size: 1.25rem; margin: 1.25rem 0 .5rem; }
p { margin: 0 0 1rem; }
small, .muted { color: var(--text-muted); }

/* Links */
a { color: var(--link); text-decoration: none; transition: color var(--transition-fast); }
a:hover { color: var(--link-hover); text-decoration: underline; }

/* Layout */
.container { width: min(1100px, 92vw); margin-inline: auto; }
.stack > * + * { margin-top: var(--stack-gap, 1.25rem); }
.grid { display: grid; gap: 1.25rem; }
.grid.cols-3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }

/* Components */
.header { background: var(--bg-surface); border-bottom: 1px solid var(--gray-200); box-shadow: var(--shadow-sm); position: sticky; top: 0; z-index: 10; }
.nav { display: flex; align-items: center; justify-content: space-between; padding: .9rem 1rem; }
.nav a.brand { font-weight: 700; color: var(--gray-900); }
.nav .menu { display: flex; gap: 1rem; }
.nav .menu a { color: var(--gray-700); padding: .5rem .6rem; border-radius: 8px; }
.nav .menu a:hover { background: var(--gray-100); }

.hero { background: linear-gradient(180deg, var(--accent-50), transparent 60%); padding: 3.5rem 0 2rem; }
.hero .kicker { color: var(--accent-700); font-weight: 600; text-transform: uppercase; letter-spacing: .08em; }
.hero .title { max-width: 22ch; }
.hero .subtitle { max-width: 60ch; color: var(--text-muted); }
.hero .cta { margin-top: 1.25rem; display: flex; gap: .75rem; flex-wrap: wrap; }

.button { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; padding: .7rem 1rem; border-radius: var(--radius-md); border: 1px solid transparent; font-weight: 600; cursor: pointer; transition: transform var(--transition), background var(--transition); }
.button.primary { background: var(--primary); color: white; box-shadow: var(--shadow-md); }
.button.primary:hover { background: var(--primary-hover); transform: translateY(-1px); }
.button.primary:active { background: var(--primary-pressed); transform: translateY(0); }
.button.ghost { background: white; border-color: var(--gray-200); color: var(--gray-800); }
.button.ghost:hover { border-color: var(--gray-300); box-shadow: var(--shadow-sm); }

.card { background: var(--bg-surface); border: 1px solid var(--gray-200); border-radius: var(--radius-lg); padding: 1.25rem; box-shadow: var(--shadow-sm); }
.card:hover { box-shadow: var(--shadow-md); }

.footer { margin-top: 3rem; background: linear-gradient(0deg, var(--accent-50), transparent 70%); border-top: 1px solid var(--gray-200); }
.footer .inner { padding: 1.5rem 0; color: var(--gray-700); text-align: center; }

/* Inputs */
.input { width: 100%; padding: .7rem .9rem; border-radius: 12px; border: 1px solid var(--gray-300); background: white; color: var(--text); }
.input:focus { border-color: var(--accent-400); box-shadow: 0 0 0 4px color-mix(in oklab, var(--accent-400) 25%, transparent); outline: none; }

/* Utilities */
.badge { display:inline-block; padding:.2rem .5rem; border-radius:999px; background: var(--accent-100); color: var(--accent-700); font-weight:600; }
.border { border: 1px solid var(--gray-200); }
.rounded { border-radius: var(--radius-md); }
.shadow { box-shadow: var(--shadow-sm); }
.center { text-align:center; }

/* Animations */
.reveal { opacity: 0; transform: translateY(6px); animation: revealIn .5s var(--transition) forwards; }
@keyframes revealIn { to { opacity: 1; transform: none; } }

/* === CI Hero (video) =================================================== */
.ci-hero{
  position: relative;
  min-height: clamp(520px, 70vh, 880px);
  background: linear-gradient(180deg, var(--accent-50), #fff 60%);
  overflow: clip;
}

/* Media fills the section */
.ci-hero__media{ position:absolute; inset:0; }
.ci-hero__video{
  width:100%; height:100%;
  object-fit:cover; object-position:center;
  /* gentle zoom to hide side pillars on desktop; undone on phones below */
  transform: scale(1.03);
  transform-origin: center 48%;
}

/* Content sits above the video */
.ci-hero__content{
  position: relative; z-index: 1;
  width: min(1100px, 92vw);
  margin: 0 auto;
  padding: clamp(56px, 10vh, 110px) 16px 16px;
  text-align: center;
  color: var(--text);
}
.ci-hero__content h1{
  margin: 0 0 .5rem;
  font-size: clamp(2rem, 1.2rem + 3vw, 3rem);
  line-height: 1.12;
}
.ci-hero__content p{
  margin: 0 0 1.25rem;
  color: var(--text-muted);
  font-size: clamp(1rem, .6rem + 1vw, 1.125rem);
}

/* CTA buttons (namespaced) */
.ci-hero__cta{ display:inline-flex; gap:.75rem; flex-wrap:wrap; justify-content:center; }
.ci-btn{
  display:inline-flex; align-items:center; justify-content:center;
  padding:.7rem 1rem; border-radius: var(--radius-md);
  border:1px solid transparent; font-weight:600; text-decoration:none;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition), color var(--transition);
}
.ci-btn:focus-visible{ outline:3px solid var(--ring); outline-offset:2px; }
.ci-btn--primary{ background: var(--primary); color:#fff; box-shadow: var(--shadow-md); }
.ci-btn--primary:hover{ background: var(--primary-hover); transform: translateY(-1px); }
.ci-btn--primary:active{ background: var(--primary-pressed); transform: translateY(0); }
.ci-btn--ghost{ background:#fff; border-color: var(--gray-200); color: var(--link); }
.ci-btn--ghost:hover{ border-color: var(--gray-300); box-shadow: var(--shadow-sm); color: var(--link-hover); }

/* Reduced motion */
@media (prefers-reduced-motion: reduce){
  .ci-hero__video{ display:none; }
  .ci-hero{ background: url('/assets/hero-fallback.jpg') center/cover no-repeat, var(--bg-page); }
}

/* Sticky header polish */
.header{ backdrop-filter: saturate(1.2) blur(6px); background: color-mix(in srgb, #fff 85%, transparent); }

/* --- Readable hero text (softer outline) ------------------------------- */
.ci-hero__content h1,
.ci-hero__content p{
  color:#fff;
  text-shadow:
    0 0 3px rgba(0,0,0,.75),
    0 0 8px rgba(0,0,0,.45);
}

/* ------------------ Mobile polish ------------------ */

/* tablet down */
@media (max-width: 768px){
  .ci-hero__content{
    padding-top: calc(var(--safe-top) + clamp(48px, 9vh, 96px));
  }
  .ci-hero__content h1{
    max-width: 20ch;
    margin-inline: auto;
    font-size: clamp(1.8rem, 1rem + 3.5vw, 2.6rem);
    line-height: 1.08;
    text-wrap: balance;
  }
}

/* phone (iPhone widths, etc.) */
@media (max-width: 430px){
  .ci-hero{ min-height: 66vh; }

  /* undo desktop zoom so nothing clips on narrow viewports */
  .ci-hero__video{
    transform: none;
    transform-origin: center top;
  }

  .ci-hero__content{
    padding: calc(var(--safe-top) + clamp(40px, 9vh, 72px)) 14px 14px;
  }

  .ci-hero__content h1{
    max-width: 16ch;
    margin-inline: auto;
    font-size: clamp(1.6rem, 5.2vw + .6rem, 2.1rem);
    line-height: 1.06;
    letter-spacing: 0;
    text-wrap: balance;
  }

  .ci-hero__content p{
    font-size: .95rem;
    margin-bottom: .9rem;
    text-shadow:
      0 0 2px rgba(0,0,0,.7),
      0 0 6px rgba(0,0,0,.35);
  }

  /* stack buttons, finger-friendly target size */
  .ci-hero__cta{
    flex-direction: column;
    align-items: center;
    gap: .6rem;
  }
  .ci-btn{
    width: max(220px, 72%);
    padding: .6rem .9rem;
  }

  /* tighten header links a hair on small screens */
  .nav .menu a{ padding: .45rem .5rem; }
}
