/* arulhealth.org — a close copy of google.org's homepage grid, measured from a
   1512px capture: 64px header, 108px side margins (1296 content), 60/72 hero,
   302px program cards on a 378px pitch, 36/44 statement, 3-column 3:4 focus
   cards, a 502/502 resources split, and a #f8f9fa footer. Google's blue link
   color is replaced by the violet from the Arul wordmark. */

:root {
  --bg: #ffffff;
  --bg-footer: #f8f9fa;
  --ink: #202124;
  --ink-2: #5f6368;
  --ink-3: #80868b;
  --rule: #dadce0;

  --accent: #8e4dff;          /* "Health" in the Arul wordmark */
  --accent-hover: #6b2bd9;
  --accent-soft: #f1ebff;     /* google.org's #e8f0fe equivalent */

  --font-display: "Google Sans", "Google Sans Text", Arial, Helvetica, sans-serif;
  --font-text: "Google Sans Text", "Google Sans", Arial, Helvetica, sans-serif;

  --content: 1296px;
  --margin: 108px;
  --gutter-l: max(24px, env(safe-area-inset-left, 0px));
  --gutter-r: max(24px, env(safe-area-inset-right, 0px));

  --card: 302.4px;
  --card-gap: 75.6px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-text);
  font-size: 16px;
  line-height: 24px;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, h4, p { margin: 0; font-weight: 400; }
a { color: inherit; text-decoration: none; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

/* 1296px content column with 108px margins at the capture width; the margins
   shrink proportionally and never go below the gutter. */
.wrap {
  max-width: var(--content);
  margin-inline: auto;
  padding-left: var(--gutter-l);
  padding-right: var(--gutter-r);
}
@media (min-width: 1100px) {
  .wrap { padding-left: max(var(--margin), var(--gutter-l)); padding-right: max(var(--margin), var(--gutter-r)); max-width: calc(var(--content) + 2 * var(--margin)); }
}

.skip {
  position: absolute; left: 12px; top: -60px;
  background: var(--ink); color: #fff; padding: 12px 16px; border-radius: 4px; z-index: 100;
}
.skip:focus { top: 12px; }

/* ---------- Type ---------- */
h1 { font-family: var(--font-display); font-size: 60px; line-height: 72px; letter-spacing: -0.5px; text-wrap: balance; }
h2 { font-family: var(--font-display); font-size: 48px; line-height: 56px; letter-spacing: -0.5px; text-wrap: balance; }
h3 { font-family: var(--font-display); font-size: 28px; line-height: 36px; }
.lede { font-family: var(--font-display); font-size: 28px; line-height: 36px; text-wrap: pretty; }
.eyebrow { font-size: 10px; line-height: 16px; letter-spacing: 0.5px; text-transform: uppercase; color: var(--ink-3); }
.card-title { font-size: 16px; line-height: 24px; color: var(--ink-3); }

.text-link {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--accent); font-size: 16px; line-height: 24px; letter-spacing: 0.5px;
}
.text-link svg { width: 24px; height: 24px; fill: currentColor; flex-shrink: 0; }
.text-link svg.sm { width: 18px; height: 18px; }
.text-link:hover { color: var(--accent-hover); text-decoration: underline; text-underline-offset: 3px; }

@media (max-width: 760px) {
  h1 { font-size: 36px; line-height: 44px; letter-spacing: -0.25px; }
  h2 { font-size: 32px; line-height: 40px; letter-spacing: -0.25px; }
  h3 { font-size: 24px; line-height: 32px; }
  .lede { font-size: 20px; line-height: 28px; }
}

/* ---------- Header: copied from arulhealth.com ----------
   80px bar (79 + 1px rule), 64px side padding, 36px logo, Inter 17/500 links
   40px apart, translucent #fcfcfc with a 20px backdrop blur, and the
   "Try Arul →" button (#0B2A16 on #CFFADF, 12px radius, 10x20 padding). */
.site-header {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50;
  background: rgba(252, 252, 252, 0.85);
  -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(17, 17, 17, 0.1);
  font-family: "Inter", ui-sans-serif, system-ui, sans-serif;
}
.header-inner {
  position: relative;
  display: flex; align-items: center; justify-content: space-between;
  height: 79px;
  padding-left: max(64px, env(safe-area-inset-left, 0px));
  padding-right: max(64px, env(safe-area-inset-right, 0px));
}
.brand { display: inline-flex; align-items: flex-end; gap: 1px; flex-shrink: 0; }
.brand img { width: auto; height: 36px; }
/* The wordmark's text baseline sits at y=200 of the SVG's 205 units; the
   ".org" (Google Sans 500, asc/desc ~0.94em/0.29em) is pulled down so both
   baselines meet: (size - asc + desc)/2 - 36*5/205. */
.brand-suffix { font-family: var(--font-display); font-weight: 500; font-size: 24px; line-height: 1; color: var(--ink); margin-bottom: -3px; }
.brand-small { align-items: center; }
.brand-small img { height: 24px; }

