/* =========================================================================
   Dietetyk.edu.pl â "fresh & modern clinical"
   Space Grotesk (display) + Inter (body). Cool-clinical green system.
   Signature: BMI measurement gauge. Structural device: ruler tick eyebrows.
   ========================================================================= */

:root{
  --ink:        #0F2A22;   /* deep spruce â text */
  --ink-soft:   #4A5D56;   /* muted body */
  --green-700:  #14684A;   /* brand */
  --green-500:  #1E9E6A;   /* accent / buttons */
  --green-400:  #2EB77E;
  --green-100:  #E4F3EC;   /* tint panels */
  --green-50:   #F1F8F4;
  --paper:      #F5F8F6;   /* cool section bg */
  --white:      #FFFFFF;
  --line:       #E2E8E4;   /* hairlines */
  --line-strong:#CBD8D1;

  /* clinical band signals for the gauge */
  --band-low:   #6FB7E6;
  --band-normal:#2EB77E;
  --band-high:  #F0B429;
  --band-obese: #E8734A;

  --shadow-sm: 0 1px 2px rgba(15,42,34,.05);
  --shadow-md: 0 10px 30px -12px rgba(15,42,34,.18);
  --shadow-lg: 0 30px 60px -24px rgba(15,42,34,.28);

  --radius:    18px;
  --radius-sm: 12px;
  --radius-lg: 28px;

  --font-display:'Space Grotesk', system-ui, sans-serif;
  --font-body:'Inter', system-ui, sans-serif;

  --container: 1200px;
  --gutter: 24px;
}

/* ---------- reset / base ---------- */
*,*::before,*::after{ box-sizing:border-box; }
html{ -webkit-text-size-adjust:100%; scroll-behavior:smooth; }
body{
  margin:0;
  font-family:var(--font-body);
  color:var(--ink);
  background:var(--white);
  font-size:17px;
  line-height:1.6;
  -webkit-font-smoothing:antialiased;
  font-feature-settings:"cv11","ss01";
}
h1,h2,h3,h4{ font-family:var(--font-display); font-weight:600; line-height:1.08; letter-spacing:-.02em; margin:0; color:var(--ink); }
p{ margin:0; }
a{ color:inherit; text-decoration:none; }
img{ max-width:100%; display:block; }
ul{ list-style:none; margin:0; padding:0; }
button{ font-family:inherit; cursor:pointer; }
input{ font-family:inherit; }
em{ font-style:normal; }

/* tabular numbers everywhere data appears */
.hero-stats dd,.gauge-value,.gauge-scale,.about-figure-num,.bmi-form input{
  font-variant-numeric:tabular-nums; font-feature-settings:"tnum";
}

.container{ width:100%; max-width:var(--container); margin-inline:auto; padding-inline:var(--gutter); }

.visually-hidden,.skip-link:not(:focus){
  position:absolute!important; width:1px; height:1px; padding:0; margin:-1px;
  overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; border:0;
}
.skip-link{
  position:absolute; left:16px; top:12px; z-index:100;
  background:var(--ink); color:#fff; padding:10px 16px; border-radius:10px; font-size:14px;
}
:focus-visible{ outline:3px solid var(--green-500); outline-offset:2px; border-radius:4px; }

/* ---------- structural device: ruler tick eyebrow ---------- */
.tick-eyebrow{
  display:inline-flex; align-items:center; gap:10px;
  font-family:var(--font-display); font-size:12.5px; font-weight:600;
  letter-spacing:.16em; text-transform:uppercase;
  color:var(--green-700); margin:0 0 18px;
}
.tick-eyebrow::before{
  content:""; width:34px; height:11px; flex:none;
  background-image:repeating-linear-gradient(90deg,currentColor 0 1.5px,transparent 1.5px 6px);
  opacity:.85;
}
.tick-eyebrow--light{ color:var(--green-100); }

