/* CTRON company site. Palette and type match the ctronloop.com landing page
   (components/landing/loop-landing.module.css in the product repo). */

@font-face {
	font-family: "Geist";
	src: url("../fonts/GeistVF.woff") format("woff");
	font-weight: 100 900;
	font-display: swap;
}

:root {
	--ink: #101314;
	--muted: #5e625f;
	--paper: #f6f5ef;
	--cream: #eceade;
	--line: rgba(16, 19, 20, 0.13);
	--lime: #d8ff62;
	--green: #173f35;
	--blue: #2c5eff;
	--footer-ink: #191815;
	--footer-muted: #5f5a52;
	--footer-line: #e8e2d8;
	--radius: 10px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
	margin: 0;
	background: var(--paper);
	color: var(--ink);
	font-family: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
	font-size: 16px;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
::selection { background: rgba(44, 94, 255, .2); }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }

h1, h2, h3 { margin: 0; font-weight: 620; letter-spacing: -.035em; line-height: 1.05; }
h2 { font-size: clamp(2rem, 4vw, 3.1rem); }
h3 { font-size: 1.15rem; letter-spacing: -.015em; line-height: 1.3; }

.wrap { width: min(1360px, calc(100% - 64px)); margin-inline: auto; }

.skip-link {
	position: absolute; left: 16px; top: -48px; z-index: 10;
	padding: 8px 14px; border-radius: 6px; background: var(--ink); color: #fff; text-decoration: none;
}
.skip-link:focus { top: 12px; }

/* Header */
.site-header {
	position: sticky; top: 0; z-index: 5;
	border-bottom: 1px solid var(--line);
	background: rgba(246, 245, 239, .88);
	backdrop-filter: blur(10px);
}
.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .site-header { top: 46px; } }
@media (max-width: 600px) { .admin-bar .site-header { top: 0; } }
.site-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: .02em; text-decoration: none; }
.brand img { width: 32px; height: 32px; }
.brand--small { font-size: 14px; font-weight: 600; letter-spacing: 0; color: var(--footer-ink); }
.brand--small img { width: 24px; height: 24px; border-radius: 4px; }
.site-nav { display: flex; align-items: center; gap: 22px; font-size: 14px; }
.site-nav a:not(.button) { color: var(--muted); text-decoration: none; }
.site-nav a:not(.button):hover { color: var(--ink); }

