/* FlavoTech site. Layout guided by a classic agency design: photo hero, tinted sections, white cards, navy footer. */
:root {
  --brand: #4f55c9; --brand-dark: #3c41a8; --navy: #1e2352; --navy-2: #171b42;
  --ink: #1e2352; --ink-soft: #545a7a; --tint: #eef0fb; --surface: #fff;
  --border: #e3e5f3; --border-strong: #c9cce3; --accent: #4f55c9; --btn-bg: #4f55c9;
  --radius: 8px; --shadow: 0 10px 30px rgba(30, 35, 82, .07);
  --head: "Poppins", system-ui, sans-serif; --body: "Open Sans", system-ui, sans-serif;
  --page: #fff; --field: #fff; --hero-btn: #4f55c9; color-scheme: light;
}
/* Dark version: follows the device setting, or the sun/moon switch (saved in the browser). */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --brand: #9297f5; --brand-dark: #474dc0; --btn-bg: #5a60d6; --navy: #0c0e22; --navy-2: #090a1a;
    --ink: #eceefb; --ink-soft: #b3b7d3; --tint: #171a36; --surface: #1d2042; --page: #11132a; --field: #151833;
    --border: #2c3060; --border-strong: #3d4277; --shadow: 0 10px 30px rgba(0, 0, 0, .35); color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --brand: #9297f5; --brand-dark: #474dc0; --btn-bg: #5a60d6; --navy: #0c0e22; --navy-2: #090a1a;
  --ink: #eceefb; --ink-soft: #b3b7d3; --tint: #171a36; --surface: #1d2042; --page: #11132a; --field: #151833;
  --border: #2c3060; --border-strong: #3d4277; --shadow: 0 10px 30px rgba(0, 0, 0, .35); color-scheme: dark;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: var(--body); font-size: 16px; line-height: 1.65; color: var(--ink-soft); background: var(--page); transition: background .2s, color .2s; }
