/* ===========================================================
   KINDORF — design tokens
   Palette: deep navy / sky blue / off-white+white / ink
   Display type: Fraunces (organic serif, echoes the logo's K)
   Body type: Work Sans
=========================================================== */

:root{
  color-scheme: light dark;
  --cream: #F4F7FB;
  --white: #FFFFFF;
  --forest: #16365C;
  --forest-deep: #0B2038;
  --hover-shade: #0B2038;
  --sage: #5A8FC7;
  --sage-light: #DCE8F6;
  --ink: #12202E;
  --ink-soft: #4B5C6B;
  --line-rgb: 22,54,92;
  --header-glass-rgb: 244,247,251;
  --error: #9C3B2E;

  --font-display: "Fraunces", serif;
  --font-body: "Work Sans", sans-serif;

  --radius: 2px;
  --max: 1040px;
  --ease: cubic-bezier(.22,.9,.3,1);
}

@media (prefers-color-scheme: dark){
  :root{
    --cream: #0E1620;
    --white: #16232F;
    --forest: #6FA8DC;
    --forest-deep: #EAF1F8;
    --hover-shade: #8FBEE8;
    --sage: #7FB2E0;
    --sage-light: #1E2F42;
    --ink: #EDF1F5;
    --ink-soft: #A9B7C4;
    --line-rgb: 127,178,224;
    --header-glass-rgb: 14,22,32;
    --error: #E2685A;
  }
}

*{ box-sizing: border-box; }
html{ scroll-behavior: smooth; }
html, body{ max-width: 100%; }

body{
  margin:0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1,h2,h3{
  font-family: var(--font-display);
  color: var(--forest-deep);
  margin: 0 0 .4em;
  letter-spacing: -0.01em;
  font-weight: 500;
}

a{ color: inherit; text-decoration: none; }
ul,dl{ margin:0; padding:0; list-style:none; }
button{ font-family: inherit; cursor:pointer; }

::selection{ background: var(--sage); color: var(--white); }

:focus-visible{
  outline: 2px solid var(--forest);
  outline-offset: 3px;
}

/* ---------- signature element: growing vine progress line ---------- */
.vine-progress{
  position: fixed;
  top: 0; left: 0;
  height: 100vh;
  width: 40px;
  pointer-events: none;
  z-index: 5;
  opacity: .7;
  display: none;
}
@media (min-width: 1024px){
  .vine-progress{ display:block; left: 12px; }
}
.vine-progress svg{ width:100%; height:100%; }
#vine-path{
  fill:none;
  stroke: var(--forest);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-dasharray: 2600;
  stroke-dashoffset: 2600;
  transition: stroke-dashoffset .1s linear;
}

/* ---------- header ---------- */
.site-header{
  position: sticky; top:0;
  z-index: 50;
  background: rgba(var(--header-glass-rgb),.42);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border-bottom: 1px solid rgba(var(--line-rgb),.12);
  transition: background .3s var(--ease);
}
.header-inner{
  max-width: var(--max);
  margin: 0 auto;
  padding: 16px 28px;
  display:flex;
  align-items:center;
  gap: 28px;
  position: relative;
}
.brand{ display:flex; align-items:center; gap:10px; margin-right:auto; }
.brand-mark{ width:38px; height:38px; border-radius:50%; object-fit:cover; }
.brand-word{
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 600;
  letter-spacing: .06em;
  color: var(--forest-deep);
}
.main-nav{ display:flex; gap: 26px; }
.main-nav a{
  font-size: .88rem;
  color: var(--ink-soft);
  position: relative;
  padding: 4px 0;
  transition: color .2s var(--ease);
}
.main-nav a::after{
  content:"";
  position:absolute; left:0; bottom:-2px;
  width:0; height:1px;
  background: var(--forest);
  transition: width .25s var(--ease);
}
.main-nav a:hover{ color: var(--forest-deep); }
.main-nav a:hover::after{ width:100%; }