/* Buttons */
.button {
	display: inline-flex; align-items: center; gap: 10px;
	min-height: 48px; padding: 0 22px;
	border: 1px solid var(--ink); border-radius: 999px;
	background: var(--ink); color: #fff;
	font-size: 15px; font-weight: 600; text-decoration: none;
	transition: transform 180ms ease, background 180ms ease;
}
.button:hover { transform: translateY(-1px); background: #242a2b; }
.button--small { min-height: 38px; padding: 0 16px; font-size: 14px; }
.button--ghost { background: transparent; color: var(--ink); }
.button--ghost:hover { background: rgba(16, 19, 20, .05); }
.button--lime { border-color: var(--lime); background: var(--lime); color: var(--ink); }
.button--lime:hover { background: #e4ff8f; }

.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }

.eyebrow, .kicker {
	display: flex; align-items: center; gap: 9px; margin: 0 0 18px;
	font-size: 11px; font-weight: 750; letter-spacing: .18em; text-transform: uppercase;
}
.kicker { color: var(--muted); }
.eyebrow span {
	width: 7px; height: 7px; border-radius: 50%;
	background: var(--blue); box-shadow: 0 0 0 5px rgba(44, 94, 255, .1);
}

/* Hero */
.hero {
	position: relative; overflow: hidden;
	padding: 72px 0 80px;
	border-bottom: 1px solid var(--line);
	background:
		radial-gradient(circle at 0% 0%, rgba(216, 255, 98, .26), transparent 42%),
		linear-gradient(rgba(16, 19, 20, .035) 1px, transparent 1px),
		linear-gradient(90deg, rgba(16, 19, 20, .035) 1px, transparent 1px),
		#f8f7f2;
	background-size: auto, 48px 48px, 48px 48px, auto;
}
/* minmax(0, …) lets grid columns shrink below their content's natural width. Without it the
   full-size screenshot props the column open and the page overflows on phones. */
.hero__inner { display: grid; grid-template-columns: minmax(0, .82fr) minmax(0, 1.18fr); gap: 64px; align-items: center; }
.hero__inner > *, .split > *, .cards > *, .steps > * { min-width: 0; }
.hero h1 { font-size: clamp(2.8rem, 5.6vw, 5.4rem); line-height: .95; letter-spacing: -.06em; }
.hero h1 em { color: var(--blue); font-style: normal; }
.lead { max-width: 560px; margin: 26px 0 0; color: #4f5451; font-size: clamp(1.05rem, 1.5vw, 1.2rem); line-height: 1.65; }
.hint { margin: 14px 0 0; color: var(--muted); font-size: 13px; }
.hero__shot { position: relative; margin: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: #fff; box-shadow: 0 30px 80px -40px rgba(16, 19, 20, .35); }

/* Sections */
.section { padding: 96px 0; border-bottom: 1px solid var(--line); }
.section h2 { max-width: 760px; }
.section--cream { background: var(--cream); }
.section--dark { background: var(--green); color: #f2f4ee; border-bottom: 0; }
.section--dark .kicker { color: #a9c3b8; }
.section--dark .split p:not(.kicker) { color: #d7e2dc; font-size: 1.1rem; }
.proof__copy { margin-top: 24px !important; }
.section--dark .text-link { color: var(--lime); }

.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; align-items: start; }
.split p { margin: 0 0 16px; color: #4f5451; }
.split a:not(.text-link) { color: var(--blue); }

.section-lead { max-width: 30rem; margin-top: 20px !important; font-size: 1.1rem; }

/* Problem: the old routine, struck through, against the one-line new one */
.compare { display: grid; gap: 16px; }
.compare__old { margin: 0; padding: 0; list-style: none; counter-reset: old; }
.compare__old li {
	counter-increment: old;
	display: flex; gap: 14px; padding: 12px 0; border-bottom: 1px dashed var(--line);
	color: #8a8f8a;
}
/* The strike is a drawn line rather than text-decoration, so it can animate across. */
.compare__old li span {
	background: linear-gradient(rgba(16, 19, 20, .45), rgba(16, 19, 20, .45)) no-repeat 0 55% / 100% 1.5px;
}
.compare__old li::before { content: counter(old, decimal-leading-zero); font-size: 12px; font-weight: 700; text-decoration: none; padding-top: 3px; }
.compare__new { padding: 24px; border-radius: var(--radius); background: var(--ink); color: #fff; }
.compare__new .kicker { margin-bottom: 8px; color: var(--lime); }
.compare__new p:last-child { margin: 0; color: #fff; font-size: 1.6rem; font-weight: 620; letter-spacing: -.03em; }

/* How it works */
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 44px 0 0; padding: 0; list-style: none; }
.steps li { padding: 28px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); }
.steps__num {
	display: grid; place-items: center; width: 36px; height: 36px; margin-bottom: 18px;
	border-radius: 50%; background: var(--blue); color: #fff; font-weight: 700;
}
.steps p { margin: 10px 0 0; color: var(--muted); }

.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 44px; }
.card {
	display: flex; flex-direction: column; gap: 10px;
	padding: 24px; border: 1px solid var(--line); border-radius: var(--radius);
	background: #fff; text-decoration: none;
	transition: transform 180ms ease, border-color 180ms ease;
}
.card:hover { transform: translateY(-2px); border-color: rgba(44, 94, 255, .45); }
.card p { margin: 0; color: var(--muted); font-size: 15px; flex: 1; }
.card__more { color: var(--blue); font-size: 14px; font-weight: 600; }

.text-link { display: inline-flex; gap: 8px; margin-top: 20px; color: var(--blue); font-weight: 600; text-decoration: none; }
.text-link:hover { text-decoration: underline; text-underline-offset: 4px; }

.ticks { margin: 0; padding: 0; list-style: none; }
.ticks li { position: relative; padding: 16px 0 16px 34px; border-bottom: 1px solid var(--line); font-size: 1.05rem; }
.ticks li::before {
	content: ""; position: absolute; left: 4px; top: 22px;
	width: 12px; height: 7px; border-left: 2px solid var(--blue); border-bottom: 2px solid var(--blue);
	transform: rotate(-45deg);
}

.faq { max-width: 820px; }
.faq h2 { margin-bottom: 28px; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { padding: 20px 0; font-size: 1.1rem; font-weight: 600; cursor: pointer; }
.faq details p { margin: 0 0 22px; color: var(--muted); }
.faq details p a { color: var(--blue); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.faq details p a:hover { text-decoration-thickness: 2px; }

.cta {
	position: relative; overflow: hidden; padding: 120px 0; color: #fff;
	background: linear-gradient(90deg, rgba(16, 19, 20, .94) 0%, rgba(16, 19, 20, .82) 45%, rgba(16, 19, 20, .45) 100%), var(--cta-image, none) center / cover no-repeat, var(--ink);
}
.cta__inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.cta h2 { font-size: clamp(1.9rem, 3.6vw, 2.8rem); }
.cta p { margin: 10px 0 0; color: #b9bdb9; }

/* Photos */
.photo { margin: 32px 0 0; overflow: hidden; border-radius: 14px; background: var(--cream); }
.photo img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.08); will-change: transform; }
.photo--wide { aspect-ratio: 3 / 2; }
.photo--tall { margin: 0; aspect-ratio: 4 / 3; align-self: center; box-shadow: 0 30px 70px -30px rgba(0, 0, 0, .55); }
.section--dark .split { align-items: center; }

.section-head { display: flex; align-items: end; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.section-head .text-link { margin: 0 0 6px; }

.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-top: 44px; }
.tile {
	position: relative; display: block; overflow: hidden; aspect-ratio: 4 / 5;
	border-radius: 14px; background: var(--ink); color: #fff; text-decoration: none;
}
.tile img { width: 100%; height: 100%; object-fit: cover; transition: transform 700ms var(--ease, ease), filter 700ms ease; }
.tile::after {
	content: ""; position: absolute; inset: 0;
	background: linear-gradient(180deg, rgba(16, 19, 20, 0) 35%, rgba(16, 19, 20, .88) 100%);
	transition: background 400ms ease;
}
.tile__body { position: absolute; inset: auto 0 0 0; z-index: 1; display: grid; gap: 8px; padding: 22px; }
.tile__title { font-size: 1.2rem; font-weight: 650; letter-spacing: -.02em; line-height: 1.2; }
.tile__copy { color: #dfe3df; font-size: 14px; line-height: 1.5; max-height: 0; opacity: 0; overflow: hidden; transition: max-height 500ms var(--ease, ease), opacity 400ms ease; }
.tile:hover img, .tile:focus-visible img { transform: scale(1.06); }
.tile:hover::after, .tile:focus-visible::after { background: linear-gradient(180deg, rgba(16, 19, 20, .1) 10%, rgba(16, 19, 20, .92) 100%); }
.tile:hover .tile__copy, .tile:focus-visible .tile__copy { max-height: 8em; opacity: 1; }
/* Touch screens have no hover, so the description is always shown there. */
@media (hover: none) { .tile__copy { max-height: none; opacity: 1; } }

/* 404 and 410 */
.notice { padding: 120px 0; }
.notice__inner { max-width: 720px; }
.notice h1 { font-size: clamp(2.4rem, 5vw, 4rem); }

/* Pages written in the editor */
.prose-page { padding: 80px 0; }
.prose { max-width: 760px; }
.prose h1 { margin-bottom: 24px; font-size: clamp(2.2rem, 4.5vw, 3.4rem); }
.prose a { color: var(--blue); }

/* Footer: matches the ctronloop.com public footer */
.site-footer { border-top: 1px solid var(--footer-line); background: #fff; }
.site-footer__inner { display: flex; flex-direction: column; gap: 32px; padding: 40px 0; }
.site-footer__top { display: flex; justify-content: space-between; gap: 32px; }
.site-footer__about p { max-width: 28rem; margin: 12px 0 0; color: var(--footer-muted); font-size: 14px; line-height: 1.7; }
.site-footer__cols { display: grid; grid-template-columns: auto auto auto; gap: 24px 56px; font-size: 14px; }
.site-footer__cols > div:nth-child(2) ul { columns: 2; column-gap: 40px; }
.site-footer__cols li { break-inside: avoid; }

.social { display: flex; gap: 10px; margin: 20px 0 0; padding: 0; list-style: none; }
.social li { margin: 0; }
.social a {
	display: grid; place-items: center; width: 38px; height: 38px;
	border: 1px solid var(--footer-line); border-radius: 50%; color: var(--footer-muted);
	transition: color 180ms ease, border-color 180ms ease, background 180ms ease, transform 180ms ease;
}
.social a:hover { color: #fff; border-color: var(--ink); background: var(--ink); transform: translateY(-2px); }
.site-footer__heading { margin: 0 0 12px; color: var(--footer-ink); font-weight: 600; }
.site-footer ul { margin: 0; padding: 0; list-style: none; }
.site-footer li { margin-bottom: 8px; }
.site-footer li a { color: var(--footer-muted); text-decoration: none; }
.site-footer li a:hover { color: var(--footer-ink); }
.site-footer__bottom { padding-top: 24px; border-top: 1px solid var(--footer-line); color: #736d64; font-size: 12px; }
.site-footer__bottom p { margin: 0; }

@media (max-width: 960px) {
	.hero__inner, .split, .steps { grid-template-columns: 1fr; }
	.tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.site-footer__cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.site-footer__cols > div:nth-child(2) { grid-column: 1 / -1; order: 3; }
	.hero { padding: 48px 0 56px; }
	.cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.site-footer__top { flex-direction: column; }
}

@media (max-width: 640px) {
	.wrap { width: calc(100% - 32px); }
	.hero__inner { gap: 40px; }
	.status { left: 10px; bottom: 10px; }
	.tiles { gap: 10px; }
	.tile__body { padding: 14px; }
	.tile__title { font-size: 1rem; }
	.tile__copy { font-size: 13px; }
	.cta { padding: 80px 0; background: linear-gradient(180deg, rgba(16, 19, 20, .9), rgba(16, 19, 20, .78)), var(--cta-image, none) center / cover no-repeat, var(--ink); }
	.site-nav a:not(.button) { display: none; }
	.section { padding: 64px 0; }
	.cards { grid-template-columns: 1fr; }
	/* Product and Policies side by side, Resources full width underneath in two columns,
	   so the footer is a short block on a phone instead of one long list. */
	.site-footer__cols { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 20px; }
	.site-footer__cols > div:nth-child(2) { grid-column: 1 / -1; order: 3; }
	.site-footer__cols > div:nth-child(2) ul { columns: 2; column-gap: 20px; }
	.site-footer__cols li { break-inside: avoid; }
	.site-footer__inner { gap: 28px; padding: 32px 0; }
	.button { width: 100%; justify-content: center; }
	.site-nav .button { width: auto; }
}

/* ------------------------------------------------------------------------------------------
   Motion. Hero entrance runs on CSS alone; scroll reveals and the strike-through wait for the
   `motion` class that main.js adds, so without JavaScript nothing starts hidden. Reduced
   motion turns all of it off.
   ---------------------------------------------------------------------------------------- */

:root { --ease: cubic-bezier(.22, 1, .36, 1); }

/* Status chip over the hero dashboard */
.status {
	position: absolute; left: 18px; bottom: 18px;
	display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 6px 10px;
	min-width: 220px; padding: 12px 14px;
	border: 1px solid var(--line); border-radius: 10px;
	background: rgba(255, 255, 255, .94); box-shadow: 0 18px 40px -20px rgba(16, 19, 20, .45);
	font-size: 13px; font-weight: 600;
	--progress: 1;
}
.status__dot { width: 8px; height: 8px; border-radius: 50%; background: #e2a400; box-shadow: 0 0 0 4px rgba(226, 164, 0, .15); }
.status.is-done .status__dot { background: #2b9a55; box-shadow: 0 0 0 4px rgba(43, 154, 85, .15); }
.status__bar { grid-column: 1 / -1; height: 3px; overflow: hidden; border-radius: 99px; background: #e7e9e4; }
.status__bar i { display: block; height: 100%; background: var(--blue); transform-origin: left; transform: scaleX(var(--progress)); transition: transform 600ms var(--ease); }

.button span[aria-hidden], .text-link span[aria-hidden], .card__more span[aria-hidden] { display: inline-block; transition: transform 200ms var(--ease); }
.button:hover span[aria-hidden], .text-link:hover span[aria-hidden], .card:hover .card__more span[aria-hidden] { transform: translateX(4px); }

@keyframes ctron-rise { from { opacity: 0; transform: translate3d(0, 22px, 0); } to { opacity: 1; transform: none; } }
@keyframes ctron-shot { from { opacity: 0; transform: translate3d(0, 36px, 0) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes ctron-glow { from { opacity: .55; transform: scale(.92); } to { opacity: 1; transform: scale(1.05); } }

@media (prefers-reduced-motion: no-preference) {
	.hero__copy > * { animation: ctron-rise 800ms var(--ease) backwards; }
	.hero__copy > :nth-child(2) { animation-delay: 80ms; }
	.hero__copy > :nth-child(3) { animation-delay: 160ms; }
	.hero__copy > :nth-child(4) { animation-delay: 240ms; }
	.hero__copy > :nth-child(5) { animation-delay: 300ms; }
	.hero__shot { animation: ctron-shot 1000ms var(--ease) 200ms backwards; }

	.hero::before {
		content: ""; position: absolute; inset: -30% auto auto -15%; width: 760px; height: 760px; border-radius: 50%;
		background: radial-gradient(circle, rgba(216, 255, 98, .3), transparent 66%);
		pointer-events: none; animation: ctron-glow 6s ease-in-out infinite alternate;
	}
	.hero__inner { position: relative; }

	.motion [data-reveal] {
		opacity: 0; transform: translate3d(0, 28px, 0);
		transition: opacity 800ms var(--ease), transform 800ms var(--ease);
		transition-delay: calc(var(--i, 0) * 90ms);
	}
	.motion [data-reveal].is-in { opacity: 1; transform: none; }

	.motion .compare__old li span { background-size: 0% 1.5px; transition: background-size 500ms var(--ease) calc(400ms + var(--i, 0) * 180ms), color 400ms ease calc(400ms + var(--i, 0) * 180ms); color: var(--ink); }
	.motion .is-in .compare__old li span { background-size: 100% 1.5px; color: #8a8f8a; }
	.motion .compare__new { transform: scale(.96); opacity: 0; transition: transform 600ms var(--ease) 1.5s, opacity 600ms var(--ease) 1.5s; }
	.motion .is-in .compare__new { transform: none; opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	.button, .card, .status__bar i, .tile img, .tile__copy, .social a { transition: none; }
	.photo img { transform: none; }
	.button:hover, .card:hover { transform: none; }
}
