/* ==========================================================================
   Case Tempo — marketing site design system
   Clean, modern SaaS aesthetic. No framework dependency.
   ========================================================================== */

/* --- Tokens ------------------------------------------------------------- */
:root {
  --bg:          #ffffff;
  --bg-soft:     #f5f8fc;
  --bg-deep:     #0c1424;
  --surface:     #ffffff;

  --ink:         #0d1b2e;   /* headings */
  --body:        #4a5a70;   /* paragraph text */
  --muted:       #7c8aa0;   /* secondary text */

  --brand:       #2c50a2;   /* primary blue (sampled from logo) */
  --brand-ink:   #223f80;   /* hover / pressed */
  --brand-bright:#3f74d8;   /* gradient accent */
  --brand-soft:  #eef1fb;   /* tinted fills */
  --brand-rgb:   44, 80, 162;

  --border:      #e6ecf3;
  --border-soft: #eef2f7;

  --radius-sm: 10px;
  --radius:    16px;
  --radius-lg: 24px;
  --radius-pill: 999px;

  --shadow-sm: 0 1px 2px rgba(13, 27, 46, .06), 0 1px 3px rgba(13, 27, 46, .05);
  --shadow:    0 10px 30px -12px rgba(13, 27, 46, .18);
  --shadow-lg: 0 30px 60px -20px rgba(13, 27, 46, .28);

  --grad: linear-gradient(120deg, var(--brand) 0%, var(--brand-bright) 100%);

  --maxw: 1140px;
  --nav-h: 72px;

  --ease: cubic-bezier(.22, 1, .36, 1);

  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-head: "Plus Jakarta Sans", var(--font-sans);
}

/* --- Reset -------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.65;
  color: var(--body);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  padding-top: var(--nav-h);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--brand); text-decoration: none; transition: color .2s var(--ease); }
a:hover { color: var(--brand-ink); }
button { font-family: inherit; }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-head);
  color: var(--ink);
  line-height: 1.12;
  letter-spacing: -.02em;
  margin: 0 0 .5em;
  font-weight: 700;
}
h1 { font-size: clamp(2.4rem, 5.2vw, 3.7rem); }
h2 { font-size: clamp(1.9rem, 3.6vw, 2.6rem); }
h3 { font-size: 1.45rem; }
h5 { font-size: 1.05rem; }
p { margin: 0 0 1rem; }

/* --- Layout helpers ----------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: 24px;
}
section { padding-block: clamp(64px, 9vw, 110px); }
.section-head {
  max-width: 720px;
  margin: 0 auto clamp(40px, 6vw, 64px);
  text-align: center;
}
.section-head p { font-size: 1.15rem; color: var(--muted); margin-bottom: 0; }
.bg-soft { background: var(--bg-soft); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .5em;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: .8rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--brand);
  background: var(--brand-soft);
  padding: .4em 1em;
  border-radius: var(--radius-pill);
  margin-bottom: 1.1rem;
}
.lead { font-size: 1.2rem; color: var(--body); }
.text-grad {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* --- Buttons ------------------------------------------------------------ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .55em;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 1rem;
  line-height: 1;
  padding: .95em 1.6em;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease),
              background .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease);
  white-space: nowrap;
}
.btn-primary {
  color: #fff;
  background: var(--grad);
  box-shadow: 0 10px 24px -10px rgba(var(--brand-rgb), .6);
}
.btn-primary:hover { color: #fff; transform: translateY(-2px); box-shadow: 0 16px 30px -10px rgba(var(--brand-rgb), .65); }
.btn-ghost {
  color: var(--ink);
  background: transparent;
  border-color: var(--border);
}
.btn-ghost:hover { color: var(--brand); border-color: var(--brand); background: var(--brand-soft); }
.btn-light {
  color: var(--brand);
  background: #fff;
}
.btn-light:hover { color: var(--brand-ink); transform: translateY(-2px); box-shadow: var(--shadow); }
.btn-lg { font-size: 1.08rem; padding: 1.05em 1.9em; }

/* --- Navbar ------------------------------------------------------------- */
.site-nav {
  position: fixed;
  inset: 0 0 auto 0;
  height: var(--nav-h);
  z-index: 1000;
  background: rgba(255, 255, 255, .82);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--border-soft);
}
.site-nav .container {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}
.nav-brand img { height: 30px; width: auto; }
.nav-links {
  list-style: none;
  display: flex;
  align-items: center;
  gap: .35rem;
  margin: 0 auto 0 1.5rem;
  padding: 0;
}
.nav-links a {
  color: var(--body);
  font-weight: 500;
  font-size: .98rem;
  padding: .5em .85em;
  border-radius: var(--radius-sm);
  transition: color .2s var(--ease), background .2s var(--ease);
}
.nav-links a:hover { color: var(--ink); background: var(--bg-soft); }
.nav-cta { display: flex; align-items: center; gap: .6rem; }
.nav-toggle {
  display: none;
  margin-left: auto;
  width: 44px; height: 44px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #fff;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}
.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  content: "";
  display: block;
  width: 20px; height: 2px;
  background: var(--ink);
  border-radius: 2px;
  position: relative;
  transition: .25s var(--ease);
}
.nav-toggle span::before { position: absolute; top: -6px; }
.nav-toggle span::after  { position: absolute; top: 6px; }