.lang-switch{
  display:flex;
  flex-shrink: 0;
  border:1px solid var(--forest);
  border-radius: 20px;
  overflow:hidden;
  background: rgba(var(--header-glass-rgb),.9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.lang-btn{
  border:none; background:transparent; color:var(--forest-deep);
  font-size:.72rem; letter-spacing:.06em; padding:6px 12px;
  min-width: 42px; text-align:center; white-space:nowrap;
  transition: background .2s var(--ease), color .2s var(--ease);
}
.lang-btn.active{ background: var(--forest); color: var(--white); }

/* on desktop, float the language switch below the header instead
   of sitting inline in the nav row */
@media (min-width: 881px){
  .lang-switch{
    position: absolute;
    top: 100%;
    left: 28px;
    margin-top: 14px;
    box-shadow: 0 10px 24px -8px rgba(var(--line-rgb),.35);
    z-index: 51;
    animation: langFloat 3.6s ease-in-out infinite;
  }
}
@media (min-width: 881px) and (prefers-reduced-motion: reduce){
  .lang-switch{ animation: none; }
}
@keyframes langFloat{
  0%, 100%{ transform: translateY(0); }
  50%{ transform: translateY(-4px); }
}

.link-btn{
  background:none; border:none; padding:0;
  font: inherit; font-size:.86rem;
  color: var(--forest); text-decoration: underline;
  cursor: pointer;
}
.link-btn:hover{ color: var(--forest-deep); }

.nav-toggle{ display:none; flex-direction:column; gap:5px; background:none; border:none; padding:6px; }
.nav-toggle span{ width:22px; height:2px; background:var(--forest-deep); display:block; }

@media (max-width: 880px){
  .main-nav{
    position:absolute; top:100%; left:0; right:0;
    flex-direction:column; background: var(--cream);
    padding: 18px 28px 26px;
    border-bottom: 1px solid rgba(var(--line-rgb),.1);
    display:none;
    gap: 16px;
    z-index: 45;
  }
  .main-nav.open{ display:flex; }
  .nav-toggle{ display:flex; }
}

@media (max-width: 480px){
  .header-inner{ gap: 6px; padding: 12px 14px; flex-wrap: nowrap; }
  .brand{ gap:6px; }
  .brand-mark{ width:28px; height:28px; }
  .brand-word{ font-size: 1.1rem; letter-spacing: .02em; }
  .lang-btn{ padding: 7px 13px; font-size:.78rem; min-width: 38px; }
  .nav-toggle{ padding: 5px 2px 5px 6px; gap:4px; }
  .nav-toggle span{ width:18px; }
}

@media (max-width: 340px){
  .brand-word{ display:none; }
}
.hero{
  max-width: var(--max);
  margin: 0 auto;
  padding: 96px 28px 60px;
  min-height: 78vh;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  text-align:center;
  position: relative;
}
.hero-sub{ margin-left:auto; margin-right:auto; }
.eyebrow{
  text-transform: uppercase;
  letter-spacing: .18em;
  font-size: .74rem;
  color: var(--sage);
  font-weight: 600;
  margin-bottom: 22px;
}
.hero-title{
  font-size: clamp(2.4rem, 6vw, 4.6rem);
  line-height: 1.05;
  margin-bottom: 26px;
}
.hero-title span{ display:block; }
.hero-title .accent{ color: var(--sage); font-style: italic; }
.hero-sub{
  max-width: 620px;
  font-size: 1.08rem;
  color: var(--ink-soft);
  margin-bottom: 36px;
}
.hero-actions{ display:flex; gap:16px; flex-wrap: wrap; justify-content:center; }

.btn{
  display:inline-block;
  padding: 14px 30px;
  border-radius: 999px;
  font-size: .92rem;
  font-weight: 500;
  transition: transform .25s var(--ease), background .25s var(--ease), color .25s var(--ease), box-shadow .25s var(--ease);
  border: 1px solid var(--forest);
}
.btn-primary{ background: var(--forest); color: var(--white); }
.btn-primary:hover{ background: var(--hover-shade); transform: translateY(-2px); box-shadow: 0 10px 24px rgba(var(--line-rgb),.25); }
.btn-ghost{ background: transparent; color: var(--forest-deep); }
.btn-ghost:hover{ background: var(--sage-light); transform: translateY(-2px); }

.hero-tagline{
  display:flex; align-items:center; justify-content:center; gap: 18px;
  margin-top: 60px;
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 2.4vw, 1.6rem);
  letter-spacing: .14em;
  color: var(--forest);
}
.hero-tagline i{ color: var(--sage); font-style:normal; }

/* ---------- generic section ---------- */
.section{
  max-width: var(--max);
  margin: 0 auto;
  padding: 100px 28px;
  border-top: 1px solid rgba(var(--line-rgb),.1);
}
.section-head{ max-width: 720px; margin: 0 auto 48px; text-align:center; }
.kicker{
  text-transform: uppercase;
  letter-spacing: .16em;
  font-size: .74rem;
  color: var(--sage);
  font-weight: 600;
  margin-bottom: 14px;
}
.section-head h2{ font-size: clamp(1.7rem, 3.4vw, 2.4rem); }
.section-note{ color: var(--ink-soft); margin-top: 10px; }

/* ---------- about ---------- */
.about-grid{
  display:grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 60px;
}
.about-copy p{ color: var(--ink-soft); margin-bottom: 18px; }
.about-pillars{ display:flex; flex-direction:column; gap: 26px; }
.about-pillars li{ border-left: 2px solid var(--sage); padding-left: 20px; }
.about-pillars h3{ font-size: 1.05rem; margin-bottom: 6px; }
.about-pillars p{ color: var(--ink-soft); font-size: .95rem; }

@media (max-width: 820px){
  .about-grid{ grid-template-columns: 1fr; }
}

/* ---------- how it works ---------- */
.how-steps{
  display:flex;
  flex-direction:column;
  gap: 14px;
  max-width: 760px;
  margin: 0 auto;
  padding: 0;
  list-style: none;
}
.how-step{
  border: 1px solid rgba(var(--line-rgb),.14);
  border-radius: var(--radius);
  background: var(--white);
  overflow: hidden;
  transition: border-color .2s var(--ease);
}
.how-step-toggle{
  width: 100%;
  display:flex;
  align-items:center;
  gap: 18px;
  padding: 20px 24px;
  background:none;
  border:none;
  text-align:left;
  touch-action: manipulation;
}
.how-step-num{
  flex-shrink:0;
  width: 34px;
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--sage);
}
.how-step-title{
  flex:1;
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: var(--forest-deep);
}
.how-step-icon{
  position:relative;
  flex-shrink:0;
  width: 18px; height:18px;
}
.how-step-icon::before,
.how-step-icon::after{
  content:"";
  position:absolute;
  background: var(--forest);
  transition: transform .25s var(--ease);
}
.how-step-icon::before{ top:50%; left:0; width:100%; height:2px; transform:translateY(-50%); }
.how-step-icon::after{ left:50%; top:0; width:2px; height:100%; transform:translateX(-50%); }
.how-step.is-open .how-step-icon::after{ transform: translateX(-50%) scaleY(0); }

