:root{
  /* Night (default) theme variables */
  --bg:#0b0b0d; /* near-black background */
  --card:#0f1722; /* slightly lighter card */
  --accent:#60a5fa; /* lighter blue for contrast */
  --muted:#9ca3af; /* muted light text */
  --text:#e6eef8; /* primary page text (light) */
  --radius:10px;
  --container:1100px;
}
*{box-sizing:border-box}
html,body{height:100%}
html{scroll-behavior: smooth;}
body{
  margin:0;
  font-family:system-ui,-apple-system,Segoe UI,Roboto,Helvetica,Arial;
  background:var(--bg);
  color:var(--text);
  transition:background .25s ease,color .25s ease;
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
}
.container{max-width:var(--container);margin:0 auto;padding:0 1rem}

/* Header */
.site-header{
  background:transparent;
  padding:1rem 0;
  position:relative;
}
.header-inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
}
.brand{
  font-weight:700;
  color:var(--accent);
  text-decoration:none;
  font-size:1.1rem;
}

/* Dropdown nav shared by index + home */
.site-nav{
  position:absolute;
  top:100%;
  right:1rem;
  background:var(--card);
  padding:.75rem 1rem;
  border-radius:10px;
  box-shadow:0 12px 30px rgba(2,6,23,0.35);
  display:none;                 /* hidden by default */
}
.site-nav ul{
  list-style:none;
  margin:0;
  padding:0;
  display:flex;
  flex-direction:column;        /* vertical list */
  gap:.5rem;
}
.site-nav a{
  text-decoration:none;
  color:var(--muted);
}
.site-nav[aria-hidden="false"]{
  display:block;                /* shown when JS flips aria-hidden */
}

/* Menu button always visible where allowed */
.nav-toggle{
  background:transparent;
  border:1px solid var(--muted);
  padding:.4rem .6rem;
  border-radius:6px;
  color:var(--muted);
  display:inline-flex;
  align-items:center;
}


/* Theme toggle button */
.header-controls{display:flex;gap:.5rem;align-items:center}
.theme-toggle{background:transparent;border:1px solid var(--muted);color:var(--muted);padding:.35rem .6rem;border-radius:6px}
.theme-toggle:focus{outline:2px solid rgba(96,165,250,0.25);outline-offset:2px}

/* screen-reader only helper */
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}

/* Icon styling and animation */

:root{
  --control-height:40px;
}

/* make the control height consistent so buttons align */
.theme-toggle{display:inline-flex;align-items:center;justify-content:center;gap:.4rem;min-width:44px;height:var(--control-height);padding:0 .6rem;position:relative}
.nav-toggle{height:var(--control-height);padding:0 .6rem;display:inline-flex;align-items:center}

/* icons overlap and crossfade */
.theme-toggle .icon{position:absolute;left:50%;top:50%;width:18px;height:18px;color:var(--muted);transform:translate(-50%,-50%);transition:opacity .28s ease;pointer-events:none}
.theme-toggle .icon circle{fill:currentColor}
.theme-toggle .icon path{fill:currentColor}
.theme-toggle .icon g, .theme-toggle .icon line{stroke:currentColor}

/* default: night -> moon visible, sun hidden */
.theme-toggle .icon-sun{opacity:0}
.theme-toggle .icon-moon{opacity:1}

/* when day is active show sun (crossfade) */
html[data-theme="day"] .theme-toggle .icon-sun{opacity:1}
html[data-theme="day"] .theme-toggle .icon-moon{opacity:0}

/* optional hover state to indicate interactivity */
.theme-toggle:hover{border-color:var(--accent);color:var(--accent)}

/* Hero */
.hero{padding:4rem 0;background:linear-gradient(180deg,rgba(37,99,235,0.06),transparent)}
.hero h1{margin:0 0 .5rem;font-size:2rem}
.lead{margin:0 0 1rem;color:var(--muted)}
.btn{display:inline-block;background:var(--accent);color:#fff;padding:.6rem 1rem;border-radius:8px;text-decoration:none}

/* Features */
.features{padding:3rem 0}
.grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:1rem}
.grid article{background:var(--card);padding:1.25rem;border-radius:var(--radius);box-shadow:0 1px 3px rgba(2,6,23,0.06)}

/* How / Contact */
.how,.contact{padding:2rem 0}

/* Footer */
.site-footer{padding:1.25rem 0;color:var(--muted)}

/* Auth pages: hide nav + menu on login/signup, but NOT on home */
body.auth-page:not(.home-page) .site-nav,
body.auth-page:not(.home-page) .nav-toggle{
  display:none !important;
}

