/*
Theme Name: Karnot
Theme URI: https://karnot.ai
Author: Karnot Artificial Intelligence Pvt. Ltd.
Author URI: https://karnot.ai
Description: Custom WordPress theme for Karnot.Ai — an exact port of the Karnot-website-v2 static design.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: karnot
*/

/* ===================================================================
   GLOBAL STYLESHEET — shared across every Karnot.Ai page

   RESPONSIVE BREAKPOINTS — single source of truth for the whole site.
   Mirror these two numbers in assets/js/breakpoints.js if you change them.
     mobile  : max-width  640px
     tablet  : 641px – 1024px
     desktop : min-width 1025px
   =================================================================== */

:root{
  --navy: #0A1628;
  --gold: #E8B84B;
  --frost: #F7F9FB;

  /* breakpoints, exposed for reference only — CSS can't use custom
     properties inside @media conditions, so the literal values below
     and in breakpoints.js must be changed together. */
  --bp-mobile: 640px;
  --bp-tablet: 1024px;
}

*{ box-sizing: border-box; }

html, body{
  margin: 0; padding: 0;
  background: var(--frost);
  color: var(--navy);
  font-family: 'Inter', -apple-system, sans-serif;
  overflow-x: clip; /* not "hidden" — see note below about position:sticky */
}

/* ============ NAVIGATION (shared by every page) ============ */
#nav-brand{
  position: fixed; top: 30px; left: 36px; z-index: 20;
  font-family: 'Playfair Display', serif; font-weight: 600; font-size: 21px;
  color: var(--navy); text-decoration: none;
}
#nav-brand.on-photo{ color: #F7F9FB; }
#nav-brand .nav-star{ color: var(--gold); }
#nav-brand .i-stem-sm{ position: relative; }
#nav-brand .i-stem-sm .nav-star{
  position: absolute; left: 50%; top: -0.52em;
  transform: translateX(-50%);
  font-size: 0.52em;
}
#top-cta{
  display: inline-block;
  position: fixed; top: 28px; right: 34px; z-index: 20;
  padding: 11px 22px; background: var(--gold); color: var(--navy);
  font-family: 'Inter', sans-serif; font-size: 12.5px; font-weight: 600;
  border-radius: 999px; border: none; cursor: pointer;
  box-shadow: 0 6px 18px rgba(232,184,74,0.35);
  transition: opacity 0.4s ease, transform 0.35s ease; opacity: 1;
  text-decoration: none; text-align: center;
}
#top-cta:hover{ transform: translateY(-2px); }

/* ============ BUTTONS ============ */
.t-btn{
  display: inline-block; padding: 16px 36px;
  background: var(--navy); color: var(--gold);
  font-family: 'Inter', sans-serif; font-size: 15px; font-weight: 600; letter-spacing: 0.04em;
  border-radius: 999px; border: none; cursor: pointer;
  box-shadow: 0 10px 28px rgba(10,22,40,0.22);
  transition: transform 0.3s ease;
  text-decoration: none; text-align: center;
}
.t-btn:hover{ transform: translateY(-2px); }
.t-btn.ghost{
  background: transparent; color: var(--navy);
  border: 1.5px solid rgba(10,22,40,0.3);
  box-shadow: none;
}

/* Gold pill CTA — used for the scroll-story CTAs on the home page and the
   closing CTA on interior pages. */
.btn-gold{
  display: inline-block; padding: 17px 34px;
  background: var(--gold); color: var(--navy);
  font-family: 'Inter', sans-serif; font-size: 15px; font-weight: 600;
  border-radius: 999px; border: none; cursor: pointer;
  box-shadow: 0 6px 18px rgba(232,184,74,0.35);
  text-decoration: none; text-align: center;
  transition: transform 0.3s ease;
}
.btn-gold:hover{ transform: translateY(-2px); }