.how-step-desc{
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows .35s var(--ease);
  min-width: 0;
}
.how-step-desc-inner{
  overflow: hidden;
  padding: 0 24px;
  min-width: 0;
}
.how-step-desc-inner p{ margin:0 0 22px; color: var(--ink-soft); font-size: .92rem; }
.how-step.is-open .how-step-desc{ grid-template-rows: 1fr; }

/* only auto-expand on hover for real mouse pointers — on touch
   screens (hover:hover) can misfire and the :hover state gets
   "stuck" after a tap, so this stays JS/tap-only on phones */
@media (hover:hover) and (pointer:fine){
  .how-step:hover{ border-color: rgba(var(--line-rgb),.3); }
  .how-step:hover .how-step-desc{ grid-template-rows: 1fr; }
  .how-step:hover .how-step-icon::after{ transform: translateX(-50%) scaleY(0); }
}

@media (max-width: 560px){
  .how-step-toggle{
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 8px;
    padding: 22px 20px;
  }
  .how-step-num{ width:auto; }
  .how-step-icon{ display:none; }
  .how-step-desc-inner{ padding: 0 20px; text-align:center; }
  .how-step-desc-inner p{ margin: 0 auto 20px; }
}

/* ---------- info blocks (who can submit / what we support / what you get) ---------- */
.info-blocks{
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
  margin-bottom: 48px;
  text-align:left;
}
.info-block{
  background: var(--white);
  border: 1px solid rgba(var(--line-rgb),.12);
  border-radius: var(--radius);
  padding: 28px 26px;
}
.info-block h3{ font-size: 1.05rem; margin-bottom: 16px; }
.info-block ul{ display:flex; flex-direction:column; gap: 9px; }
.info-block li{
  font-size: .9rem;
  color: var(--ink-soft);
  padding-left: 16px;
  position: relative;
}
.info-block li::before{
  content:"—";
  position:absolute; left:0;
  color: var(--sage);
}
.info-note{ font-size: .84rem; color: var(--ink-soft); font-style: italic; margin-top: 16px; }
.info-note.highlight{ color: var(--forest); font-weight:600; font-style:normal; }

/* ---------- department chip selector (join form) ---------- */
.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;
}
.dept-select{ display:flex; flex-wrap:wrap; gap:10px; }
.dept-chip{
  display:inline-block;
  padding: 9px 18px;
  border: 1px solid var(--forest);
  border-radius: 999px;
  font-size: .84rem;
  font-weight: 500;
  color: var(--forest-deep);
  background: transparent;
  cursor:pointer;
  transition: background .2s var(--ease), color .2s var(--ease);
}
.dept-chip:hover{ background: var(--sage-light); }
.sr-only:checked + .dept-chip{ background: var(--forest); color: var(--white); }
.sr-only:focus-visible + .dept-chip{ outline: 2px solid var(--forest); outline-offset: 2px; }

/* ---------- forms ---------- */
.kindorf-form{
  max-width: 640px;
  margin: 0 auto;
  background: var(--white);
  border: 1px solid rgba(var(--line-rgb),.12);
  border-radius: var(--radius);
  padding: 36px;
  display:flex;
  flex-direction:column;
  gap: 20px;
}