@media (max-width: 900px) {
  .nav-toggle { display: inline-flex; }

  /* Bar height stays fixed when closed; the container wraps so the menu
     stacks underneath as a single panel when open. */
  .site-nav { height: auto; }
  .site-nav .container { flex-wrap: wrap; row-gap: 0; min-height: var(--nav-h); }

  .nav-links, .nav-cta { display: none; width: 100%; }

  .site-nav.open { background: #fff; box-shadow: var(--shadow); }
  .site-nav.open .nav-links,
  .site-nav.open .nav-cta {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    margin: 0;
    padding: 0;
  }
  .site-nav.open .nav-links {
    order: 3;
    gap: 0;
    margin-top: .25rem;
    padding-top: .25rem;
    border-top: 1px solid var(--border-soft);
  }
  .site-nav.open .nav-cta {
    order: 4;
    gap: .6rem;
    padding: .75rem 0 1.1rem;
  }
  .nav-links a { padding: .9em .25em; font-size: 1.05rem; border-radius: 0; }
  .nav-cta .btn { width: 100%; }
  /* The hero already has a demo form on mobile; drop the redundant CTA here. */
  .nav-cta .nav-demo { display: none; }

  /* Animate the icon into an X when open */
  .site-nav.open .nav-toggle span { background: transparent; }
  .site-nav.open .nav-toggle span::before { top: 0; transform: rotate(45deg); }
  .site-nav.open .nav-toggle span::after  { top: 0; transform: rotate(-45deg); }
}

/* --- Hero --------------------------------------------------------------- */
.hero {
  position: relative;
  overflow: hidden;
  padding-top: clamp(56px, 8vw, 96px);
  padding-bottom: clamp(64px, 9vw, 120px);
  background:
    radial-gradient(60% 60% at 85% 0%, rgba(var(--brand-rgb), .14), transparent 60%),
    radial-gradient(50% 50% at 0% 30%, rgba(63, 116, 216, .12), transparent 55%),
    var(--bg-soft);
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: clamp(32px, 5vw, 64px);
  align-items: center;
}
.hero h1 { margin-bottom: .35em; }
.hero .lead { margin-bottom: 1.8rem; max-width: 36ch; }
.hero-media { position: relative; }
.hero-media img {
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
}
.hero-note {
  margin-top: 1rem;
  font-size: .92rem;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: .5em;
}
.hero-note svg { color: var(--brand); flex: none; }

@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; text-align: center; }
  .hero .lead { margin-inline: auto; }
  .hero-media { order: -1; max-width: 560px; margin-inline: auto; }
  .demo-form { margin-inline: auto; }
}