/* header-inner stays relative so dropdown anchors correctly */
.header-inner{
  position:relative;
}


/* Day theme overrides */
html[data-theme="day"]{
  --bg:#f7f7fb;
  --card:#ffffff;
  --accent:#2563eb;
  --muted:#6b7280;
  --text:#0f172a;
}

/* small utilities */
h2{margin-top:0}

/* On narrower screens, stack feature/how cards in a single column */
@media (max-width: 900px){
  #features .grid,
  #how .grid{
    grid-template-columns: 1fr;
  }
}

/* Contact carousel styles */
:root{
  --card-w: 190px;       /* base card width */
  --card-gap: 16px;      /* horizontal gap between cards */
  --slide-ms: 450ms;
}

/* Carousel card sizing tiers: desktop → tablet → phone */
@media (max-width: 1100px){
  :root{
    --card-w: 220px;     /* wider cards → ~3 visible */
  }
}

@media (max-width: 800px){
  :root{
    --card-w: 240px;     /* keep ~3 nicely sized */
  }
}

@media (max-width: 640px){
  :root{
    --card-w: 70vw;      /* essentially a single big card */
    --card-gap: 12px;
  }
}

/* 3-card viewport on medium screens: clip cards 0 and 4 */
@media (min-width: 696px) and (max-width: 1100px){
  .carousel{
    max-width: calc(var(--card-w) * 3 + var(--card-gap) * 2 + 5rem);
    margin-left: auto;
    margin-right: auto;
  }

  .carousel-track{
    margin: 0 2.5rem;
  }

  .carousel-prev{
    left: 0.75rem;
  }

  .carousel-next{
    right: 0.75rem;
  }

}


/* Outer shell: arrows + track inline, equal spacing on both sides */
.carousel{
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 11.5rem;          /* space between arrows and cards */
  padding: 0.75rem 0;
  overflow: hidden;
}

/* The sliding strip */
.carousel-track{
  flex: 1 1 auto;
  display: flex;
  justify-content: center;
  gap: var(--card-gap);
  will-change: transform;
  transition: transform var(--slide-ms) ease;
}

/* Arrow buttons */
.carousel-prev,
.carousel-next{
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 0px;
  color: var(--muted, rgba(148,163,184,.9));
  cursor: pointer;
}

/* Keep arrows visible + padded on small screens */
@media (max-width: 640px){
  .carousel{
    padding: 0.5rem 0.75rem;   /* less horizontal padding so arrows stay inside */
  }

  .carousel-prev,
  .carousel-next{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    width:32px;
    height:32px;
  }

  .carousel-prev{ left:0; }    /* equal spacing from cards on both sides */
  .carousel-next{ right:0; }
}

/* Person cards */
.person{
  flex: 0 0 var(--card-w);
  text-align: center;
  transform-origin: center center;
  transition: transform .28s ease, opacity .28s ease;
}

.person-card{
  padding: .6rem;
}

.person .avatar{
  width: 100%;
  max-width: 180px;
  height: 180px;
  object-fit: cover;
  border-radius: 12px;
  margin: 0 auto;
  transition: transform .28s ease, box-shadow .28s ease;
}

/* active/inactive states */
.person .contact-full{ display:none; margin-top:.35rem; gap:.25rem; }

.person.is-active{
  transform: scale(1.08);
}
.person.is-active .avatar{
  transform: scale(1.06);
  box-shadow: 0 12px 30px rgba(2,6,23,.25);
}
.person.is-active .contact-full{
  display:flex;
  flex-direction:column;
}
.person.is-inactive{
  opacity:.6;
  transform:scale(.98);
}

/* contact email styling */
.person .contact-full a{
  color:var(--text);
  text-decoration:none;
  font-weight:500;
}
.person .contact-full a:hover{color:var(--accent);}

/* --- Responsive carousel sizing tiers --- */
:root{
  --card-w: 190px;
  --card-gap: 16px;
  --slide-ms: 450ms;
}

/* Medium screens: slightly narrower cards (roughly 3 visible) */
@media (max-width: 960px){
  :root{
    --card-w: 180px;
  }
}

/* Small screens: single focused card centered */
@media (max-width: 640px){
  :root{
    --card-w: 68vw;      /* card scales with viewport width */
    --card-gap: 12px;
  }

  .carousel{
    gap: .75rem;
  }

  .person .avatar{
    max-width: 260px;
    height: auto;
  }
}

/* --- Auth page styling improvements --- */
/* Logged-in home page: Menu button + dropdown nav only */
body.home-page .site-header{
  position: relative;
}

body.home-page .nav-toggle{
  display:inline-flex !important;
}