/* ---------- owner banner ---------- */
.owner-banner{
  max-width: 720px;
  margin: 0 auto 44px;
  text-align:center;
  background: var(--sage-light);
  border-left: 4px solid var(--forest);
  border-radius: var(--radius);
  padding: 22px 28px;
}
.owner-banner-title{
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--forest-deep);
  margin: 0 0 6px;
}
.owner-banner p{ margin:0; color: var(--ink-soft); font-size: .92rem; }

.form-row{ display:flex; flex-direction:column; gap:8px; }
.form-grid{ display:grid; grid-template-columns: 1fr 1fr; gap:20px; }
@media (max-width:560px){ .form-grid{ grid-template-columns:1fr; } }

label{ font-size: .82rem; color: var(--ink-soft); font-weight: 500; }
input, textarea{
  font-family: inherit;
  font-size: .95rem;
  padding: 12px 14px;
  border: 1px solid rgba(var(--line-rgb),.22);
  border-radius: var(--radius);
  background: var(--cream);
  color: var(--ink);
  resize: vertical;
  transition: border-color .2s var(--ease), background .2s var(--ease);
}
input:focus, textarea:focus{ border-color: var(--forest); background: var(--white); }

.kindorf-form .btn{ align-self:flex-start; border:none; }
.form-status{ font-size: .86rem; color: var(--forest); min-height: 1.2em; margin:0; }

/* ---------- departments ---------- */
.dept-grid{
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 22px;
}
.dept-card{
  padding: 30px 26px;
  background: var(--forest);
  color: var(--white);
  border-radius: var(--radius);
  transition: transform .3s var(--ease), background .3s var(--ease);
}
.dept-card:hover{ transform: translateY(-4px); background: var(--hover-shade); }
.dept-card h3{ color: var(--white); font-size: 1.1rem; margin-bottom: 10px; }
.dept-card p{ color: rgba(255,255,255,.78); font-size: .92rem; margin-bottom: 18px; }
.dept-lead{ font-size: .78rem; color: var(--sage-light); letter-spacing: .03em; }

/* ---------- footer ---------- */
.site-footer{ border-top: 1px solid rgba(var(--line-rgb),.12); padding: 40px 28px; }
.footer-inner{
  max-width: var(--max);
  margin:0 auto;
  display:flex;
  justify-content:space-between;
  align-items:center;
  flex-wrap:wrap;
  gap: 14px;
}
.footer-brand{ display:flex; align-items:center; gap:12px; }
.footer-mark{ width:28px; height:28px; border-radius:50%; object-fit:cover; }
.footer-brand p{ font-family: var(--font-display); color: var(--forest-deep); font-size: .95rem; }
.footer-copy{ font-size: .8rem; color: var(--ink-soft); margin:0; }

.footer-social{ display:flex; align-items:center; gap:14px; }
.social-link{
  display:flex; align-items:center; justify-content:center;
  width:40px; height:40px; border-radius:50%;
  background: var(--white);
  border: 1px solid rgba(var(--line-rgb),.14);
  overflow:hidden;
  transition: transform .3s var(--ease), background .3s var(--ease), border-color .3s var(--ease);
}
.social-link:hover{ transform: translateY(-3px); background: var(--sage-light); border-color: var(--sage); }
.social-link img{ width:22px; height:22px; object-fit:contain; display:block; }

/* ---------- scroll reveal ---------- */
.reveal{
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
}
.reveal.is-visible{ opacity: 1; transform: translateY(0); }

@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior:auto; }
  .reveal{ opacity:1; transform:none; transition:none; }
  #vine-path{ transition:none; }
}
.dept-lead { display: none; }

/* ---------- back to top ---------- */
.back-to-top{
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display:flex;
  align-items:center;
  justify-content:center;
  background: var(--forest);
  color: var(--white);
  border: none;
  box-shadow: 0 10px 24px -8px rgba(var(--line-rgb),.45);
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translateY(14px) scale(.92);
  transition: opacity .35s var(--ease), transform .35s var(--ease), background .3s var(--ease), box-shadow .3s var(--ease);
  z-index: 40;
  touch-action: manipulation;
}
.back-to-top.is-visible{
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}
.back-to-top.is-visible:hover{
  background: var(--hover-shade);
  transform: translateY(-3px) scale(1);
  box-shadow: 0 14px 30px -8px rgba(var(--line-rgb),.55);
}
.back-to-top.is-visible:active{
  transform: translateY(0) scale(.96);
}
@media (max-width: 480px){
  .back-to-top{ right:16px; bottom:16px; width:44px; height:44px; }
}
@media (prefers-reduced-motion: reduce){
  .back-to-top{ transition: opacity .01s; }
}