/* --- Demo / email capture form ------------------------------------------ */
.demo-form { max-width: 470px; }
.field-group {
  display: flex;
  gap: .5rem;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 6px 6px 6px 18px;
  box-shadow: var(--shadow-sm);
  align-items: center;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.field-group:focus-within { border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
.field-group .field-icon { color: var(--muted); flex: none; }
.field-group input {
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  font: inherit;
  font-size: 1rem;
  color: var(--ink);
  min-width: 0;
  padding: .55em 0;
}
.field-group input::placeholder { color: var(--muted); }
.field-group .btn { padding-block: .8em; }
.success-message {
  margin-top: 1rem;
  color: #0f9d58;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: .5em;
}

@media (max-width: 460px) {
  .field-group { flex-direction: column; align-items: stretch; border-radius: var(--radius); padding: 14px; }
  .field-group .field-icon { display: none; }
  .field-group .btn { width: 100%; }
}

/* --- Feature grid (3-up icon cards) ------------------------------------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}
.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow-sm);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s var(--ease);
}
.feature-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: #d9e3ef; }
.feature-card h3 { font-size: 1.25rem; margin-bottom: .4rem; }
.feature-card p { margin: 0; color: var(--body); font-size: 1rem; }
.icon-badge {
  width: 54px; height: 54px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: var(--brand-soft);
  color: var(--brand);
  margin-bottom: 20px;
}
.icon-badge svg { width: 26px; height: 26px; }

/* --- Alternating feature rows ------------------------------------------- */
.feature-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 6vw, 72px);
  align-items: center;
}
.feature-row + .feature-row { margin-top: clamp(56px, 8vw, 96px); }
.feature-row:nth-child(even) .feature-row-media { order: -1; }
.feature-row h2 { font-size: clamp(1.7rem, 3vw, 2.2rem); }
.feature-row .lead { color: var(--body); }
.feature-row-media {
  border-radius: var(--radius);
  overflow: hidden;
  background: #fff;
  box-shadow: var(--shadow);
  border: 1px solid var(--border-soft);
  aspect-ratio: 16 / 10;
}
.feature-row-media iframe,
.feature-row-media img { width: 100%; height: 100%; border: 0; object-fit: cover; display: block; }
.check-list { list-style: none; padding: 0; margin: 1.25rem 0 0; }
.check-list li {
  display: flex;
  align-items: flex-start;
  gap: .7em;
  margin-bottom: .7rem;
  color: var(--body);
}
.check-list svg { color: var(--brand); flex: none; margin-top: .3em; }

@media (max-width: 800px) {
  .feature-row { grid-template-columns: 1fr; }
  .feature-row:nth-child(even) .feature-row-media,
  .feature-row-media { order: -1; }
}

/* --- Tutorials cards ---------------------------------------------------- */
.tutorial-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease);
  height: 100%;
}
.tutorial-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.tutorial-thumb { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: var(--bg-soft); }
.tutorial-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s var(--ease); }
.tutorial-card:hover .tutorial-thumb img { transform: scale(1.05); }
.play-badge {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
}
.play-badge span {
  width: 60px; height: 60px;
  border-radius: 50%;
  background: rgba(255,255,255,.92);
  display: grid; place-items: center;
  box-shadow: var(--shadow);
  color: var(--brand);
}
.tutorial-body { padding: 24px; }
.tutorial-body h5 { margin: 0 0 .35rem; }
.tutorial-body h5 a { color: var(--ink); }
.tutorial-body h5 a:hover { color: var(--brand); }
.tutorial-body p { margin: 0 0 .75rem; color: var(--muted); font-size: .98rem; }
.link-arrow { font-weight: 600; display: inline-flex; align-items: center; gap: .35em; }
.link-arrow svg { transition: transform .2s var(--ease); }
.link-arrow:hover svg { transform: translateX(3px); }

/* --- Integrations ------------------------------------------------------- */
.logo-strip {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: clamp(28px, 5vw, 56px);
}
.logo-strip img {
  height: 40px;
  width: auto;
  opacity: .65;
  filter: grayscale(100%);
  transition: opacity .25s var(--ease), filter .25s var(--ease), transform .25s var(--ease);
}
.logo-strip img:hover { opacity: 1; filter: grayscale(0); transform: translateY(-2px); }

/* --- Testimonials ------------------------------------------------------- */
.quote-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}
.quote-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
}
.quote-mark { color: var(--brand); opacity: .25; margin-bottom: .5rem; }
.quote-card blockquote { margin: 0 0 1.25rem; font-size: 1.12rem; color: var(--ink); line-height: 1.6; }
.quote-author { margin-top: auto; }
.quote-author strong { display: block; color: var(--ink); font-family: var(--font-head); }
.quote-author cite { color: var(--muted); font-style: normal; font-size: .92rem; }