h1, h2, h3, h4 { font-family: var(--head); color: var(--ink); line-height: 1.25; margin: 0 0 .5em; }
h1 { font-size: clamp(32px, 5vw, 48px); font-weight: 700; }
h2, .h2 { font-size: clamp(26px, 3.4vw, 34px); font-weight: 600; }
h3, .h3 { font-size: 19px; font-weight: 600; }
p { margin: 0 0 1em; }
a { color: var(--brand); }
img { max-width: 100%; display: block; }
.container { width: min(1140px, 100% - 40px); margin-inline: auto; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 0 26px; border-radius: 4px; background: var(--btn-bg); color: #fff; font-family: var(--head); font-weight: 500; font-size: 14px; letter-spacing: .06em; text-transform: uppercase; text-decoration: none; border: 1px solid var(--btn-bg); cursor: pointer; transition: background .2s; }
.btn:hover { background: var(--brand-dark); border-color: var(--brand-dark); }
.btn-sm { min-height: 40px; padding: 0 18px; font-size: 13px; }
.btn-outline { background: transparent; color: var(--brand); }
.btn-outline:hover { color: #fff; background: var(--btn-bg); }

/* Nav */
.nav { position: absolute; inset: 0 0 auto; z-index: 20; }
.nav-inner { display: flex; align-items: center; gap: 24px; min-height: 84px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--head); font-weight: 700; font-size: 21px; color: #fff; text-decoration: none; margin-right: auto; }
.menu { display: flex; align-items: center; gap: 26px; }
.menu a:not(.btn) { color: rgba(255,255,255,.88); text-decoration: none; font-size: 15px; }
.menu a:not(.btn):hover, .menu a[aria-current] { color: #fff; }
.menu a[aria-current] { text-decoration: underline; text-underline-offset: 6px; }
.menu .lang { border: 1px solid rgba(255,255,255,.5); border-radius: 4px; padding: 2px 8px; font-size: 13px; }
.burger { display: none; background: none; border: 1px solid rgba(255,255,255,.6); color: #fff; border-radius: 4px; padding: 8px 14px; font: inherit; font-size: 14px; cursor: pointer; }

.theme { display: inline-grid; place-items: center; width: 36px; height: 36px; padding: 0; border-radius: 50%; border: 1px solid rgba(255,255,255,.5); background: none; color: #fff; cursor: pointer; }
.theme:hover { background: rgba(255,255,255,.12); }
.theme svg { width: 18px; height: 18px; }
.theme .sun, [data-dark] .theme .moon { display: none; }
[data-dark] .theme .sun { display: block; }

/* Heroes */
.hero, .page-hero { position: relative; color: #fff; background: linear-gradient(90deg, rgba(18, 20, 48, .75) 0%, rgba(30, 34, 82, .5) 55%, rgba(30, 34, 82, .2) 100%), var(--bg, url('/img/hero.webp')) center/cover no-repeat; }
.hero { background: linear-gradient(90deg, rgba(18, 20, 48, .72) 0%, rgba(30, 34, 82, .45) 45%, rgba(30, 34, 82, .1) 100%), var(--bg, url('/img/hero.webp')) center/cover no-repeat; padding: 140px 0 100px; min-height: 100vh; min-height: 100svh; display: flex; align-items: center; }
.hero > .container { width: min(1140px, 100% - 40px); }
.hero h1, .page-hero h1 { color: #fff; max-width: 640px; }
.hero p, .page-hero p { max-width: 560px; font-size: 18px; color: rgba(255,255,255,.9); }
.hero .btn { background: #fff; color: var(--hero-btn); border-color: #fff; margin-top: 10px; }
.hero .btn:hover { background: #eef0fb; }
.eyebrow { display: block; font-family: var(--head); font-weight: 600; font-size: 15px; margin-bottom: 14px; color: #fff; }
.page-hero { padding: 170px 0 80px; }

/* Sections */
.section { padding: 90px 0; }
.tint { background: var(--tint); }
.intro { text-align: center; max-width: 620px; margin: 0 auto 44px; }
.intro .btn { margin-top: 6px; }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.card { background: var(--surface); border-radius: var(--radius); padding: 30px 28px; box-shadow: var(--shadow); position: relative; }
.card p { font-size: 15px; margin: 0; }
.ico { width: 30px; height: 30px; color: var(--brand); margin-bottom: 14px; display: block; }
.section:not(.tint) .card { border: 1px solid var(--border); box-shadow: none; }

.who-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.who { margin: 0; }
.who img { height: auto; aspect-ratio: 1; object-fit: cover; border-radius: var(--radius); width: 100%; }
.who figcaption { font-family: var(--head); font-weight: 600; color: var(--ink); text-align: center; margin-top: 12px; }

.aud-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 24px; }
.aud { grid-column: span 2; }
.aud:nth-child(-n+2) { grid-column: span 3; }
.aud:nth-child(n+3) .aud-body h3 { font-size: 20px; }
.aud:nth-child(n+3) .aud-body { padding: 22px 24px 26px; }
.aud { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; background: var(--surface); }
.aud img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; }
.aud-body { padding: 28px 30px 32px; display: flex; flex-direction: column; flex: 1; }
.aud-body h3 { font-size: 24px; }
.aud-body ul { margin: 4px 0 24px; padding-left: 20px; }
.aud-body li { margin-bottom: 6px; }
.aud-body li::marker { color: var(--brand); }
.aud-body .btn { margin-top: auto; align-self: flex-start; }
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; counter-reset: s; }
.steps li { background: var(--surface); border-radius: var(--radius); padding: 24px 20px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 6px; counter-increment: s; }
.steps strong { font-family: var(--head); color: var(--ink); font-size: 17px; }
.steps strong::before { content: counter(s) ". "; color: var(--brand); }
.steps li > span { font-size: 14.5px; }
.steps .ico { margin-bottom: 4px; }

.promise { border: 1px solid var(--border); display: flex; gap: 20px; align-items: center; margin-top: 36px; padding: 28px 32px; border-radius: var(--radius); background: var(--navy); color: rgba(255,255,255,.85); }
.promise h3 { color: #fff; margin-bottom: 4px; }
.promise p { margin: 0; }
.promise .ico { width: 44px; height: 44px; color: #fff; flex: none; margin: 0; }

.team { display: flex; justify-content: center; }
/* Founder card, same style as the portfolio contact card: dark panel, text left, full photo right */
.person-card { --pc-bg: #1e2352; --pc-border: transparent; display: grid; grid-template-columns: minmax(0, 1fr) 320px; max-width: 980px; margin: 0 auto; background: var(--pc-bg); border: 1px solid var(--pc-border); border-radius: var(--radius); overflow: hidden; color: #f8fafc; }
[data-dark] .person-card { --pc-bg: #1a1d3c; --pc-border: #2c3060; }
.pc-body { padding: 56px; display: flex; flex-direction: column; justify-content: center; gap: 14px; }
.pc-role { font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: #c3c6ea; }
.person-card h3 { color: #fff; font-size: clamp(26px, 3vw, 32px); margin: 0; }
.pc-body p { color: #d4d6ee; font-size: 17px; margin: 0; }
.pc-row { display: grid; grid-template-columns: 72px minmax(0, 1fr) auto; align-items: center; gap: 8px 16px; padding-top: 14px; margin-top: 6px; border-top: 1px solid rgba(255,255,255,.12); }
.pc-k { font-size: 13px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: #c3c6ea; }
.pc-v { color: #b4b8ff; overflow-wrap: anywhere; font-weight: 500; }
.pc-v:hover { color: #d6d8ff; }
.person-card .btn { background: #5a60d6; border-color: #5a60d6; }
.person-card .btn:hover { background: #474dc0; border-color: #474dc0; }
.pc-photo { width: 100%; height: 100%; aspect-ratio: 720 / 964; object-fit: cover; display: block; }
.person { margin: 0; max-width: 340px; text-align: center; }
.person img { height: auto; border-radius: var(--radius); aspect-ratio: 3 / 4; object-fit: cover; width: 100%; }
.person strong { display: block; font-family: var(--head); color: var(--ink); font-size: 19px; margin-top: 16px; }
.person figcaption > span { display: block; font-size: 14px; margin-bottom: 8px; }
.person p { font-size: 15px; }

.band { padding: 54px 0; border-top: 1px solid var(--border); }
.band-inner { display: flex; align-items: center; justify-content: space-between; gap: 30px; }
.band h2 { color: var(--brand); font-size: clamp(22px, 2.6vw, 28px); }
.band p { margin: 0; max-width: 620px; }

.split { display: grid; grid-template-columns: 1.1fr 1fr; gap: 56px; align-items: start; }
.rounded { border-radius: var(--radius); width: 100%; height: auto; }
.pack .num { font-family: var(--head); font-weight: 700; font-size: 34px; color: var(--brand); opacity: .35; display: block; line-height: 1; margin-bottom: 10px; }
.pack ul { margin: 16px 0 0; padding-left: 18px; font-size: 15px; }
.pack li::marker { color: var(--brand); }
.soon .tag { position: absolute; top: 18px; right: 18px; font-size: 12px; font-weight: 600; color: var(--brand); background: var(--tint); padding: 3px 10px; border-radius: 20px; }
.soon { display: flex; flex-direction: column; align-items: flex-start; }
.soon .btn { margin-top: auto; }
.soon p { margin-bottom: 18px; }

.form { display: flex; flex-direction: column; gap: 16px; }
.form label { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 600; color: var(--ink); }
.form input, .form textarea { font: inherit; font-weight: 400; padding: 12px 14px; border: 1px solid var(--border-strong); border-radius: 4px; color: var(--ink); background: var(--field); }
.form input:focus, .form textarea:focus { outline: 2px solid var(--brand); border-color: transparent; }
.form small { font-size: 13px; }
.form .btn { align-self: flex-start; }
.info p { display: flex; gap: 12px; align-items: center; }
.info .ico { margin: 0; width: 24px; height: 24px; }
.info img { margin-top: 24px; }

/* Footer */
.footer { background: var(--navy); color: rgba(255,255,255,.75); font-size: 15px; padding-top: 70px; }
.foot-grid { display: grid; grid-template-columns: 1.6fr 1fr 1.3fr; gap: 40px; padding-bottom: 50px; }
.footer h4 { color: #fff; font-size: 17px; font-weight: 500; margin-bottom: 18px; }
.footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.footer a { color: rgba(255,255,255,.75); text-decoration: none; }
.footer a:hover { color: #fff; }
.brand-light { margin-bottom: 16px; }
.foot-bottom { border-top: 1px solid rgba(255,255,255,.12); padding: 22px 0; display: flex; justify-content: space-between; gap: 16px; font-size: 14px; }
.footer button.linklike { background: none; border: 0; padding: 0; font: inherit; color: rgba(255,255,255,.75); cursor: pointer; text-decoration: underline; }

/* Cookie consent */
.consent { position: fixed; left: 24px; bottom: 24px; z-index: 60; max-width: 380px; padding: 18px 20px; background: var(--surface); color: var(--ink-soft); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: 0 20px 40px rgba(15, 23, 42, .12); font-size: 14px; line-height: 1.5; }
.consent[hidden] { display: none; }
.consent p { margin: 0 0 14px; }
.consent-actions { display: flex; gap: 10px; justify-content: flex-end; }
.consent-actions button { font: inherit; font-weight: 600; font-size: 14px; cursor: pointer; min-height: 40px; padding: 0 18px; border-radius: 4px; }
.btn-ghost { background: transparent; color: var(--ink); border: 1px solid var(--border-strong); }
.btn-ok { background: var(--btn-bg); color: #fff; border: 1px solid transparent; }

/* Back to top: square button with a scroll-progress outline (same as the portfolio) */
.to-top { position: fixed; right: 24px; bottom: 24px; z-index: 50; width: 52px; height: 52px; display: flex; align-items: center; justify-content: center; background: var(--surface); color: var(--ink); border-radius: var(--radius); box-shadow: var(--shadow); opacity: 0; transform: translateY(12px); pointer-events: none; transition: opacity .2s, transform .2s; }
.to-top.visible { opacity: 1; transform: none; pointer-events: auto; }
.to-top:hover { color: var(--brand); }
.to-top .ring { position: absolute; inset: 0; width: 100%; height: 100%; }
.to-top .ring path { fill: none; stroke-width: 2; }
.to-top .track { stroke: var(--border); }
.to-top .bar { stroke: var(--btn-bg); stroke-dasharray: 100; stroke-dashoffset: 100; }

/* 404 */
.notfound { min-height: 100vh; display: grid; place-items: center; text-align: center; padding: 40px 20px; }

@media (max-width: 1020px) {
  .burger { display: block; }
  .menu { display: none; position: absolute; top: 76px; left: 16px; right: 16px; flex-direction: column; align-items: stretch; gap: 0; background: var(--surface); border-radius: var(--radius); box-shadow: 0 20px 40px rgba(15,23,42,.18); padding: 10px; }
  .menu.open { display: flex; }
  .menu a:not(.btn) { color: var(--ink); padding: 12px 14px; border-radius: 4px; }
  .menu a:not(.btn):hover, .menu a[aria-current] { color: var(--brand); background: var(--tint); text-decoration: none; }
  .menu .lang { border: 0; font-size: 15px; }
  .menu .theme { border-color: var(--border-strong); color: var(--ink); margin: 6px 14px; }
  .menu .theme:hover { background: var(--tint); }
  .menu .btn { margin-top: 8px; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .who-grid { grid-template-columns: repeat(2, 1fr); }
  .aud-grid { grid-template-columns: 1fr 1fr; }
  .aud, .aud:nth-child(-n+2) { grid-column: auto; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .person-card { grid-template-columns: 1fr; }
  .pc-photo { grid-row: 1; height: auto; aspect-ratio: 4 / 3; object-position: center 22%; }
}
@media (max-width: 760px) {
  .cards, .cards-3, .split, .aud-grid { grid-template-columns: 1fr; }
  .aud, .aud:nth-child(-n+2) { grid-column: auto; }
  .split { gap: 32px; }
  .hero { padding: 150px 0 100px; }
  .page-hero { padding: 140px 0 60px; }
  .section { padding: 64px 0; }
  .band-inner, .promise { flex-direction: column; align-items: flex-start; }
  .steps { grid-template-columns: 1fr; }
  .consent { left: 16px; right: 16px; bottom: 16px; max-width: none; }
  .to-top { right: 16px; bottom: 16px; }
  .pc-body { padding: 32px 24px; }
  .pc-row { grid-template-columns: 1fr; }
}
@media (max-width: 480px) { .foot-grid, .who-grid { grid-template-columns: 1fr; } .foot-bottom { flex-direction: column; } }

/* Partner landing page (/optimizare-ai/) */
.lp-hero .btn { background: #fff; color: var(--hero-btn); border-color: #fff; margin-top: 10px; }
.lp-hero .btn:hover { background: #eef0fb; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.stat { background: var(--tint); border-radius: var(--radius); padding: 26px 24px 22px; position: relative; }
.stat strong { display: block; font-family: var(--head); font-weight: 700; font-size: 40px; line-height: 1.1; color: var(--brand); margin-bottom: 10px; }
.stat p { font-size: 15px; margin: 0 0 8px; }
.src { font-size: 12px; font-weight: 600; text-decoration: none; vertical-align: super; margin-left: 2px; }
.stat .src { vertical-align: baseline; margin: 0; }
.case { display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; align-items: center; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 36px; }
.case-2 { grid-template-columns: 1fr; margin-top: 24px; }
.case h3 { font-size: 22px; }
.case ul { padding-left: 20px; margin: 0; }
.case li { margin-bottom: 6px; }
.case li::marker { color: var(--brand); }
.case b { color: var(--ink); }
.bars { margin: 0; display: grid; gap: 18px; }
.bars span { display: block; font-size: 14px; font-weight: 600; color: var(--ink); margin-bottom: 6px; }
.bar { width: var(--w); min-width: 90px; height: 44px; background: var(--border-strong); border-radius: 4px; display: flex; align-items: center; justify-content: flex-end; padding-right: 12px; }
.bar b { font-family: var(--head); color: var(--ink); }
.bar-hi { background: var(--btn-bg); }
.bar-hi b { color: #fff; }
.bars figcaption { font-size: 13px; }
.lesson { text-align: center; max-width: 720px; margin: 40px auto 0; font-family: var(--head); font-size: 20px; color: var(--ink); }
.lp-note { text-align: center; margin: 28px 0 0; font-weight: 600; color: var(--ink); }
.narrow { width: min(820px, 100% - 40px); }
.faq { border-bottom: 1px solid var(--border); padding: 18px 0; }
.faq summary { cursor: pointer; font-family: var(--head); font-weight: 600; color: var(--ink); font-size: 17px; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--brand); font-size: 22px; line-height: 1; }
.faq[open] summary::after { content: "−"; }
.faq p { margin: 12px 0 0; }
.form .opt { font-weight: 400; color: var(--ink-soft); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-msg { margin: 0; font-size: 14px; font-weight: 600; min-height: 1.2em; }
.form-msg.ok { color: #1f8a4c; }
.form-msg.err { color: #c0392b; }
[data-dark] .form-msg.ok { color: #6fd39b; }
[data-dark] .form-msg.err { color: #ff8a7a; }
.sources { padding: 50px 0; }
.sources ol { font-size: 14px; padding-left: 20px; margin: 0; }
.sources li { margin-bottom: 6px; overflow-wrap: anywhere; }
@media (max-width: 1020px) { .stats { grid-template-columns: 1fr 1fr; } }
@media (max-width: 760px) {
  .case { grid-template-columns: 1fr; padding: 24px; gap: 24px; }
  .stat strong { font-size: 34px; }
  .lesson { font-size: 18px; }
}
@media (max-width: 480px) { .stats { grid-template-columns: 1fr; } }