/* ---------- buttons ---------- */
.btn{
  display:inline-flex; align-items:center; justify-content:center; gap:9px;
  font-family:var(--font-display); font-weight:600; font-size:15px;
  padding:12px 20px; border-radius:12px; border:1.5px solid transparent;
  transition:transform .15s ease, background .2s ease, box-shadow .2s ease, border-color .2s ease;
  white-space:nowrap;
}
.btn svg{ transition:transform .2s ease; }
.btn-primary{ background:var(--green-500); color:#fff; box-shadow:0 6px 16px -6px rgba(30,158,106,.6); }
.btn-primary:hover{ background:var(--green-700); transform:translateY(-2px); }
.btn-primary:hover svg{ transform:translateX(3px); }
.btn-ghost{ background:transparent; color:var(--ink); border-color:var(--line-strong); }
.btn-ghost:hover{ border-color:var(--green-500); color:var(--green-700); transform:translateY(-2px); }
.btn-lg{ padding:15px 26px; font-size:16px; border-radius:14px; }
.btn-block{ width:100%; }

/* ---------- header ---------- */
.site-header{
  position:sticky; top:0; z-index:50;
  background:rgba(255,255,255,.82); backdrop-filter:saturate(1.4) blur(14px);
  border-bottom:1px solid var(--line);
}
.header-inner{ display:flex; align-items:center; gap:28px; height:72px; }
.brand{ display:inline-flex; align-items:center; gap:10px; font-family:var(--font-display); font-weight:700; font-size:20px; letter-spacing:-.02em; }
.brand-mark{
  display:grid; place-items:center; width:38px; height:38px; border-radius:11px;
  background:var(--green-100);
}
.brand-mark img{ width:22px; height:22px; }
.brand-tld{ color:var(--green-500); font-weight:500; }
.main-nav{ margin-inline-start:8px; }
.main-nav ul{ display:flex; gap:4px; }
.main-nav a{
  display:block; padding:8px 14px; border-radius:9px; font-size:15px; font-weight:500;
  color:var(--ink-soft); transition:color .15s, background .15s;
}
.main-nav a:hover{ color:var(--ink); background:var(--green-50); }
.main-nav a.active{ color:var(--green-700); }
.header-actions{ display:flex; align-items:center; gap:10px; margin-inline-start:auto; }
.icon-btn{
  display:grid; place-items:center; width:40px; height:40px; border-radius:11px;
  border:1px solid var(--line); background:#fff; color:var(--ink-soft); transition:.15s;
}
.icon-btn:hover{ color:var(--green-700); border-color:var(--line-strong); }
.hamburger{ display:none; flex-direction:column; gap:5px; width:42px; height:42px; border:1px solid var(--line); border-radius:11px; background:#fff; padding:0 10px; }
.hamburger span{ height:2px; background:var(--ink); border-radius:2px; }

/* ---------- hero ---------- */
.hero{ position:relative; overflow:hidden; padding:76px 0 88px;
  background:
    radial-gradient(120% 80% at 88% -10%, var(--green-50) 0%, transparent 55%),
    linear-gradient(180deg,#fff 0%, var(--paper) 100%);
}
.hero-grid{ display:grid; grid-template-columns:1.05fr .95fr; gap:64px; align-items:center; }
.hero h1{ font-size:clamp(2.6rem,5.2vw,4.15rem); font-weight:600; margin:0 0 22px; }
.hero h1 em{ color:var(--green-700); position:relative; }
.hero h1 em::after{
  content:""; position:absolute; left:0; right:0; bottom:.08em; height:.14em;
  background:var(--green-400); opacity:.35; border-radius:3px;
}
.hero .lead{ font-size:1.22rem; color:var(--ink-soft); max-width:36ch; margin-bottom:32px; }
.hero-cta{ display:flex; gap:14px; flex-wrap:wrap; }

.hero-stats{ display:flex; gap:36px; margin:44px 0 0; padding-top:28px; border-top:1px solid var(--line); }
.hero-stats dt{ font-size:13px; color:var(--ink-soft); max-width:14ch; line-height:1.35; }
.hero-stats dd{ font-family:var(--font-display); font-weight:600; font-size:2.3rem; margin:0 0 6px; letter-spacing:-.03em; color:var(--ink); }
.hero-stats .unit{ color:var(--green-500); }

/* hero visual */
.hero-visual{ position:relative; }
.hero-photo{
  position:relative; border-radius:var(--radius-lg); overflow:hidden;
  aspect-ratio:4/5; box-shadow:var(--shadow-lg); border:6px solid #fff;
}
.hero-photo img{ width:100%; height:100%; object-fit:cover; }
.hero-chip{
  position:absolute; left:-26px; bottom:40px; z-index:3;
  display:flex; align-items:center; gap:12px;
  background:#fff; padding:14px 18px; border-radius:16px;
  box-shadow:var(--shadow-md); border:1px solid var(--line);
}
.hero-chip-dot{ width:11px; height:11px; border-radius:50%; background:var(--green-400); box-shadow:0 0 0 4px var(--green-100); flex:none; }
.hero-chip-label{ display:block; font-family:var(--font-display); font-weight:600; font-size:14px; }
.hero-chip-value{ display:block; font-size:12.5px; color:var(--ink-soft); }
.hero-decor{ position:absolute; top:-30px; right:-26px; width:120px; z-index:2; filter:drop-shadow(0 14px 24px rgba(15,42,34,.18)); rotate:8deg; }

/* ---------- benefits ---------- */
.benefits{ padding:0; }
.benefits-grid{
  display:grid; grid-template-columns:repeat(4,1fr);
  background:#fff; border:1px solid var(--line); border-radius:var(--radius-lg);
  box-shadow:var(--shadow-sm); overflow:hidden;
  margin-top:-56px; position:relative; z-index:5;
}
.benefit{ padding:34px 28px; border-inline-start:1px solid var(--line); }
.benefit:first-child{ border-inline-start:0; }
.benefit-icon{ display:grid; place-items:center; width:50px; height:50px; border-radius:14px; background:var(--green-100); margin-bottom:18px; }
.benefit-icon img{ width:26px; height:26px; }
.benefit h3{ font-size:1.12rem; margin-bottom:9px; }
.benefit p{ font-size:14.5px; color:var(--ink-soft); line-height:1.5; }

/* ---------- articles + tool ---------- */
.articles-section{ padding:96px 0; }
.articles-layout{ display:grid; grid-template-columns:1fr 400px; gap:52px; align-items:start; }
.section-head{ display:flex; align-items:flex-end; justify-content:space-between; gap:20px; margin-bottom:34px; }
.section-head h2{ font-size:clamp(1.9rem,3.4vw,2.5rem); }
.section-head .tick-eyebrow{ margin-bottom:12px; }
.link-more{ font-family:var(--font-display); font-weight:600; font-size:15px; color:var(--green-700); white-space:nowrap; }
.link-more span{ transition:transform .2s; display:inline-block; }
.link-more:hover span{ transform:translateX(4px); }

.articles-grid{ display:flex; flex-direction:column; gap:22px; }
.article-card{
  display:grid; grid-template-columns:200px 1fr; gap:24px; align-items:center;
  background:#fff; border:1px solid var(--line); border-radius:var(--radius);
  padding:16px; transition:transform .2s ease, box-shadow .2s ease, border-color .2s;
}
.article-card:hover{ transform:translateY(-3px); box-shadow:var(--shadow-md); border-color:var(--line-strong); }
.article-media{ position:relative; display:block; border-radius:var(--radius-sm); overflow:hidden; aspect-ratio:4/3; }
.article-media img{ width:100%; height:100%; object-fit:cover; transition:transform .4s ease; }
.article-card:hover .article-media img{ transform:scale(1.05); }
.article-tag{
  position:absolute; top:10px; left:10px;
  background:rgba(255,255,255,.94); color:var(--green-700);
  font-family:var(--font-display); font-weight:600; font-size:11.5px; letter-spacing:.04em;
  padding:4px 10px; border-radius:8px; text-transform:uppercase;
}
.article-body h3{ font-size:1.22rem; line-height:1.2; margin-bottom:9px; }
.article-body h3 a{ transition:color .15s; }
.article-body h3 a:hover{ color:var(--green-700); }
.article-excerpt{ font-size:15px; color:var(--ink-soft); margin-bottom:13px; }
.article-meta{ display:flex; align-items:center; gap:9px; font-size:13px; color:var(--ink-soft); font-family:var(--font-display); }
.article-meta .dot{ opacity:.5; }

/* ---------- SIGNATURE: BMI gauge ---------- */
.bmi-tool{
  position:sticky; top:96px;
  background:var(--ink);
  color:#fff; border-radius:var(--radius-lg); padding:32px 30px 30px;
  box-shadow:var(--shadow-lg);
  background-image:
    radial-gradient(90% 60% at 100% 0%, rgba(46,183,126,.28) 0%, transparent 60%),
    linear-gradient(180deg,#143b2e 0%, var(--ink) 60%);
}
.bmi-tool .tick-eyebrow{ color:var(--green-100); }
.bmi-tool .tick-eyebrow::before{ opacity:.7; }
.bmi-tool h3{ color:#fff; font-size:1.75rem; margin-bottom:8px; }
.bmi-sub{ font-size:14.5px; color:rgba(255,255,255,.72); margin-bottom:24px; line-height:1.5; }

.bmi-form .field-row{ display:grid; grid-template-columns:1fr 1fr; gap:14px; margin-bottom:16px; }
.field{ display:flex; flex-direction:column; gap:7px; }
.field span{ font-family:var(--font-display); font-size:12.5px; font-weight:500; letter-spacing:.04em; color:rgba(255,255,255,.7); text-transform:uppercase; display:flex; justify-content:space-between; }
.field span em{ color:var(--green-400); }
.field input{
  background:rgba(255,255,255,.07); border:1.5px solid rgba(255,255,255,.16);
  color:#fff; border-radius:11px; padding:13px 15px; font-size:18px; font-weight:600;
  transition:border-color .15s, background .15s;
}
.field input::placeholder{ color:rgba(255,255,255,.32); font-weight:400; }
.field input:focus{ outline:none; border-color:var(--green-400); background:rgba(255,255,255,.12); }
.bmi-tool .btn-primary{ background:var(--green-500); box-shadow:none; }
.bmi-tool .btn-primary:hover{ background:var(--green-400); }

/* gauge */
.gauge{ margin-top:26px; padding-top:24px; border-top:1px solid rgba(255,255,255,.12); }
.gauge-readout{ display:flex; align-items:baseline; gap:12px; margin-bottom:20px; min-height:52px; }
.gauge-value{ font-family:var(--font-display); font-weight:700; font-size:3rem; line-height:1; letter-spacing:-.03em; color:#fff; transition:color .3s; }
.gauge-tag{ font-family:var(--font-display); font-weight:600; font-size:14px; padding:5px 12px; border-radius:20px; background:rgba(255,255,255,.1); color:rgba(255,255,255,.8); transition:.3s; }
.gauge[data-state="idle"] .gauge-tag{ font-weight:400; background:transparent; padding-inline:0; color:rgba(255,255,255,.55); }

.gauge-track{
  position:relative; height:16px; border-radius:10px; overflow:hidden;
  display:grid; grid-template-columns:15% 26% 20% 39%;   /* 16â18.5 / 18.5â25 / 25â30 / 30â40 */
}
.gauge-band{ height:100%; opacity:.9; }
.band-low{ background:var(--band-low); }
.band-normal{ background:var(--band-normal); }
.band-high{ background:var(--band-high); }
.band-obese{ background:var(--band-obese); }
.gauge-needle{
  position:absolute; top:-4px; bottom:-4px; left:0; width:4px; border-radius:3px;
  background:#fff; box-shadow:0 0 0 2px rgba(15,42,34,.5), 0 4px 10px rgba(0,0,0,.4);
  transform:translateX(-2px) scaleY(0); transform-origin:center;
  transition:left .7s cubic-bezier(.34,1.2,.5,1), transform .3s ease;
}
.gauge[data-state="done"] .gauge-needle{ transform:translateX(-2px) scaleY(1); }
.gauge-scale{ display:grid; grid-template-columns:15% 26% 20% 39%; margin-top:9px; font-family:var(--font-display); font-size:11px; color:rgba(255,255,255,.5); }
.gauge-scale span{ transform:translateX(-50%); white-space:nowrap; }
.gauge-scale span:first-child{ transform:none; }
.gauge-note{ font-size:12px; color:rgba(255,255,255,.5); margin-top:18px; line-height:1.5; }

/* ---------- about ---------- */
.about{ padding:96px 0; background:var(--paper); }
.about-grid{ display:grid; grid-template-columns:.92fr 1.08fr; gap:64px; align-items:center; }
.about-visual{ position:relative; }
.about-photo{ border-radius:var(--radius-lg); overflow:hidden; aspect-ratio:5/6; box-shadow:var(--shadow-lg); border:6px solid #fff; }
.about-photo img{ width:100%; height:100%; object-fit:cover; }
.about-figure{
  position:absolute; right:-22px; bottom:34px;
  background:var(--green-700); color:#fff; padding:18px 22px; border-radius:16px; box-shadow:var(--shadow-md);
}
.about-figure-num{ display:block; font-family:var(--font-display); font-weight:700; font-size:2rem; line-height:1; letter-spacing:-.03em; }
.about-figure-label{ display:block; font-size:12.5px; color:var(--green-100); margin-top:6px; max-width:16ch; }
.about-text h2{ font-size:clamp(2rem,3.6vw,2.7rem); margin-bottom:20px; max-width:16ch; }
.about-text .lead{ font-size:1.15rem; color:var(--ink-soft); margin-bottom:34px; max-width:46ch; }
.about-features{ display:grid; grid-template-columns:1fr 1fr; gap:26px 32px; margin-bottom:38px; }
.about-features li{ display:flex; gap:15px; }
.feature-icon{ display:grid; place-items:center; width:44px; height:44px; flex:none; border-radius:12px; background:var(--green-100); }
.feature-icon img{ width:22px; height:22px; }
.about-features h4{ font-size:1.02rem; margin-bottom:5px; }
.about-features p{ font-size:14px; color:var(--ink-soft); line-height:1.45; }

/* ---------- newsletter ---------- */
.newsletter{ padding:0 0 96px; }
.newsletter-panel{
  position:relative; overflow:hidden;
  display:grid; grid-template-columns:1.1fr .9fr; gap:40px; align-items:center;
  background:linear-gradient(120deg,var(--green-700) 0%, #0f5138 100%);
  color:#fff; border-radius:var(--radius-lg); padding:52px 56px;
  box-shadow:var(--shadow-lg);
}
.newsletter-panel::after{
  content:""; position:absolute; right:-60px; top:-60px; width:280px; height:280px; border-radius:50%;
  background:radial-gradient(circle, rgba(46,183,126,.5) 0%, transparent 70%);
}
.newsletter-text{ position:relative; z-index:2; }
.newsletter-text h2{ color:#fff; font-size:clamp(1.7rem,3vw,2.3rem); margin-bottom:12px; max-width:20ch; }
.newsletter-text p{ color:rgba(255,255,255,.82); max-width:44ch; font-size:15.5px; }
.newsletter-form{ position:relative; z-index:2; display:flex; gap:12px; flex-wrap:wrap; }
.newsletter-form input{
  flex:1 1 200px; min-width:0; border:1.5px solid rgba(255,255,255,.25); background:rgba(255,255,255,.12);
  color:#fff; border-radius:12px; padding:15px 18px; font-size:15px;
}
.newsletter-form input::placeholder{ color:rgba(255,255,255,.6); }
.newsletter-form input:focus{ outline:none; border-color:#fff; background:rgba(255,255,255,.2); }
.newsletter-form .btn-primary{ background:#fff; color:var(--green-700); box-shadow:none; }
.newsletter-form .btn-primary:hover{ background:var(--green-100); transform:translateY(-2px); }

/* ---------- footer ---------- */
.site-footer{ background:var(--ink); color:rgba(255,255,255,.72); padding:66px 0 30px; }
.footer-grid{ display:grid; grid-template-columns:1.6fr 1fr 1fr 1fr 1.1fr; gap:40px; padding-bottom:44px; border-bottom:1px solid rgba(255,255,255,.1); }
.brand--footer{ color:#fff; }
.brand--footer .brand-mark{ background:rgba(255,255,255,.1); }
.footer-brand p{ margin:16px 0 20px; font-size:14.5px; max-width:34ch; line-height:1.6; }
.socials{ display:flex; gap:10px; }
.socials a{ display:grid; place-items:center; width:40px; height:40px; border-radius:11px; background:rgba(255,255,255,.08); transition:background .15s; }
.socials a:hover{ background:var(--green-500); }
.socials img{ width:18px; height:18px; }
.footer-col h4{ color:#fff; font-size:14px; letter-spacing:.04em; text-transform:uppercase; margin-bottom:18px; }
.footer-col ul{ display:flex; flex-direction:column; gap:11px; }
.footer-col a{ font-size:14.5px; color:rgba(255,255,255,.7); transition:color .15s; }
.footer-col a:hover{ color:#fff; }
.footer-bottom{ display:flex; justify-content:space-between; gap:16px; flex-wrap:wrap; padding-top:22px; font-size:13px; color:rgba(255,255,255,.5); }

/* ---------- reveal on scroll ---------- */
[data-reveal]{ opacity:0; transform:translateY(22px); transition:opacity .7s ease, transform .7s ease; }
[data-reveal].is-in{ opacity:1; transform:none; }

/* ---------- responsive ---------- */
@media (max-width:1080px){
  .articles-layout{ grid-template-columns:1fr; }
  .bmi-tool{ position:static; max-width:520px; }
  .hero-decor{ display:none; }
}
@media (max-width:900px){
  .main-nav{ display:none; }
  .main-nav.is-open{
    display:block; position:absolute; left:0; right:0; top:100%;
    background:#fff; border-bottom:1px solid var(--line); box-shadow:var(--shadow-md);
    padding:12px var(--gutter) 18px; margin:0;
  }
  .main-nav.is-open ul{ flex-direction:column; gap:2px; }
  .main-nav.is-open a{ padding:12px 14px; font-size:16px; }
  .hamburger{ display:flex; }
  .hero-grid{ grid-template-columns:1fr; gap:40px; }
  .hero-photo{ aspect-ratio:16/12; max-width:520px; }
  .benefits-grid{ grid-template-columns:1fr 1fr; margin-top:-40px; }
  .benefit:nth-child(2n+1){ border-inline-start:0; }
  .benefit:nth-child(n+3){ border-top:1px solid var(--line); }
  .about-grid{ grid-template-columns:1fr; gap:44px; }
  .about-visual{ max-width:460px; }
  .newsletter-panel{ grid-template-columns:1fr; gap:26px; padding:40px 34px; }
  .footer-grid{ grid-template-columns:1fr 1fr; gap:32px; }
  .footer-brand{ grid-column:1 / -1; }
}
@media (max-width:560px){
  body{ font-size:16px; }
  .header-actions .btn-primary{ display:none; }
  .hero{ padding:52px 0 64px; }
  .hero-stats{ gap:22px; }
  .hero-stats dd{ font-size:1.8rem; }
  .benefits-grid{ grid-template-columns:1fr; margin-top:-32px; }
  .benefit{ border-inline-start:0!important; border-top:1px solid var(--line); }
  .benefit:first-child{ border-top:0; }
  .article-card{ grid-template-columns:1fr; }
  .article-media{ aspect-ratio:16/9; }
  .articles-section,.about{ padding:64px 0; }
  .section-head{ flex-direction:column; align-items:flex-start; }
  .about-features{ grid-template-columns:1fr; }
  .footer-grid{ grid-template-columns:1fr; }
  .footer-bottom{ flex-direction:column; gap:6px; }
}
@media (prefers-reduced-motion:reduce){
  *,*::before,*::after{ animation-duration:.001ms!important; transition-duration:.001ms!important; scroll-behavior:auto!important; }
  [data-reveal]{ opacity:1; transform:none; }
}