/* --- CTA band ----------------------------------------------------------- */
.cta-band { padding-block: clamp(56px, 8vw, 88px); }
.cta-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--grad);
  color: #fff;
  text-align: center;
  padding: clamp(40px, 6vw, 72px) clamp(24px, 5vw, 64px);
  box-shadow: var(--shadow-lg);
}
.cta-card::before {
  content: "";
  position: absolute;
  inset: -40% -10% auto auto;
  width: 480px; height: 480px;
  background: radial-gradient(circle, rgba(255,255,255,.22), transparent 60%);
  pointer-events: none;
}
.cta-card h2 { color: #fff; position: relative; }
.cta-card p { color: rgba(255,255,255,.9); position: relative; font-size: 1.15rem; max-width: 540px; margin-inline: auto; }
.cta-card .demo-form { position: relative; margin: 1.75rem auto 0; }
.cta-card .field-group { box-shadow: var(--shadow); }

/* --- Page header (interior pages) --------------------------------------- */
.page-head {
  background:
    radial-gradient(50% 60% at 80% 0%, rgba(var(--brand-rgb),.12), transparent 60%),
    var(--bg-soft);
  padding-block: clamp(56px, 8vw, 88px);
  text-align: center;
}
.contact-form { max-width: 560px; margin: 0 auto; }
.contact-form .row-stack { display: flex; flex-direction: column; gap: 14px; }
.contact-form input,
.contact-form textarea {
  width: 100%;
  font: inherit;
  font-size: 1rem;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: .85em 1em;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.contact-form textarea { min-height: 150px; resize: vertical; }
.contact-form input:focus,
.contact-form textarea:focus { outline: 0; border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
.contact-form .btn { align-self: flex-start; }

/* --- Legal pages (privacy / terms) -------------------------------------- */
.legal {
  max-width: 800px;
  margin: 0 auto;
  color: var(--body);
  font-size: 1rem;
  line-height: 1.75;
}
.legal h1, .legal h2, .legal h3, .legal h4 { color: var(--ink); margin: 1.8em 0 .6em; line-height: 1.25; }
.legal h1 { font-size: 1.6rem; }
.legal h2 { font-size: 1.35rem; }
.legal h3 { font-size: 1.15rem; }
.legal p { margin: 0 0 1.1rem; }
.legal ul, .legal ol { margin: 0 0 1.1rem; padding-left: 1.4rem; }
.legal li { margin-bottom: .5rem; }
.legal a { color: var(--brand); text-decoration: underline; }
.legal table { width: 100%; border-collapse: collapse; margin: 1.2rem 0; display: block; overflow-x: auto; }
.legal td, .legal th { border: 1px solid var(--border); padding: .6em .8em; vertical-align: top; }
.legal img { max-width: 100%; height: auto; }
.legal :is(p, span, td, li) { max-width: 100%; }

/* --- Footer ------------------------------------------------------------- */
.site-footer {
  background: var(--bg-deep);
  color: #aab6c8;
  padding-block: clamp(56px, 7vw, 80px) 0;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 40px;
}
.site-footer h5 {
  color: #fff;
  font-size: .82rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-bottom: 1.1rem;
}
.footer-brand img { height: 30px; margin-bottom: 1rem; filter: brightness(0) invert(1); }
.footer-brand p { color: #8593a8; max-width: 32ch; font-size: .95rem; }
.footer-list { list-style: none; padding: 0; margin: 0; }
.footer-list li { margin-bottom: .65rem; }
.footer-list a { color: #aab6c8; font-size: .97rem; }
.footer-list a:hover { color: #fff; }
.footer-bottom {
  margin-top: clamp(40px, 6vw, 64px);
  border-top: 1px solid rgba(255,255,255,.1);
  padding-block: 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  align-items: center;
  font-size: .9rem;
  color: #8593a8;
}
.footer-bottom a { color: #aab6c8; }
.footer-bottom a:hover { color: #fff; }

@media (max-width: 820px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
}

/* --- Misc --------------------------------------------------------------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}
