/* AGROECOPONICS website – colours and type from the visual identity guidelines v1.0.1 */

/* Noto Sans is self-hosted: copy NotoSans-Regular.ttf and NotoSans-Bold.ttf into /fonts.
   Loading it from Google's servers would send visitors' IP addresses to Google. */
@font-face { font-family: "Noto Sans"; font-weight: 400; font-style: normal; font-display: swap;
  src: url("../fonts/NotoSans-Regular.ttf") format("truetype"); }
@font-face { font-family: "Noto Sans"; font-weight: 700; font-style: normal; font-display: swap;
  src: url("../fonts/NotoSans-Bold.ttf") format("truetype"); }

:root {
  --deep-blue: #1B5E86;   /* headings, buttons, links */
  --ponics-blue: #288CC3; /* rules, large text only */
  --eco-green: #88B841;   /* icons, never for text */
  --deep-green: #4E7424;  /* sub-headings */
  --agro-red: #BE312E;    /* small accents only */
  --blue-tint: #DDEEF8;
  --green-tint: #EBF4DD;
  --charcoal: #263238;    /* body text */
  --light-grey: #F4F6F7;
  --radius: 8px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: "Noto Sans", Arial, Helvetica, sans-serif; font-size: 1.0625rem;
  line-height: 1.55; color: var(--charcoal); background: #fff; }
img { max-width: 100%; height: auto; }
a { color: var(--deep-blue); }
a:hover { text-decoration: none; }
:focus-visible { outline: 3px solid var(--agro-red); outline-offset: 2px; }

h1, h2, h3 { line-height: 1.2; margin: 0 0 .6em; }
h1 { font-size: clamp(1.8rem, 4vw, 2.4rem); color: var(--deep-blue); }
h2 { font-size: 1.6rem; color: var(--deep-blue); }
h3, .h3 { font-size: 1.15rem; color: var(--deep-green); }
p { margin: 0 0 1em; }

.container { width: min(1120px, 100% - 2.5rem); margin-inline: auto; }
.narrow > * { max-width: 760px; }
.section { padding: 3rem 0; }
.band { background: var(--green-tint); }
.spaced { margin-top: 2.5rem; }

.skip-link { position: absolute; left: -999px; top: 0; background: var(--deep-blue); color: #fff; padding: .6rem 1rem; z-index: 10; }
.skip-link:focus { left: 1rem; }

/* header */
.site-header { border-bottom: 3px solid var(--ponics-blue); background: #fff; }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; padding: .7rem 0; flex-wrap: wrap; }
.brand img { display: block; width: 96px; height: auto; }
.header-prima img { display: block; width: 130px; height: auto; }
.main-nav ul { list-style: none; display: flex; flex-wrap: wrap; gap: .4rem 1.6rem; margin: 0; padding: 0; }
.main-nav a { font-weight: 700; text-decoration: none; color: var(--charcoal); padding: .3rem 0; border-bottom: 3px solid transparent; }
.main-nav a:hover, .main-nav a[aria-current="page"] { color: var(--deep-blue); border-bottom-color: var(--eco-green); }

/* home */
.hero { background: var(--blue-tint); padding: 3rem 0; }
.hero-inner { display: grid; grid-template-columns: 1fr auto; gap: 2rem; align-items: center; }
.lead { font-size: 1.2rem; max-width: 40rem; }
.hero-picture { width: 280px; height: 280px; border-radius: 50%; background: #fff; display: grid; place-items: center; }
.buttons { display: flex; gap: .8rem; flex-wrap: wrap; }
/* home: hero carousel. The dark overlay keeps white text above 4.5:1 contrast on any photo. */
.hero-carousel { position: relative; overflow: hidden; background: #0e2e42; color: #fff; padding: 5rem 0; }
.hero-slides, .hero-slides img { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-slides img { object-fit: cover; opacity: 0; transition: opacity 1.2s ease-in-out; }
.hero-slides img.is-active { opacity: 1; }
.hero-carousel::before { content: ""; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(90deg, rgba(14,46,66,.88) 0%, rgba(14,46,66,.80) 60%, rgba(14,46,66,.50) 100%); }
.hero-carousel .hero-inner { position: relative; z-index: 2; }
.hero-carousel h1, .hero-carousel .lead { color: #fff; text-shadow: 0 1px 3px rgba(0,0,0,.35); }
.hero-carousel .btn { background: #fff; color: var(--deep-blue); border-color: #fff; }
.hero-carousel .btn:hover { background: transparent; color: #fff; }
.hero-carousel .btn-outline { background: transparent; color: #fff; border-color: #fff; }
.hero-carousel .btn-outline:hover { background: #fff; color: var(--deep-blue); }
.hero-carousel :focus-visible { outline-color: #fff; }
.hero-carousel .hero-inner { grid-template-columns: minmax(0, 46rem); }
.hero-carousel .hero-picture { display: none; }
.hero-pause { position: absolute; right: 1rem; bottom: 1rem; z-index: 3; font: inherit; font-size: .85rem; font-weight: 700;
  color: #fff; background: rgba(14,46,66,.85); border: 1.5px solid #fff; border-radius: 1rem; padding: .25rem .9rem; cursor: pointer; }
.hero-pause:hover { background: #fff; color: var(--deep-blue); }
@media (max-width: 860px) {
  .hero-carousel { padding: 3.5rem 0 4.5rem; }
  .hero-carousel::before { background: rgba(14,46,66,.84); }
}
@media (prefers-reduced-motion: reduce) { .hero-slides img { transition: none; } }
.stats { background: var(--deep-blue); color: #fff; }
.stats-inner { display: grid; grid-template-columns: repeat(5, 1fr); text-align: center; }
.stats p { margin: 0; padding: 1.2rem .5rem; }
.stats strong { display: block; font-size: 2rem; line-height: 1.1; }
.steps { list-style: none; counter-reset: step; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; padding: 0; margin: 0; }
.steps li { counter-increment: step; background: #fff; border-radius: var(--radius); padding: 1.2rem; }
.steps h3::before { content: counter(step); display: inline-grid; place-items: center; width: 1.8rem; height: 1.8rem; margin-right: .5rem;
  border-radius: 50%; background: var(--deep-blue); color: #fff; font-size: .95rem; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
.section-head a { font-weight: 700; }
.newsletter { display: flex; justify-content: space-between; align-items: center; gap: 2rem; flex-wrap: wrap;
  background: var(--light-grey); border-radius: var(--radius); padding: 1.5rem; }

/* components */
.grid { display: grid; gap: 1.2rem; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.card { border: 1px solid #cfe3f1; border-radius: var(--radius); padding: 1.2rem; background: #fff; }
.card-grey { background: var(--light-grey); border-color: var(--light-grey); }
.card-green { background: var(--green-tint); border-color: var(--green-tint); }
.icon { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; margin-bottom: .7rem; }
img.icon { padding: 12px; }
.icon-water, .icon-sensors { background: var(--ponics-blue); }
.icon-biological, .icon-living-labs { background: var(--deep-green); }
.icon-nutrients { background: var(--eco-green); }
.icon-energy { background: var(--deep-blue); }
.icon-text { background: var(--deep-blue); color: #fff; font-weight: 700; font-size: .95rem; white-space: nowrap; }
.tag { display: inline-block; font-size: .85rem; font-weight: 700; background: var(--green-tint); border-radius: 1rem; padding: .1rem .7rem; margin-bottom: .5rem; }
.meta { font-size: .95rem; color: #4a5a63; }
.btn { display: inline-block; background: var(--deep-blue); color: #fff; font: inherit; font-weight: 700; text-decoration: none;
  border: 2px solid var(--deep-blue); border-radius: 6px; padding: .55rem 1.3rem; cursor: pointer; }
.btn:hover { background: #fff; color: var(--deep-blue); }
.btn-outline { background: #fff; color: var(--deep-blue); }
.btn-outline:hover { background: var(--deep-blue); color: #fff; }
.pill { font-size: .85rem; font-weight: 700; background: var(--deep-blue); color: #fff; border-radius: 1rem; padding: .15rem .8rem; text-decoration: none; white-space: nowrap; }
.pill-muted { background: var(--light-grey); color: var(--charcoal); }
.list { list-style: none; padding: 0; margin: 0 0 1em; }
.list li { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .6rem 0; border-bottom: 1px solid var(--blue-tint); }
.page-head { background: var(--blue-tint); padding: 2.2rem 0; }
.page-head p { max-width: 46rem; margin: 0; }
.partner { display: flex; gap: 1rem; align-items: flex-start; }
.partner-logo { flex: none; width: 110px; min-height: 70px; display: grid; place-items: center; text-align: center; font-size: .75rem; }
.partner p { margin-bottom: .4rem; }
.news-layout { display: grid; grid-template-columns: 1fr 300px; gap: 1.5rem; align-items: start; }
.news-item { margin-bottom: 1rem; }
.contact-layout { display: grid; grid-template-columns: 380px 1fr; gap: 1.5rem; align-items: start; }
.stack { display: grid; gap: 1rem; }
.form label { display: block; font-weight: 700; font-size: .95rem; margin: .8rem 0 .25rem; }
.form input[type="text"], .form input[type="email"], .form textarea { width: 100%; font: inherit; padding: .55rem .7rem;
  border: 1.5px solid var(--deep-blue); border-radius: 6px; }
.form .check { display: flex; gap: .6rem; align-items: flex-start; margin: 1rem 0; }
.form .check label { display: inline; font-weight: 400; margin: 0; }
.form .check input { margin-top: .35rem; }
.prose h2 { font-size: 1.25rem; margin-top: 1.8rem; }

/* placeholders: impossible to miss, remove before publishing */
.todo { background: #FFF3B0; color: #5a4300; font-style: italic; padding: 0 .25rem; }

/* footer */
.site-footer { background: var(--light-grey); border-top: 3px solid var(--ponics-blue); padding: 2rem 0 1.5rem; font-size: .95rem; }
.footer-top { display: flex; flex-wrap: wrap; gap: 2rem; justify-content: space-between; align-items: flex-start; }
.footer-logo { width: 96px; }
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links a { font-weight: 700; text-decoration: none; }
.footer-follow p { margin: 0 0 .3rem; }
.funding { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 1rem;
  background: #fff; border: 1px solid #cfe3f1; border-radius: 6px; padding: .9rem 1.1rem; margin-top: 1.5rem;
  text-align: center; }
.funding-statement { font-weight: 700; color: var(--deep-blue); margin: 0; max-width: 22rem; }
.agencies { margin-left: auto; display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.agencies p { margin: 0; }
.disclaimer { font-size: .85rem; margin: .8rem auto 0; text-align: center; max-width: 60rem; }

/* small screens */
@media (max-width: 860px) {
  .grid-3, .steps { grid-template-columns: 1fr 1fr; }
  .news-layout, .contact-layout, .hero-inner { grid-template-columns: 1fr; }
  .hero-picture { display: none; }
  .stats-inner { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 560px) {
  .grid-2, .grid-3, .steps { grid-template-columns: 1fr; }
  .stats-inner { grid-template-columns: 1fr 1fr; }
  .header-prima { display: none; }
  .agencies { margin-left: 0; }
}
/* ---------- Scroll animations ----------
   Hidden start states apply only while <html> has the "motion" class, which the
   script in <head> adds unless the visitor's device asks to reduce motion. */
.motion [data-reveal] { opacity: 0; transition: opacity .7s ease-out, transform .7s ease-out;
  transition-delay: var(--reveal-delay, 0s); will-change: opacity, transform; }
.motion [data-reveal="up"] { transform: translateY(20px); }
.motion [data-reveal="left"] { transform: translateX(-40px); }
.motion [data-reveal="right"] { transform: translateX(40px); }
.motion [data-reveal="zoom"] { transform: scale(.95); }
.motion [data-reveal].is-visible { opacity: 1; transform: none; }
/* 8: green line under section headings */
.reveal-line::after { content: ""; display: block; width: 48px; height: 3px; margin-top: .4rem;
  border-radius: 2px; background: var(--eco-green); }
.motion .reveal-line::after { width: 0; transition: width .8s ease-out .3s; }
.motion .reveal-line.is-visible::after { width: 48px; }
/* 9: slow zoom on the hero photo */
.motion .hero-slides img { transition: opacity 1.2s ease-in-out; }
.motion .hero-slides img.is-active { animation: hero-zoom 6s linear forwards; }
.motion .hero-slides img.is-leaving { transform: scale(1.06); }
.motion .hero-carousel.is-paused .hero-slides img { animation-play-state: paused; }
@keyframes hero-zoom { from { transform: scale(1); } to { transform: scale(1.06); } }
/* Contact form: hidden spam-trap field and result message */
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-status { margin-top: 1rem; padding: .7rem 1rem; border-radius: 6px; font-weight: 700; }
.form-status.is-ok { background: var(--green-tint); color: var(--deep-green); }
.form-status.is-error { background: #FBE9E8; color: var(--agro-red); }
/* Newsletter sign-up (Brevo form) */
.newsletter-section { background: var(--blue-tint); }
.newsletter-intro { max-width: 40rem; }
.newsletter-form { display: block; width: 100%; max-width: 540px; height: 305px; border: 0; margin: 1rem 0 0; }
.aside-newsletter { margin-top: 1.6rem; }
/* Social media links on the Contact page */
.social-links { list-style: none; margin: 0; padding: 0; }
.social-links li { margin: 0 0 .6rem; }
.social-links li:last-child { margin-bottom: 0; }
.social-links a { display: inline-flex; align-items: center; gap: .55rem; }
.social-icon { flex: none; width: 22px; height: 22px; }