body.home-page .site-nav{
  position:absolute;
  top:100%;
  right:1rem;
  background:var(--card);
  padding:.75rem 1rem;
  border-radius:8px;
  box-shadow:0 12px 30px rgba(2,6,23,0.35);
  display:none !important;
}

body.home-page .site-nav ul{
  flex-direction:column;
  gap:.5rem;
}

body.home-page .site-nav[aria-hidden="false"]{
  display:block !important;
}


.auth-form .panel-intro,
.auth-form .auth-left,
.auth-form .panel-info {
  transition: none !important;
  transform: none !important;
}

@media (max-height: 640px){
  .auth-form .panel{ overflow:auto; }
}

/* center auth viewport and give left side padding */
.auth-viewport{
  min-height: calc(100vh - 120px);
  display:flex;
  justify-content:center;
  align-items:flex-start;          /* anchor from top so it doesn’t jump */
  padding:3rem 1rem;
}

.auth-card{
  display:grid;
  grid-template-columns:1fr 1fr;
  max-width:980px;
  width:100%;
  background:var(--card);
  border-radius:12px;
  overflow:hidden;
  box-shadow:0 10px 30px rgba(2,6,23,0.18);
}

.auth-side{
  padding:2.25rem;
  display:flex;
  flex-direction:column;
  gap:1rem;
  align-items:flex-start;
  justify-content:center;
}

/* Centered variant for the coming-soon card on home.html */
.auth-card--center{
  grid-template-columns: 1fr;          /* single-column card */
  max-width: 720px;                    /* a bit narrower looks nicer */
}

.auth-card--center .auth-side--center{
  align-items: center;
  text-align: center;
  max-width: 40rem;
  margin-inline: auto;
}

.auth-card--center .auth-side--center .btn{
  align-self: center;                  /* center the button too */
}


/* right column is the sliding area */
.auth-form{
  grid-column:2 / 3;
  position:relative;
  overflow-x:hidden;
  overflow-y:auto;
  min-height:520px;                /* same height in both modes */
}

/* panels layout + animation (only right side moves) */
.auth-form .panel{
  position:absolute;
  inset:0;
  padding:2rem;
  box-sizing:border-box;
  display:flex;
  flex-direction:column;
  justify-content:flex-start;
  transition:transform .45s cubic-bezier(.2,.9,.25,1), opacity .28s ease;
  will-change: transform, opacity;
  backface-visibility: hidden;
}

/* default: signup visible, login off to the right */
.auth-form .panel-signup{
  transform:translateX(0);
  opacity:1;
}
.auth-form .panel-login{
  transform:translateX(100%);
  opacity:0;
}

/* when in login mode, slide signup left and bring login in */
.auth-card.auth-mode-login .panel-signup{
  transform:translateX(-100%);
  opacity:0;
}
.auth-card.auth-mode-login .panel-login{
  transform:translateX(0);
  opacity:1;
}

/* smaller screens: hide left side, form takes full width */
@media (max-width:720px){
  .auth-card{
    grid-template-columns:1fr;
  }

  body.auth-page:not(.home-page) .auth-side{
    display:none;
  }

  body.auth-page:not(.home-page) .auth-form{
    grid-column:1 / -1;
    min-height:520px;
  }
}


/* very short viewports: allow internal scroll without moving the card */
@media (max-height:640px){
  .auth-form{
    min-height:420px;
  }
  .auth-form .panel{
    overflow:auto;
  }
}

/* Keep action buttons visible and spaced */
.auth-actions{
  margin-top:1rem;
  flex-wrap:wrap;
}

.auth-actions{margin-top:1rem; flex-wrap:wrap}

.back-link{
  display:inline-flex;
  align-items: center;
  gap:.35rem;
  font-size:.85rem;
  color:var(--muted);
  text-decoration: none;
  margin-bottom:1rem;
}

.back-link svg{
  width:16px;
  height:16px;
  flex-shrink:0;
}

.back-link:hover{
  color:var(--accent)
}

body.auth-page .input{
  display:flex;
  flex-direction:column;
  gap:.35rem;
  margin-top:.75rem;
}

/* Account type segmented control */
.account-type-group {
  margin-top: 1rem;
}

.account-type-label {
  display: block;
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 0.4rem;
}

.account-type-options {
  display: flex;
  gap: 0.75rem;
  width: 100%;
  max-width: 260px;          /* total width of both pills together */
  margin-left: 0;            /* align with Create account button */
  margin-right: auto;
}

@media (min-width: 640px) {
  .account-type-options {
    flex-direction: row;
  }
}