/* Centered on the bar itself (space-between would offset it by the
   difference between the logo and button widths). */
.site-nav { display: flex; align-items: center; gap: 40px; position: absolute; left: 50%; transform: translateX(-50%); }
.site-nav a {
  font-size: 17px; line-height: 1.5; font-weight: 500; color: #1f2937;
  white-space: nowrap; transition: color .2s;
}
.site-nav a:hover { color: #000; }

.header-actions { display: flex; align-items: center; gap: 24px; flex-shrink: 0; }
.btn-try {
  display: inline-flex; align-items: center; gap: 8px; white-space: nowrap;
  background: #0b2a16; color: #cffadf;
  border-radius: 12px; padding: 10px 20px;
  font-size: 15px; line-height: 1.5; font-weight: 500;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  transition: background-color .2s;
}
.btn-try:hover { background: #06180c; }
.btn-arrow { display: inline-block; transition: transform .2s; }
.btn-try:hover .btn-arrow { transform: translateX(2px); }

.menu-toggle {
  display: none;
  width: 44px; height: 44px; border: 0; background: transparent; cursor: pointer; border-radius: 8px;
  flex-direction: column; justify-content: center; align-items: center; gap: 5px;
}
.menu-toggle span { width: 20px; height: 2px; background: #1f2937; border-radius: 1px; transition: transform .2s, opacity .2s; }
.menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-nav {
  display: flex; flex-direction: column;
  padding-left: var(--gutter-l); padding-right: var(--gutter-r); padding-block: 8px 16px;
  border-top: 1px solid rgba(17, 17, 17, 0.1);
  font-family: "Inter", ui-sans-serif, system-ui, sans-serif;
}
.mobile-nav a { padding: 12px 0; font-size: 17px; line-height: 1.5; font-weight: 500; color: #1f2937; }
[hidden] { display: none !important; }

/* arulhealth.com switches to its compact bar below 1024px: 26px logo, 20px
   padding, 44px-tall button with 16px side padding, nav behind a menu button. */
@media (max-width: 1023px) {
  .header-inner { padding-left: max(20px, env(safe-area-inset-left, 0px)); padding-right: max(20px, env(safe-area-inset-right, 0px)); }
  .brand img { height: 26px; }
  .brand-suffix { font-size: 20px; margin-bottom: -3px; }
  .site-nav { display: none; }
  .header-actions { gap: 10px; }
  .btn-try { min-height: 44px; padding: 12px 16px; font-size: 14px; gap: 6px; }
  .menu-toggle { display: flex; }
}
/* Narrow phones: the ".org" suffix adds ~40px arulhealth.com's bar doesn't
   carry, so trim the logo, button padding and menu button to fit 375px. */
@media (max-width: 420px) {
  .brand img { height: 24px; }
  .brand-suffix { font-size: 18px; margin-bottom: -3px; }
  .header-actions { gap: 6px; }
  .btn-try { padding: 12px 14px; }
  .menu-toggle { width: 36px; }
}

/* ---------- Hero ---------- */
.hero { padding-top: 80px; }
.hero-text { padding-left: var(--gutter-l); padding-right: var(--gutter-r); text-align: center; }
.hero-text h1 { max-width: 760px; margin-inline: auto; }
@media (max-width: 760px) { .hero { padding-top: 48px; } }

/* ---------- Program rail: 302.4px cards, 378px pitch, active card centered.
   The track is moved with a transform by script.js (see there for why), so it
   never scrolls natively; the viewport clips it and vertical touch scrolling
   still reaches the page. ---------- */
.carousel { padding-top: 80px; overflow: hidden; touch-action: pan-y; cursor: grab; user-select: none; -webkit-user-select: none; }
.carousel.is-dragging { cursor: grabbing; }
.carousel.is-dragging a { pointer-events: none; }
.track {
  display: flex; gap: var(--card-gap);
  width: max-content;
  will-change: transform;
}
.card { flex: 0 0 var(--card); }
.card a { display: block; }
.card .media {
  width: var(--card); height: var(--card); max-width: 100%;
  display: flex; align-items: center; overflow: hidden;
}
.card .media img { width: 100%; height: 100%; object-fit: cover; -webkit-user-drag: none; }
.card.is-landscape .media img { height: calc(var(--card) * 2 / 3); }
.card .eyebrow { padding-top: 24px; }
.card .card-title { padding-top: 8px; }
.card.is-active .eyebrow { color: var(--accent); }
.card.is-active .card-title { color: var(--ink); }
.card a:hover .card-title { text-decoration: underline; text-underline-offset: 3px; }

.carousel-controls {
  display: flex; justify-content: flex-end; gap: 4px;
  padding: 16px 16px 8px;
}
.arrow {
  width: 50px; height: 50px; border-radius: 50%;
  border: 1px solid transparent; background: transparent; color: var(--accent);
  display: grid; place-items: center; cursor: pointer;
  transition: background .15s, opacity .15s;
}
.arrow svg { width: 24px; height: 24px; fill: currentColor; }
.arrow:hover { background: var(--accent-soft); }
.arrow:disabled { opacity: .38; cursor: default; background: transparent; }

@media (max-width: 760px) {
  :root { --card: min(302.4px, calc(100vw - 96px)); --card-gap: 32px; }
  .carousel { padding-top: 48px; }
}

/* ---------- Statement (36/44, 694px measure, 116px above) ---------- */
.mission { padding-top: 116px; padding-left: var(--gutter-l); padding-right: var(--gutter-r); }
.statement {
  font-family: var(--font-display);
  font-size: 36px; line-height: 44px; letter-spacing: -0.25px;
  text-align: center; max-width: 720px; margin-inline: auto; padding-top: 16px;
  text-wrap: balance;
}
@media (max-width: 760px) {
  .mission { padding-top: 64px; }
  .statement { font-size: 24px; line-height: 32px; letter-spacing: 0; }
}

/* ---------- Feature image (1296 x 729) ---------- */
.feature { padding-top: 180px; }
.feature-media { width: 100%; aspect-ratio: 1296 / 729; max-width: 100%; overflow: hidden; }
.feature-media img { width: 100%; height: 100%; object-fit: cover; object-position: center; }
@media (max-width: 760px) { .feature { padding-top: 64px; } .feature-media { aspect-ratio: 4 / 3; } }

/* ---------- Our focus ---------- */
.focus { padding-top: 187px; }
.focus .wrap { padding-top: 36px; padding-bottom: 36px; }
.focus-head { display: grid; gap: 16px; text-align: center; max-width: 842px; margin-inline: auto; }
.focus-grid {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 64px;
  margin-top: 80px;
}
.focus-card { display: block; border-radius: 8px; }
.focus-media { aspect-ratio: 389.33 / 518.44; max-width: 100%; overflow: hidden; border-radius: 8px 8px 0 0; }
.focus-media img { width: 100%; height: 100%; object-fit: cover; }
.focus-body { padding: 24px 24px 32px; }
.focus-body p { padding-top: 8px; color: var(--ink-2); letter-spacing: 0.1px; text-wrap: pretty; }
.focus-body .text-link { margin-top: 15px; }
.focus-card:hover h3 { text-decoration: underline; text-underline-offset: 4px; }
@media (max-width: 1000px) { .focus-grid { grid-template-columns: 1fr; gap: 48px; max-width: 520px; margin-inline: auto; } }
@media (max-width: 760px) { .focus { padding-top: 80px; } .focus-grid { margin-top: 48px; } }

/* ---------- Resources (502 / 502 split, centered in 1126) ---------- */
.resources { padding-top: 180px; padding-bottom: 180px; }
.resources-inner {
  display: grid; grid-template-columns: minmax(0, 502px) minmax(0, 502px); gap: 64px;
  justify-content: center; align-items: center;
  padding-top: 36px; padding-bottom: 36px;
}
.resources-media { aspect-ratio: 502 / 376; max-width: 100%; overflow: hidden; border-radius: 8px; background: #f6f4f9; }
.resources-media img { width: 100%; height: 100%; object-fit: contain; }
.resources-copy h2 { max-width: 320px; }
.resources-copy p { font-size: 18px; line-height: 28px; padding-top: 16px; max-width: 448px; text-wrap: pretty; }
.resources-copy .text-link { margin-top: 24px; }
@media (max-width: 900px) {
  .resources { padding-top: 80px; padding-bottom: 80px; }
  .resources-inner { grid-template-columns: 1fr; gap: 32px; }
  .resources-copy h2 { max-width: none; }
}

/* ---------- Footer (#f8f9fa, 108px margins, 3 columns / 40px gap) ---------- */
.site-footer {
  background: var(--bg-footer);
  padding-left: var(--gutter-l); padding-right: var(--gutter-r);
}
@media (min-width: 1100px) {
  .site-footer { padding-left: max(var(--margin), var(--gutter-l)); padding-right: max(var(--margin), var(--gutter-r)); }
}
.footer-bottom {
  max-width: var(--content); margin-inline: auto;
  display: flex; align-items: flex-start; flex-wrap: wrap; gap: 0 24px;
  padding: 40px 0 8px;
}
.footer-bottom .brand { height: 24px; margin-right: 24px; margin-bottom: 32px; }
.legal { display: flex; flex-wrap: wrap; gap: 0 24px; color: var(--ink-2); }
.legal li { padding-bottom: 16px; }
.legal a { display: inline-flex; align-items: center; gap: 8px; }
.legal a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.legal svg { width: 24px; height: 24px; fill: currentColor; }
.legal-right { margin-left: auto; }
@media (max-width: 760px) {
  .legal-right { margin-left: 0; }
}
