/* Ferrari Innovations, design direction: Alpine Clarity */

@font-face { font-family: "Bricolage Grotesque"; src: url("fonts/bricolage-grotesque-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Bricolage Grotesque"; src: url("fonts/bricolage-grotesque-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Figtree"; src: url("fonts/figtree-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Figtree"; src: url("fonts/figtree-latin-400-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Figtree"; src: url("fonts/figtree-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Figtree"; src: url("fonts/figtree-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }

:root {
	--bg: #EEF1EE;
	--surface: #FFFFFF;
	--ink: #15201D;
	--muted: #56645F;
	--line: #D3DBD7;
	--deep: #0F1A17;
	--accent: #0C6B58;
	--accent-ink: #0A5A4A;
	--accent-soft: #DCEBE5;

	--font-display: "Bricolage Grotesque", ui-sans-serif, system-ui, sans-serif;
	--font-body: "Figtree", ui-sans-serif, system-ui, sans-serif;

	--r-sm: 6px;
	--r-md: 14px;
	--r-pill: 999px;

	--gutter: max(clamp(16px, 4vw, 40px), env(safe-area-inset-left), env(safe-area-inset-right));
	--maxw: 1200px;
	--edge: max(var(--gutter), (100vw - var(--maxw)) / 2);
	--sec: clamp(72px, 10vw, 136px);
	--head-h: 92px;
}

/* Reset, kept at zero specificity so components always win */
:where(*, *::before, *::after) { box-sizing: border-box; }
:where(html) { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--head-h) + 12px); }
:where(body, h1, h2, h3, p, figure, dl, dd, ul, address, blockquote) { margin: 0; padding: 0; }
:where(ul) { list-style: none; }
:where(img, svg) { display: block; max-width: 100%; height: auto; }
:where(address) { font-style: normal; }
:where(a) { color: inherit; }

body {
	background: var(--bg);
	color: var(--ink);
	font-family: var(--font-body);
	font-size: clamp(16px, 0.25vw + 15.2px, 18px);
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
	overflow-x: clip;
}

.wrap { width: min(100% - 2 * var(--gutter), var(--maxw)); margin-inline: auto; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--ink); color: #fff; padding: 10px 16px; border-radius: var(--r-sm); text-decoration: none; }
.skip:focus { top: 12px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

/* Buttons */
.btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	min-height: 48px; padding: 0 24px;
	border-radius: var(--r-pill); border: 1.5px solid transparent;
	font: 600 1rem/1 var(--font-body); text-decoration: none; white-space: nowrap;
	transition: background-color .2s ease, color .2s ease, border-color .2s ease, transform .15s ease;
}
.btn:active { transform: translateY(1px) scale(.99); }
.btn--primary { background: var(--accent); color: #fff; }
.btn--primary:hover { background: var(--accent-ink); }
.btn--ghost { border-color: var(--ink); color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: var(--bg); }
.btn--light { background: var(--bg); color: var(--deep); }
.btn--light:hover { background: #fff; }
.btn--sm { min-height: 40px; padding: 0 18px; font-size: .95rem; }

.link { display: inline-flex; gap: 6px; font-weight: 600; color: var(--accent); text-decoration: none; border-bottom: 1.5px solid currentColor; padding-bottom: 2px; }
.link:hover { color: var(--accent-ink); }
.hl { color: var(--accent); }

/* Header */
.site-head { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: saturate(140%) blur(10px); -webkit-backdrop-filter: saturate(140%) blur(10px); border-bottom: 1px solid transparent; transition: border-color .2s ease; }
.site-head.is-scrolled { border-bottom-color: var(--line); }
.admin-bar .site-head { top: 32px; }
.site-head__in { display: flex; align-items: center; justify-content: space-between; gap: 24px; height: var(--head-h); }
.brand { display: block; flex: none; }
.brand__logo { height: 72px; width: auto; }
.site-nav { display: flex; align-items: center; gap: clamp(16px, 2.4vw, 32px); }
.site-nav a:not(.btn) { font-weight: 500; text-decoration: none; color: var(--ink); padding: 6px 0; border-bottom: 1.5px solid transparent; }
.site-nav a:not(.btn):hover { border-bottom-color: var(--ink); }
.nav-toggle { display: none; }

/* Hero */
.hero { padding-top: clamp(12px, 2vw, 28px); }
.hero__in { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.12fr); align-items: center; gap: clamp(32px, 5vw, 72px); min-height: clamp(460px, calc(100svh - var(--head-h) - 140px), 620px); }
.hero__title { font: 700 clamp(2.4rem, 4vw, 3.7rem)/1.04 var(--font-display); letter-spacing: -0.025em; max-width: 21ch; text-wrap: balance; }
.hero__lede { margin-top: 22px; max-width: 46ch; font-size: clamp(1.1rem, .5vw + 1rem, 1.3rem); color: var(--muted); }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.hero__media { margin-right: calc(-1 * var(--edge)); align-self: stretch; min-height: 420px; }
.hero__media img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--r-md) 0 0 var(--r-md); }

/* Facts strip */
.facts { margin-top: clamp(28px, 4vw, 48px); border-block: 1px solid var(--line); }
.facts__in { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.facts li { padding: 22px 24px 22px 0; color: var(--muted); }
.facts li + li { padding-left: 24px; border-left: 1px solid var(--line); }
.facts strong { color: var(--ink); font-weight: 600; }

/* Section heads */
.sec-head { max-width: 720px; }
.sec-title { font: 700 clamp(2rem, 3.2vw, 3rem)/1.06 var(--font-display); letter-spacing: -0.02em; text-wrap: balance; }
.sec-lede { margin-top: 16px; max-width: 58ch; color: var(--muted); font-size: 1.1rem; }

/* Technologies bento */
.tech { padding-block: var(--sec); }
.bento { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); grid-auto-rows: auto; gap: 20px; margin-top: clamp(40px, 5vw, 64px); }
.tile { border-radius: var(--r-md); overflow: hidden; display: flex; flex-direction: column; }
.tile__body { padding: clamp(24px, 3vw, 40px); display: flex; flex-direction: column; gap: 14px; }
.tile__body p { max-width: 60ch; }
.tile__kicker { font-size: .8rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.tile__title { font: 700 clamp(1.7rem, 2.4vw, 2.3rem)/1.05 var(--font-display); letter-spacing: -0.015em; }
.tile__note { font-size: .95rem; color: var(--muted); }
.tile__art { width: 100%; height: auto; padding: 8px 0 0; }

.tile--tao { grid-column: 1 / span 7; grid-row: 1 / span 2; background: var(--surface); border: 1px solid var(--line); }
.tile--tao .tile__media { aspect-ratio: 16 / 10; overflow: hidden; background: var(--accent-soft); }
.tile--tao .tile__media img { width: 100%; height: 100%; object-fit: cover; }
.tile--tao .tile__body { flex: 1; }
.tile--tao .link { margin-top: auto; align-self: flex-start; }

.tile--water { grid-column: 8 / span 5; background: var(--accent-soft); color: var(--ink); }
.tile--water .tile__art { color: var(--accent); }

.tile--guard { grid-column: 8 / span 5; background: var(--deep); color: #E6ECE9; }
.tile--guard .tile__art { color: #7FB8A8; }
.tile--guard .tile__note { color: #A9B8B2; }

.ticks { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.ticks li { font-size: .92rem; font-weight: 500; padding: 6px 14px; border-radius: var(--r-pill); background: var(--accent-soft); color: var(--accent-ink); }

.disclaimer { margin-top: 28px; max-width: 72ch; font-size: .92rem; color: var(--muted); }

/* Services */
.services { padding-block: var(--sec); background: var(--surface); border-block: 1px solid var(--line); }
.services__in { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 6vw, 96px); align-items: start; }
.services__head { position: sticky; top: calc(var(--head-h) + 32px); }
.svc__row { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 24px; padding: 28px 0; border-top: 1px solid var(--line); }
.svc__row:last-child { border-bottom: 1px solid var(--line); }
.svc dt { font: 600 1.3rem/1.2 var(--font-display); letter-spacing: -0.01em; }
.svc dd { color: var(--muted); }

/* About */
.about { padding-block: var(--sec); }
.about__in { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 6vw, 96px); align-items: center; }
.about__media { transform: rotate(-2deg); }
.about__media img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: var(--r-md); }
.about__title { font: 700 clamp(2rem, 3.4vw, 3.2rem)/1.08 var(--font-display); letter-spacing: -0.02em; max-width: 16ch; }
.about__year { display: inline-block; font-size: 1.9em; line-height: .9; color: var(--accent); letter-spacing: -0.04em; vertical-align: -0.12em; }
.about__text p { margin-top: 20px; max-width: 58ch; color: var(--muted); font-size: 1.08rem; }
.about__text p:first-of-type { margin-top: 28px; color: var(--ink); font-size: 1.2rem; }

/* Contact */
.contact { background: var(--deep); color: #E6ECE9; padding-block: var(--sec); }
.contact__in { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: clamp(40px, 6vw, 96px); align-items: center; }
.contact__title { font: 700 clamp(2.4rem, 4.4vw, 4rem)/1.02 var(--font-display); letter-spacing: -0.025em; color: #fff; max-width: 12ch; }
.contact__text p { margin: 20px 0 32px; max-width: 46ch; color: #A9B8B2; font-size: 1.1rem; }
.contact__card { border: 1px solid rgba(230, 236, 233, .16); border-radius: var(--r-md); padding: clamp(24px, 3vw, 40px); }
.contact__card p { color: #C9D4CF; }
.contact__label { font-size: .8rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: #7FB8A8 !important; margin-top: 22px; }
.contact__label:first-child { margin-top: 0; }
.contact__big { font: 600 clamp(1.15rem, 1.4vw, 1.4rem)/1.3 var(--font-display); margin-top: 4px; overflow-wrap: anywhere; }
.contact__big a { color: #fff; text-decoration: none; border-bottom: 1px solid rgba(255, 255, 255, .3); }
.contact__big a:hover { border-bottom-color: #fff; }

/* Footer */
.site-foot { background: var(--deep); color: #A9B8B2; border-top: 1px solid rgba(230, 236, 233, .12); font-size: .92rem; }
.site-foot__in { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 28px; padding-block: 28px; }
.site-foot__brand { flex-basis: 100%; display: inline-flex; margin-bottom: 12px; }
.site-foot__logo { height: 44px; width: auto; background: var(--bg); padding: 8px 14px; border-radius: var(--r-sm); box-sizing: content-box; }
.site-foot__name { color: #E6ECE9; font-weight: 600; }
.site-foot a { color: #E6ECE9; text-decoration: none; }
.site-foot__legal { flex-basis: 100%; font-size: .85rem; color: #7E8E88; }

/* Generic pages */
.fi-page { padding-block: var(--sec); }
.entry { max-width: 720px; }
.entry__title { font: 700 clamp(2.2rem, 4vw, 3.4rem)/1.05 var(--font-display); letter-spacing: -0.02em; margin-bottom: 32px; }
.entry__body > * + * { margin-top: 1em; }
.entry__body a { color: var(--accent); }

/* Reveal: hidden only when JS is present, always visible otherwise */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s cubic-bezier(.2, .7, .2, 1); }
.js .about__media.reveal { transform: translateY(18px) rotate(-2deg); }
.js .reveal.is-in { opacity: 1; transform: none; }
.js .about__media.reveal.is-in { transform: rotate(-2deg); }
@media (prefers-reduced-motion: reduce) {
	:where(html) { scroll-behavior: auto; }
	.js .reveal, .js .reveal.is-in { opacity: 1; transform: none; transition: none; }
	.js .about__media.reveal { transform: rotate(-2deg); }
	.btn { transition: none; }
}

/* Tablet */
@media (max-width: 960px) {
	.hero__in { grid-template-columns: 1fr; min-height: 0; }
	.hero__media { margin-left: calc(-1 * var(--edge)); min-height: 0; aspect-ratio: 16 / 10; }
	.hero__media img { border-radius: 0; }
	.bento { grid-template-columns: 1fr; }
	.tile--tao, .tile--water, .tile--guard { grid-column: auto; grid-row: auto; }
	.services__in, .about__in, .contact__in { grid-template-columns: 1fr; }
	.services__head { position: static; }
	.about__media { max-width: 420px; }
}

/* Mobile */
@media (max-width: 782px) {
	.admin-bar .site-head { top: 46px; }
}
@media (max-width: 720px) {
	:root { --head-h: 72px; }
	.brand__logo { height: 54px; }
	.nav-toggle { display: inline-flex; flex-direction: column; justify-content: center; gap: 6px; width: 42px; height: 42px; border: 1.5px solid var(--ink); border-radius: var(--r-pill); background: transparent; cursor: pointer; padding: 0 12px; }
	.nav-toggle__bar { display: block; height: 1.5px; background: var(--ink); transition: transform .2s ease; }
	.nav-toggle[aria-expanded="true"] .nav-toggle__bar:first-child { transform: translateY(3.75px) rotate(45deg); }
	.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(2) { transform: translateY(-3.75px) rotate(-45deg); }
	.site-nav { position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; align-items: stretch; gap: 0; padding: 8px var(--gutter) 20px; background: var(--bg); border-bottom: 1px solid var(--line); display: none; }
	.site-nav.is-open { display: flex; }
	.site-nav a:not(.btn) { padding: 14px 0; border-bottom: 1px solid var(--line); }
	.site-nav .btn { margin-top: 16px; }
	.facts__in { grid-template-columns: 1fr; }
	.facts li, .facts li + li { padding: 16px 0; border-left: 0; }
	.facts li + li { border-top: 1px solid var(--line); }
	.svc__row { grid-template-columns: 1fr; gap: 8px; }
	.hero__cta .btn { flex: 1 1 100%; }
}

/* Phones (iPhone and Android) */
@media (max-width: 720px) {
	.site-head__in { gap: 12px; }
	.site-nav { max-height: calc(100svh - var(--head-h)); overflow-y: auto; padding-bottom: max(20px, env(safe-area-inset-bottom)); box-shadow: 0 12px 24px -16px rgba(15, 26, 23, .25); }
	.hero { padding-top: 8px; }
	.hero__in { gap: 28px; }
	.hero__title { font-size: clamp(2rem, 8.4vw, 2.6rem); line-height: 1.06; letter-spacing: -0.02em; max-width: none; }
	.hero__lede { margin-top: 14px; font-size: 1.05rem; }
	.hero__cta { margin-top: 24px; gap: 10px; }
	.hero__media { aspect-ratio: 4 / 3; }
	.facts { margin-top: 0; border-top: 0; }
	.sec-title { font-size: clamp(1.75rem, 7vw, 2.2rem); }
	.sec-lede { font-size: 1.02rem; }
	.tile__body { padding: 22px 20px 24px; }
	.tile__title { font-size: 1.6rem; }
	.bento { gap: 14px; }
	.about__media { transform: none; max-width: none; }
	.js .about__media.reveal, .js .about__media.reveal.is-in { transform: none; }
	.about__media img { aspect-ratio: 3 / 2; }
	.about__title { font-size: clamp(1.75rem, 7vw, 2.2rem); }
	.about__year { font-size: 1.6em; }
	.contact__title { font-size: clamp(2rem, 9vw, 2.6rem); }
	.contact__text .btn { width: 100%; }
	.site-foot__in { padding-bottom: max(28px, env(safe-area-inset-bottom)); }
	.site-foot__logo { height: 36px; }
}
@media (max-width: 600px) {
	.admin-bar .site-head { top: 0; }
}
@media (max-width: 380px) {
	.hero__title { font-size: 1.85rem; }
	.btn { padding: 0 18px; }
}