.account-type-option {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;   /* center text */
  flex: 1 1 0;               /* equal width */
  height: var(--control-height);  /* same height as header controls */
  padding: 0;                /* height controls vertical size */
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.6);
  background: rgba(15, 23, 42, 0.9);
  color: var(--text);
  font-size: 0.9rem;
  cursor: pointer;
  transition:
    background 0.18s ease,
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    transform 0.12s ease;
}

/* hide the native radio, but keep it focusable for a11y */
.account-type-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.account-type-option span {
  pointer-events: none;
}

/* focus ring when tabbing */
.account-type-option:focus-within {
  outline: 2px solid rgba(96, 165, 250, 0.7);
  outline-offset: 2px;
}

/* selected state – requires modern browsers (:has) */
.account-type-option:has(input:checked) {
  background: var(--accent);
  color: #ffffff;
  border-color: transparent;
  box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.6);
  transform: translateX(2px);
}

/* day theme tweaks – keep contrast clean */
html[data-theme="day"] .account-type-option {
  background: #ffffff;
  border-color: rgba(148, 163, 184, 0.5);
}

html[data-theme="day"] .account-type-option:has(input:checked) {
  background: var(--accent);
  color: #ffffff;
}


body.auth-page .input label{
  font-size:.85rem;
  color:var(--muted);
}

body.auth-page .input input{
  width:100%;
  padding:.55rem .8rem;
  border-radius:8px;
  border:1px solid rgba(148,163,184,0.45);
  background:#020617;
  color:var(--text);
  font-size:.9rem;
  outline:none;
  transition:border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

/* Stack Features & How it works vertically on narrower screens */
@media (max-width: 900px){
  .features .grid,
  #how .grid{
    grid-template-columns: 1fr !important;
  }
}

html[data-theme="day"] body.auth-page .input input{
  background:#f9fafb;
  border-color:rgba(148,163,184,0.6);
}

body.auth-page .input input::placeholder{
  color:rgba(148,163,184,0.75);
}

body.auth-page .input input:focus{
  border-color:var(--accent);
  box-shadow:0 0 0 1px rgba(96,165,250,0.6);
}

/* Button row under the fields */
body.auth-page .auth-actions{
  display:flex;
  flex-wrap:wrap;
  gap:.6rem;
  align-items:center;
  margin-top:1rem;
}

/* Primary button */
body.auth-page .btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  height: var(--control-height);   /* same as account-type pills */
  padding: 0 1.2rem;               /* horizontal padding only */
  border-radius:999px;
  background:var(--accent);
  color:#fff;
  font-size:.9rem;
  font-weight:600;
  border:none;
  cursor:pointer;
  text-decoration:none;
  margin-left: 0;                  /* align left with toggle group */
  transition:background .18s ease,
             transform .1s ease,
             box-shadow .18s ease;
}

body.auth-page .btn:hover{
  background:#3b82f6;
  transform:translateY(-1px);
  box-shadow:0 10px 22px rgba(37,99,235,0.35);
}

body.auth-page .btn:active{
  transform:translateY(0);
  box-shadow:none;
}

/* Small "Log in / Create account" text buttons */
body.auth-page .link{
  background:transparent;
  border:none;
  padding:0;
  margin:0;
  font:inherit;
  color:var(--accent);
  cursor:pointer;
  text-decoration:underline;
}

body.auth-page .link:hover{
  color:#93c5fd;
}

/* --- Carousel overrides: arrows + spacing + visibility --- */

/* Base layout: 3-card viewport already handled by earlier max-width rule */
.carousel{
  position: relative;
  display: block;          /* override earlier flex layout */
  padding: 0.75rem 0;
  overflow: hidden;
}

/* Leave space inside for arrows on both sides */
.carousel-track{
  display: flex;
  justify-content: center;
  gap: var(--card-gap);
  will-change: transform;
  transition: transform var(--slide-ms) ease;
  margin: 0 3rem;          /* space between first/last card and arrows */
}

/* Arrow buttons: larger, no circle, just arrow glyph */
.carousel-prev,
.carousel-next{
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: var(--muted);
  font-size: 1.8rem;       /* bigger arrows */
  line-height: 1;
  width: auto;
  height: auto;
  padding: 0;
  cursor: pointer;
}

.carousel-prev{ left: 0.75rem; }
.carousel-next{ right: 0.75rem; }

/* Slight tweaks on very small screens */
@media (max-width: 695px){
  .carousel-track{
    margin: 0 2.25rem;
  }
  .carousel-prev,
  .carousel-next{
    font-size: 1.6rem;
  }
}

/* Each person card is fixed width – no shrinking */
.carousel-track .person{
  flex: 0 0 var(--card-w);
}