/* ============ SECTION / CONTAINER UTILITIES ============ */
.t-section{ padding: 130px 0; }
.t-section.tight-top{ padding-top: 40px; }
.t-container{ width: min(1120px, 88vw); margin: 0 auto; }
.t-eyebrow{
  font-family: 'Inter', sans-serif; font-size: 12.5px; font-weight: 600;
  letter-spacing: 0.32em; text-transform: uppercase; color: var(--gold);
  margin-bottom: 22px;
}
.t-headline{
  font-family: 'Playfair Display', serif; font-weight: 600;
  font-size: clamp(30px, 3.4vw, 48px);
  line-height: 1.2; color: var(--navy);
  margin: 0 0 18px 0;
  max-width: 22ch;
}
.t-standfirst{
  font-size: 18px; line-height: 1.7; color: var(--navy); opacity: 0.78;
  max-width: 640px; margin: 0 0 60px 0;
}
.t-cta-row{ margin-top: 64px; }
.t-cta-row.center{ text-align: center; }

/* ============ FOOTER ============ */
footer{
  padding: 46px 0 54px;
  border-top: 1px solid rgba(10,22,40,0.1);
}
footer .t-container{
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px;
  font-size: 13.5px; opacity: 0.65;
}
footer a{ color: var(--navy); text-decoration: none; margin-right: 22px; }
footer a:hover{ text-decoration: underline; }

/* ============ SCROLL-IN REVEAL — shared fade+rise language ============ */
.reveal{ opacity: 0; transform: translateY(26px); transition: opacity 0.8s ease, transform 0.8s ease; }
.reveal.in-view{ opacity: 1; transform: translateY(0); }

/* ============ PHOTO HERO — full-bleed photo (66% of viewport) + a light
   paragraph strip (remaining 34%), exactly 100vh total. Used to open an
   interior page (how-we-work, organizations-we-support). Each page sets
   its own #hero-photo background-image; everything else here is shared. ============ */
#hero-section{
  position: relative;
  height: 100vh;
  width: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
#hero-photo{
  position: relative;
  flex: 0 0 66%;
  width: 100%;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  padding-left: 5.6vw;
}
.hero-text-col{
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.2vw;
  max-width: 62vw;
}
.hero-line{
  opacity: 0;
  transform: translateY(46px);
  will-change: opacity, transform;
}
.hero-eyebrow{
  font-family: 'Playfair Display', serif; font-size: 2.05vw; font-weight: 400;
  letter-spacing: 0.08em; text-transform: uppercase; color: #F7F9FB;
  margin: 0;
}
.hero-headline{
  font-family: 'Playfair Display', serif; font-weight: 400;
  font-size: 4.0vw; line-height: 1.15;
  color: #F7F9FB; margin: 0;
  text-shadow: 0 2px 24px rgba(0,0,0,0.25);
}
#hero-paragraph{
  position: relative;
  flex: 1;
  width: 100%;
  background: var(--frost);
  display: flex;
  align-items: center;
  padding: 0 5.6vw;
}
.hero-para-line{
  opacity: 0;
  transform: translateY(46px);
  will-change: opacity, transform;
  font-family: 'Playfair Display', serif;
  font-size: 1.5vw;
  line-height: 1.6;
  color: var(--navy);
  max-width: 78vw;
  margin: 0;
}
/* Brand-name highlight — used wherever "Karnot" appears inline in copy. */
.accent{
  color: var(--gold);
}

/* ============ PAGE INTRO BAND — full-height navy title band used to open
   an interior-page section (e.g. "Our Approach", "Organizations We
   Support"). Shared across pages. ============ */
.page-intro{
  position: relative;
  min-height: 100vh;
  width: 100%;
  background: var(--navy);
  color: var(--frost);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 100px 24px;
}
.page-intro h2{
  font-family: 'Playfair Display', serif;
  font-weight: 600;
  font-size: clamp(13px, 1.3vw, 16px);
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0;
}

