/* ===================== FERMIS — tema ===================== */
:root{
  --green:        #7cb342;
  --green-bright: #8bc34a;
  --green-dark:   #5f9e35;
  --green-deep:   #33691e;
  --ink:          #0e1710;
  --panel:        #14201a;
  --panel-2:      #1b2a20;
  --card:         rgba(18, 28, 21, .92);
  --line:         rgba(255,255,255,.08);
  --text:         #eef3ea;
  --muted:        #9db09a;
  --cream:        #ece5d4;
  --radius:       14px;
  --shadow:       0 20px 60px rgba(0,0,0,.45);
}

*{ box-sizing:border-box; }
html,body{ margin:0; padding:0; }
body{
  font-family:"Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  color:var(--text);
  background:var(--ink);
  line-height:1.5;
  -webkit-font-smoothing:antialiased;
}
a{ color:inherit; text-decoration:none; }
img{ max-width:100%; display:block; }

/* ---------- Mygtukai ---------- */
.btn{
  display:inline-flex; align-items:center; justify-content:center; gap:.5rem;
  font-weight:700; font-size:.9rem; letter-spacing:.03em;
  padding:.8rem 1.3rem; border-radius:10px; border:1px solid transparent;
  cursor:pointer; transition:transform .12s ease, filter .12s ease, background .2s;
  text-transform:uppercase;
}
.btn:active{ transform:translateY(1px); }
.btn--primary{ background:linear-gradient(180deg,var(--green-bright),var(--green-dark)); color:#0d1a08; box-shadow:0 8px 20px rgba(124,179,66,.35); }
.btn--primary:hover{ filter:brightness(1.06); }
.btn--block{ width:100%; }
.btn--nav{ background:var(--green); color:#0d1a08; padding:.6rem 1.15rem; }
.btn--nav:hover{ filter:brightness(1.07); }
.btn--ghost{ background:transparent; border:1px solid rgba(255,255,255,.4); color:#fff; }
.btn--ghost:hover{ border-color:var(--green-bright); color:var(--green-bright); }
.btn--google{ background:#fff; color:#3c4043; text-transform:none; font-weight:600; border:1px solid #dadce0; }
.btn--google:hover{ background:#f7f8f8; }
.g-ico{ font-weight:800; color:#4285f4; }

/* ---------- Navigacija ---------- */
.nav{ position:absolute; top:0; left:0; right:0; z-index:20; }
.nav__inner{
  max-width:1180px; margin:0 auto; padding:1.1rem 1.5rem;
  display:flex; align-items:center; gap:1.5rem;
}
.brand{ display:flex; align-items:center; gap:.6rem; }
.brand__logo{ display:grid; place-items:center; }
.brand__text{ display:flex; flex-direction:column; line-height:1; }
.brand__text strong{ font-size:1.5rem; letter-spacing:.06em; color:#fff; }
.brand__text small{ font-size:.58rem; letter-spacing:.22em; color:var(--green-bright); margin-top:3px; }
.nav__links{ margin-left:auto; display:flex; gap:1.6rem; font-size:.8rem; font-weight:600; letter-spacing:.08em; }
.nav__links a{ color:#e8eee4; opacity:.9; }
.nav__links a:hover{ color:var(--green-bright); opacity:1; }

/* Hamburger (tik mobiliajame) */
.nav__burger{ display:none; background:none; border:0; cursor:pointer; padding:.4rem; flex-direction:column; gap:5px; }
.nav__burger span{ display:block; width:24px; height:2px; border-radius:2px; background:#eef3ea; transition:transform .2s, opacity .2s; }
.nav__burger.is-open span:nth-child(1){ transform:translateY(7px) rotate(45deg); }
.nav__burger.is-open span:nth-child(2){ opacity:0; }
.nav__burger.is-open span:nth-child(3){ transform:translateY(-7px) rotate(-45deg); }

/* Išskleidžiamas meniu */
.nav__drawer{ display:none; flex-direction:column; gap:.2rem; padding:.6rem 1.2rem 1rem; background:rgba(10,16,10,.96); border-bottom:1px solid var(--line); }
.nav__drawer a{ color:#e8eee4; font-weight:600; letter-spacing:.06em; padding:.7rem .2rem; border-bottom:1px solid rgba(255,255,255,.05); }
.nav__drawer .nav__drawer-cta{ margin-top:.6rem; background:var(--green); color:#0d1a08; text-align:center; border-radius:9px; border-bottom:0; }

/* Hero karuselės taškeliai (tik mobiliajame) */
.hero__dots{ display:none; gap:.45rem; margin-top:1rem; }
.hero__dots span{ width:7px; height:7px; border-radius:50%; background:rgba(255,255,255,.4); }
.hero__dots span.is-active{ width:20px; border-radius:4px; background:var(--green-bright); }

/* Apatinė mobili navigacija */
.mobilebar{ display:none; }

/* ---------- Hero ---------- */
.hero{ position:relative; min-height:640px; display:flex; align-items:center; overflow:hidden; }
.hero__bg{
  position:absolute; inset:0;
  background:
    linear-gradient(180deg, #8aa15f 0%, #6d824c 30%, #4a5d38 55%, #2c3a24 80%, #16201a 100%)
    center/cover no-repeat,
    #2c3a24;
  background-image:url("/assets/fermis-hero.png");
  background-size:cover;
  background-position:center 30%;
}
.hero__bg::after{
  content:""; position:absolute; inset:0;
  background:linear-gradient(0deg, rgba(10,16,10,.72), rgba(10,16,10,.10) 45%, rgba(10,16,10,.45));
}
.hero__overlay{
  position:absolute; inset:0;
  background:linear-gradient(90deg, rgba(10,16,10,.82) 0%, rgba(10,16,10,.55) 40%, rgba(10,16,10,.25) 100%);
}
.hero__inner{
  position:relative; z-index:5; width:100%;
  max-width:1180px; margin:0 auto; padding:7rem 1.5rem 3.5rem;
  display:grid; grid-template-columns:1fr 420px; gap:2.5rem; align-items:center;
}
.hero__title{
  font-size:clamp(2.4rem, 4.6vw, 3.6rem); font-weight:900; line-height:1.02;
  margin:0 0 1.2rem; letter-spacing:.01em; text-shadow:0 3px 18px rgba(0,0,0,.5);
}
.hero__title .accent{ color:var(--green-bright); }
.hero__lead{ max-width:430px; color:#dfe7d8; font-size:1.02rem; margin:0 0 1.8rem; text-shadow:0 2px 10px rgba(0,0,0,.5); }

/* ---------- Auth kortelė ---------- */
.auth{
  background:var(--card); backdrop-filter:blur(6px);
  border:1px solid var(--line); border-radius:16px;
  padding:1.5rem; box-shadow:var(--shadow);
}
.auth__tabs{ position:relative; display:grid; grid-template-columns:1fr 1fr; margin-bottom:1.3rem; border-bottom:1px solid var(--line); }
.auth__tab{
  background:none; border:0; color:var(--muted); cursor:pointer;
  font:inherit; font-weight:700; letter-spacing:.05em; text-transform:uppercase;
  padding:.7rem 0 .9rem; transition:color .2s;
}
.auth__tab:hover{ color:#d7e2cf; }
.auth__tab.is-active{ color:#fff; }
.auth__tab-underline{
  position:absolute; bottom:-1px; left:0; width:50%; height:2px;
  background:var(--green-bright); transition:transform .25s ease;
}
body.tab-register .auth__tab-underline{ transform:translateX(100%); }

/* Rodom tik aktyvią formą */
.auth__form{ display:none; flex-direction:column; gap:.85rem; }
body.tab-login    .auth__form--login{ display:flex; }
body.tab-register .auth__form--register{ display:flex; }
body.tab-login    .auth__tab[data-tab="login"],
body.tab-register .auth__tab[data-tab="register"]{ color:#fff; }

/* ---------- Laukai ---------- */
.field{
  position:relative; display:flex; align-items:center;
  background:rgba(255,255,255,.04); border:1px solid var(--line);
  border-radius:10px; padding:0 .85rem; transition:border-color .18s, background .18s;
}
.field:focus-within{ border-color:var(--green-bright); background:rgba(124,179,66,.07); }
.field__icon{ opacity:.65; font-size:1rem; margin-right:.55rem; }
.field input{
  flex:1; background:none; border:0; outline:0; color:var(--text);
  font:inherit; padding:.85rem 0;
}
.field input::placeholder{ color:#8b9a87; }
.field__reveal{ background:none; border:0; cursor:pointer; opacity:.55; font-size:1rem; padding:.3rem; }
.field__reveal:hover{ opacity:.9; }

.auth__row{ display:flex; align-items:center; justify-content:space-between; font-size:.82rem; margin:.1rem 0 .3rem; }
.check{ display:flex; align-items:center; gap:.45rem; color:var(--muted); cursor:pointer; }
.check input{ accent-color:var(--green); }
.link{ color:var(--green-bright); }
.link:hover{ text-decoration:underline; }

.divider{ position:relative; text-align:center; margin:.4rem 0; color:var(--muted); font-size:.8rem; }
.divider::before,.divider::after{ content:""; position:absolute; top:50%; width:42%; height:1px; background:var(--line); }
.divider::before{ left:0; } .divider::after{ right:0; }

/* ---------- Alert ---------- */
.alert{ border-radius:10px; padding:.7rem .9rem; font-size:.86rem; margin-bottom:1rem; }
.alert--error{ background:rgba(220,60,60,.14); border:1px solid rgba(220,60,60,.4); color:#ffb3b3; }
.alert--ok{ background:rgba(124,179,66,.16); border:1px solid rgba(124,179,66,.45); color:#cfeaa5; }

/* ---------- APIE FERMIS ---------- */
.about{ background:var(--cream); color:#3a3527; padding:3.2rem 1.5rem 3.6rem; text-align:center; }
.about__title{ font-size:1.4rem; letter-spacing:.14em; color:#4a5d2e; margin:0 0 1rem; }
.about__title .leaf{ color:var(--green); }
.about__lead{ max-width:720px; margin:0 auto 2.6rem; color:#6a6552; }
.features{ max-width:1080px; margin:0 auto; display:grid; grid-template-columns:repeat(5,1fr); gap:1.4rem; }
.feature{ padding:1rem .6rem; }
.feature__ico{
  width:74px; height:74px; margin:0 auto 1rem; border-radius:16px;
  display:grid; place-items:center; font-size:2rem;
  background:#fff; border:1px solid rgba(0,0,0,.06);
  box-shadow:0 8px 18px rgba(0,0,0,.08);
}
.feature h3{ margin:.2rem 0 .5rem; font-size:.95rem; letter-spacing:.06em; color:#4a5d2e; }
.feature p{ margin:0; font-size:.82rem; color:#7b755f; }

/* ---------- Footer ---------- */
.foot{ background:#0c130d; border-top:1px solid var(--line); }
.foot__inner{
  max-width:1180px; margin:0 auto; padding:1.4rem 1.5rem;
  display:flex; align-items:center; gap:1.2rem; flex-wrap:wrap;
}
.brand--sm strong{ font-size:1.05rem; letter-spacing:.05em; }
.foot__copy{ color:var(--muted); font-size:.8rem; }
.foot__links{ margin-left:auto; display:flex; gap:1.4rem; font-size:.8rem; }
.foot__links a{ color:var(--muted); }
.foot__links a:hover{ color:var(--green-bright); }

/* ---------- Atskiri auth puslapiai (forgot / reset) ---------- */
.auth-page{
  min-height:100vh;
  background:
    linear-gradient(180deg, rgba(10,16,10,.72), rgba(10,16,10,.55)),
    url("/assets/fermis-hero.png") center/cover no-repeat, #16201a;
}
.auth-shell{ min-height:100vh; display:grid; place-items:center; padding:2rem 1.2rem; }
.auth--solo{ width:100%; max-width:420px; }
.brand--center{ justify-content:center; margin-bottom:1.1rem; }
.auth__heading{ text-align:center; margin:.2rem 0 .3rem; font-size:1.3rem; }
.auth__sub{ text-align:center; color:var(--muted); font-size:.9rem; margin:0 0 1.3rem; }
.auth__foot{ text-align:center; margin:1rem 0 0; font-size:.85rem; }

/* ---------- Responsyvumas ---------- */

/* Planšetės / siauresni ekranai */
@media (max-width:900px){
  .hero__inner{ grid-template-columns:1fr; padding-top:6rem; justify-items:center; }
  .hero__copy{ text-align:center; }
  .hero__lead{ margin-left:auto; margin-right:auto; }
  .auth{ width:100%; max-width:440px; }
  .nav__links{ display:none; }
  .features{ grid-template-columns:repeat(2,1fr); }
}

/* ================= TELEFONO ("app") išdėstymas ================= */
@media (max-width:760px){
  body{ padding-bottom:66px; }  /* vietos apatinei juostai */

  /* --- Viršutinė juosta: hamburger kairėje, logo centre --- */
  .nav--landing{ position:fixed; background:rgba(10,16,10,.92); backdrop-filter:blur(8px); border-bottom:1px solid var(--line); }
  .nav--landing .nav__inner{ position:relative; justify-content:center; padding:.7rem 1rem; gap:0; }
  .nav--landing .nav__burger{ display:flex; position:absolute; left:.8rem; top:50%; transform:translateY(-50%); }
  .brand{ gap:.5rem; }
  .brand__logo svg{ width:26px; height:26px; }
  .brand__text small{ display:none; }
  .brand__text strong{ font-size:1.3rem; }
  .nav--landing .btn--nav{ display:none; }
  .nav__drawer:not([hidden]){ display:flex; }

  /* --- Hero: nuotrauka su antrašte apačioje --- */
  .hero{ min-height:auto; }
  .hero__inner{ display:block; padding:0; max-width:none; justify-items:stretch; }
  .hero__bg{ background-position:center top; }
  .hero__overlay{ background:linear-gradient(0deg, rgba(10,16,10,.55), rgba(10,16,10,0) 55%); }
  .hero__copy{
    position:relative; z-index:5; text-align:left;
    min-height:48vh; display:flex; flex-direction:column; justify-content:flex-end;
    padding:5rem 1.3rem 1.1rem;
  }
  .hero__title{ font-size:clamp(1.6rem,7.2vw,2.15rem); margin-bottom:.35rem; line-height:1.05; }
  .hero__lead{ display:none; }
  .hero__copy .btn--ghost{ display:none; }
  .hero__dots{ display:flex; justify-content:center; margin:.9rem auto 0; }

  /* --- Auth kortelė: per visą plotį, užeina ant nuotraukos --- */
  .auth{
    width:100%; max-width:none; order:0; margin:-18px 0 0;
    border:0; border-radius:22px 22px 0 0; background:#0f150e;
    box-shadow:0 -12px 34px rgba(0,0,0,.5); padding:1.4rem 1.15rem 1.6rem;
    position:relative; z-index:6;
  }

  /* --- APIE sekcija kompaktiškiau --- */
  .about{ padding:2.6rem 1.2rem 2.8rem; }
  .features{ grid-template-columns:repeat(2,1fr); gap:1rem; }

  /* --- Apatinė fiksuota navigacija --- */
  .mobilebar{
    display:flex; position:fixed; bottom:0; left:0; right:0; z-index:40;
    background:rgba(9,14,9,.97); backdrop-filter:blur(10px);
    border-top:1px solid var(--line); justify-content:space-around;
    padding:.5rem .4rem calc(.5rem + env(safe-area-inset-bottom));
  }
  .mobilebar a{
    display:flex; flex-direction:column; align-items:center; gap:3px;
    color:var(--muted); font-size:.6rem; font-weight:700; letter-spacing:.03em;
    padding:.25rem .6rem;
  }
  .mobilebar a:first-child{ color:var(--green-bright); }
  .mobilebar a:hover{ color:var(--green-bright); }
}

@media (max-width:440px){
  .features{ grid-template-columns:1fr; }
  .foot__inner{ flex-direction:column; text-align:center; }
  .foot__links{ margin:0; }
}

/* Auth puslapiai (forgot/reset) — vietos apatinei juostai nereikia */
@media (max-width:760px){
  body.auth-page{ padding-bottom:0; }
}