/* ============ SUPPORT ROWS — alternating image / gold-text cards, used
   for "Our Approach" and "Organizations We Support" style sections.
   Continues directly off a .page-intro's navy background, no seam. ============ */
.support-section{
  position: relative;
  background: var(--navy);
  color: var(--frost);
  padding: 0 0 130px;
}
.support-eyebrow{
  font-family: 'Inter', sans-serif; font-size: 12.5px; font-weight: 600;
  letter-spacing: 0.32em; text-transform: uppercase; color: var(--gold);
  text-align: center;
  margin: 0 0 64px;
}
.support-list{
  display: flex;
  flex-direction: column;
  gap: 40px;
}
.support-row{
  display: flex;
  align-items: stretch;
  border-radius: 18px;
  overflow: hidden;
}
.support-row:nth-child(even){ flex-direction: row-reverse; }
.support-media{
  flex: 1 1 50%;
  min-width: 0;
  aspect-ratio: 4 / 3;
}
.support-media img{
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.support-copy{
  flex: 1 1 50%;
  min-width: 0;
  background: var(--gold);
  color: var(--navy);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 48px 5.5%;
}
.support-copy h3{
  font-family: 'Playfair Display', serif; font-weight: 600; font-size: 26px;
  margin: 0 0 14px;
}
.support-copy p{
  font-size: 15.5px; line-height: 1.7; margin: 0; opacity: 0.85;
}

/* ============ SECTION TEASER — large serif intro + bold headline + CTA,
   used to bridge between sections/pages (e.g. homepage -> Organizations
   We Support). ============ */
.teaser-eyebrow{
  font-family: 'Playfair Display', serif; font-weight: 400;
  font-size: clamp(22px, 2.2vw, 30px);
  color: var(--navy);
  margin: 0 0 8px;
}
.teaser-headline{
  font-family: 'Playfair Display', serif; font-weight: 700;
  font-size: clamp(38px, 5vw, 72px);
  line-height: 1.1;
  color: var(--navy);
  margin: 0;
  max-width: 16ch;
}

/* ============ CLOSING CTA — light section that ends an interior page. ============ */
.closing-section{
  background: var(--frost);
  padding: 130px 0;
  text-align: center;
}
.closing-inner{
  display: flex;
  flex-direction: column;
  align-items: center;
}
.closing-intro{
  font-family: 'Playfair Display', serif; font-style: italic; font-weight: 400;
  font-size: clamp(18px, 1.8vw, 22px);
  color: var(--navy); opacity: 0.72;
  margin: 0 0 8px;
}
.closing-headline{
  font-family: 'Playfair Display', serif; font-weight: 700;
  font-size: clamp(32px, 4vw, 56px);
  color: var(--navy);
  margin: 0 0 34px;
}

/* ============ SITE FOOTER — rich navy footer, shared across pages.
   #site-footer overrides the plain `footer{...}` rule above via ID
   specificity, so pages that don't opt into it keep the simple footer.
   Reveal animation reuses .reveal/IntersectionObserver — no extra JS. ============ */
#site-footer{
  background: var(--navy);
  color: var(--frost);
  padding: 130px 0 0;
  border-top: none;
}
/* Wider than the standard .t-container (1120px) so the footer's content
   actually spreads across a desktop viewport instead of clustering into a
   narrow left-weighted column. */
#site-footer .t-container{
  width: min(1440px, 90vw);
}
.footer-top{
  display: flex; justify-content: space-between; align-items: flex-start;
  flex-wrap: wrap; gap: 40px;
  padding-bottom: 90px;
}
.footer-brand{
  font-family: 'Playfair Display', serif; font-weight: 600; font-size: 34px;
  color: var(--gold);
}
.footer-help{ max-width: 560px; }
.footer-help h3{
  font-family: 'Playfair Display', serif; font-weight: 400;
  font-size: clamp(22px, 2vw, 28px);
  color: var(--frost); margin: 0 0 16px;
}
.footer-help p{
  font-size: 16px; line-height: 1.6;
  color: var(--frost); opacity: 0.82;
  margin: 0 0 28px;
}

.footer-columns{
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 60px;
  padding: 60px 0 80px;
  border-top: 1px solid rgba(247,249,251,0.14);
}
.footer-nav h4, .footer-connect h4{
  font-family: 'Playfair Display', serif; font-weight: 600; font-size: 22px;
  color: var(--frost); margin: 0 0 24px;
}
.footer-nav{ display: flex; flex-direction: column; align-items: flex-start; gap: 16px; }
.footer-nav a{
  font-family: 'Playfair Display', serif; font-size: 17px;
  color: var(--frost); opacity: 0.85; text-decoration: none;
}
.footer-nav a:hover{ opacity: 1; text-decoration: underline; }

.footer-social{ display: flex; flex-direction: row; align-items: center; flex-wrap: wrap; gap: 28px; }
.footer-social a{
  display: flex; align-items: center; gap: 10px;
  font-family: 'Inter', sans-serif; font-size: 15px; font-weight: 600;
  color: var(--frost); text-decoration: none;
}
.footer-social a:hover{ opacity: 0.8; }
.footer-social svg{ width: 20px; height: 20px; fill: currentColor; flex-shrink: 0; }

.footer-bottom{
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  gap: 16px;
  border-top: 1px solid rgba(247,249,251,0.14);
  padding: 32px 0;
  font-size: 13.5px;
}
.footer-legal{
  display: flex;
  flex-wrap: wrap;
}
.footer-legal a{
  color: var(--frost); opacity: 0.75; text-decoration: underline;
  margin-right: 24px;
}
.footer-legal a:last-child{ margin-right: 0; }
.footer-legal a:hover{ opacity: 1; }
.footer-copy{
  color: var(--frost); opacity: 0.6;
  letter-spacing: 0.03em; text-transform: uppercase; font-size: 12.5px;
  white-space: nowrap;
}

/* ============ LEGAL PAGES — privacy/terms/cookies/security. Same navy
   background + gold accent + serif headings as the rest of the site,
   tuned for comfortable long-form reading (max ~72ch line length). ============ */
.legal-page{
  background: var(--navy);
  color: var(--frost);
}
.legal-hero{
  padding: 190px 0 70px;
  border-bottom: 1px solid rgba(247,249,251,0.14);
}
.legal-eyebrow{
  font-family: 'Inter', sans-serif; font-size: 12.5px; font-weight: 600;
  letter-spacing: 0.32em; text-transform: uppercase; color: var(--gold);
  margin: 0 0 22px;
}
.legal-title{
  font-family: 'Playfair Display', serif; font-weight: 600;
  font-size: clamp(30px, 3.4vw, 48px);
  line-height: 1.2; color: var(--frost);
  margin: 0 0 18px; max-width: 26ch;
}
.legal-updated{
  font-family: 'Inter', sans-serif; font-size: 14.5px;
  color: var(--frost); opacity: 0.6;
  margin: 0;
}
.legal-body{ padding: 70px 0 150px; }
.legal-grid{
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 64px;
  align-items: start;
}
.legal-toc{
  position: sticky; top: 110px;
  display: flex; flex-direction: column; gap: 12px;
}
.legal-toc-label{
  font-family: 'Inter', sans-serif; font-size: 12px; font-weight: 600;
  letter-spacing: 0.24em; text-transform: uppercase; color: var(--gold);
  margin-bottom: 6px;
}
.legal-toc a{
  font-family: 'Inter', sans-serif; font-size: 14.5px; line-height: 1.5;
  color: var(--frost); opacity: 0.7; text-decoration: none;
}
.legal-toc a:hover{ opacity: 1; text-decoration: underline; }
.legal-content{ max-width: 72ch; }
.legal-content section{ margin-bottom: 56px; scroll-margin-top: 110px; }
.legal-content section:last-child{ margin-bottom: 0; }
.legal-content h2{
  font-family: 'Playfair Display', serif; font-weight: 600;
  font-size: clamp(22px, 2.2vw, 28px);
  color: var(--frost); margin: 0 0 20px;
  scroll-margin-top: 110px;
}
.legal-content h3{
  font-family: 'Playfair Display', serif; font-weight: 600; font-style: italic;
  font-size: 18px;
  color: var(--gold); margin: 28px 0 10px;
}
.legal-content h3:first-of-type{ margin-top: 0; }
.legal-content p{
  font-family: 'Inter', sans-serif; font-size: 16px; line-height: 1.8;
  color: var(--frost); opacity: 0.88;
  margin: 0 0 18px;
}
.legal-content p:last-child{ margin-bottom: 0; }
.legal-content a{ color: var(--gold); }
.legal-content address{
  font-style: normal;
  font-family: 'Inter', sans-serif; font-size: 16px; line-height: 1.9;
  color: var(--frost); opacity: 0.88;
}
.legal-placeholder{
  background: rgba(232,184,74,0.16);
  color: var(--gold);
  padding: 1px 7px;
  border-radius: 4px;
  font-weight: 600;
}

/* ============ RESPONSIVE — tablet ============ */
@media (max-width: 1024px){
  .t-section{ padding: 100px 0; }

  .footer-columns{ gap: 40px; }

  .legal-grid{ grid-template-columns: 1fr; gap: 32px; }
  .legal-toc{
    position: relative; top: 0;
    flex-direction: row; flex-wrap: wrap; gap: 10px 24px;
    padding-bottom: 32px; border-bottom: 1px solid rgba(247,249,251,0.14);
  }
  .legal-toc-label{ width: 100%; margin-bottom: 0; }

  .support-row, .support-row:nth-child(even){ flex-direction: column; }
  .support-media{ aspect-ratio: 16 / 9; }
  .support-copy{ padding: 36px 6vw; }

  .hero-text-col{ max-width: 90vw; }
  .hero-headline{ font-size: 7vw; }
  .hero-eyebrow{ font-size: 3.4vw; }
  .hero-para-line{ font-size: 2.8vw; max-width: 90vw; }
  #hero-photo{ padding-left: 6vw; }
  #hero-paragraph{ padding: 0 6vw; }
}

/* ============ RESPONSIVE — mobile ============ */
@media (max-width: 640px){
  #top-cta{ right: 16px; top: 18px; padding: 9px 16px; font-size: 11px; }
  #nav-brand{ left: 18px; top: 20px; font-size: 18px; }
  .t-section{ padding: 76px 0; }
  .t-section.tight-top{ padding-top: 28px; }
  .t-standfirst{ margin-bottom: 44px; }

  .support-section{ padding-bottom: 90px; }
  .support-eyebrow{ margin-bottom: 44px; }
  .support-list{ gap: 28px; }
  .support-media{ aspect-ratio: 4 / 3; }
  .support-copy{ padding: 30px 7vw; }
  .support-copy h3{ font-size: 22px; }

  .closing-section{ padding: 90px 0; }

  #hero-photo{ flex: 0 0 58%; }
  .hero-headline{ font-size: 8.4vw; }
  .hero-eyebrow{ font-size: 4vw; }
  .hero-para-line{ font-size: 4.2vw; max-width: 92vw; }

  #site-footer{ padding-top: 90px; }
  .footer-top{ padding-bottom: 56px; }
  .footer-columns{ flex-direction: column; gap: 44px; padding: 44px 0 56px; }
  .footer-bottom{ padding: 24px 0; }
  .footer-legal a{ margin-right: 16px; }

  .legal-hero{ padding: 150px 0 50px; }
  .legal-body{ padding: 50px 0 100px; }
  .legal-content section{ margin-bottom: 44px; }
}
