/* ==========================================================================
   Thukal — thukal (துகள்) is Tamil for "particle".
   The logo is a particle field coalescing into a T; the whole page is built
   from that idea. The brand gradient earns its keep in exactly three places:
   the hero field, the rail rules, and the single primary action.
   ========================================================================== */

:root {
	/* Ink — near-black with a violet cast, matching the cool end of the mark */
	--ink:      #16131F;
	--ink-2:    #4A4458;
	--ink-3:    #736C85;  /* 4.9:1 on white — safe for the small label text */

	/* Ground */
	--paper:    #FFFFFF;
	--mist:     #F7F5FA;
	--line:     #E8E4EE;

	/* Pulled straight from logo.png */
	--violet:   #5B4FC7;
	--magenta:  #D6339B;
	--amber:    #F5A623;
	--grad: linear-gradient(100deg, var(--violet) 0%, var(--magenta) 52%, var(--amber) 100%);

	/* Darker magenta for text-sized hover states (5.8:1 on white) */
	--magenta-deep: #B62A83;
	/* Lifted variant for gradient text on the dark contact band — the stock
	   violet only reaches 3:1 against --ink, which large type barely passes. */
	--grad-bright: linear-gradient(100deg, #8B7FF0 0%, #F05CB8 50%, #FFC145 100%);

	/* Type */
	--display: "Bricolage Grotesque", ui-sans-serif, system-ui, sans-serif;
	--body: "Instrument Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;

	/* Measure */
	--wrap: 1140px;
	--gutter: clamp(1.25rem, 5vw, 3rem);
	--rail-w: 190px;
	--band-y: clamp(4.5rem, 9vw, 8rem);
}

/* ── reset ─────────────────────────────────────────────────────────────── */

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

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

/* Clear the sticky masthead when jumping to an anchor */
section[id] { scroll-margin-top: 5rem; }

body {
	margin: 0;
	background: var(--paper);
	color: var(--ink);
	font-family: var(--body);
	font-size: 1.0625rem;
	line-height: 1.62;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	text-rendering: optimizeLegibility;
}

h1, h2, h3 { margin: 0; font-family: var(--display); font-weight: 500; line-height: 1.1; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
img { max-width: 100%; height: auto; display: block; }

a { color: inherit; text-decoration: none; }

:focus-visible {
	outline: 2px solid var(--magenta);
	outline-offset: 3px;
	border-radius: 3px;
}

.skip {
	position: absolute;
	left: -9999px;
	top: 0;
	padding: .75rem 1rem;
	background: var(--ink);
	color: #fff;
	z-index: 100;
}
.skip:focus { left: .5rem; top: .5rem; }

/* ── masthead ──────────────────────────────────────────────────────────── */

.masthead {
	position: sticky;
	top: 0;
	z-index: 50;
	background: rgba(255, 255, 255, .82);
	backdrop-filter: saturate(160%) blur(12px);
	-webkit-backdrop-filter: saturate(160%) blur(12px);
	border-bottom: 1px solid transparent;
	transition: border-color .25s ease;
}
.masthead.is-stuck { border-bottom-color: var(--line); }

.masthead-inner {
	max-width: var(--wrap);
	margin-inline: auto;
	padding: .9rem var(--gutter);
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
}

.brand {
	display: inline-flex;
	align-items: center;
	gap: .55rem;
	font-family: var(--display);
	font-weight: 600;
	font-size: 1.0625rem;
	letter-spacing: -.02em;
}
.brand img { width: 34px; height: auto; }

.nav {
	display: flex;
	align-items: center;
	gap: clamp(1rem, 3vw, 1.9rem);
	font-size: .9375rem;
}
.nav a { color: var(--ink-2); transition: color .18s ease; }
.nav a:hover { color: var(--ink); }

/* The tel: link is the one nav item worth keeping on a phone — it survives
   the small-screen rule below, shortened to "Call". */
.nav-tel .tel-short { display: none; }

.nav a.nav-cta {
	color: var(--ink);
	font-weight: 500;
	padding: .45rem .95rem;
	border: 1px solid var(--line);
	border-radius: 999px;
	transition: border-color .18s ease, background-color .18s ease, color .18s ease;
}
.nav a.nav-cta:hover { border-color: var(--ink); background: var(--ink); color: #fff; }

/* ── hero ──────────────────────────────────────────────────────────────── */

.hero {
	position: relative;
	overflow: hidden;
	padding: clamp(4rem, 11vw, 9rem) var(--gutter) clamp(4.5rem, 10vw, 8rem);
}

.hero-inner {
	position: relative;
	z-index: 2;
	max-width: var(--wrap);
	margin-inline: auto;
}

.hero-field {
	position: absolute;
	inset: 0 auto 0 0;
	width: min(760px, 78%);
	pointer-events: none;
	z-index: 1;
	opacity: .5;
	-webkit-mask-image: linear-gradient(100deg, #000 0%, #000 45%, transparent 88%);
	mask-image: linear-gradient(100deg, #000 0%, #000 45%, transparent 88%);
}
.hero-field svg { width: 100%; height: 100%; }

.eyebrow {
	font-size: .75rem;
	font-weight: 500;
	letter-spacing: .16em;
	text-transform: uppercase;
	color: var(--ink-3);
	margin-bottom: 1.5rem;
}

.hero-title {
	font-size: clamp(2.9rem, 8.2vw, 5.5rem);
	font-weight: 500;
	letter-spacing: -.035em;
	line-height: .98;
	max-width: 15ch;
}
.hero-title em {
	font-style: normal;
	background: var(--grad);
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
}

.hero-lede {
	margin-top: 1.6rem;
	max-width: 46ch;
	font-size: clamp(1.0625rem, 1.6vw, 1.25rem);
	color: var(--ink-2);
}

.hero-actions {
	margin-top: 2.4rem;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 1.4rem;
}

/* ── buttons ───────────────────────────────────────────────────────────── */

.btn {
	display: inline-block;
	padding: .85rem 1.7rem;
	border-radius: 999px;
	background: var(--grad);
	background-size: 180% 100%;
	background-position: 0% 50%;
	color: #fff;
	font-weight: 500;
	font-size: .9375rem;
	transition: background-position .5s ease, transform .2s ease;
}
.btn:hover { background-position: 100% 50%; transform: translateY(-1px); }

.btn-quiet {
	font-size: .9375rem;
	color: var(--ink-2);
	padding-bottom: 2px;
	border-bottom: 1px solid var(--line);
	transition: color .18s ease, border-color .18s ease;
}
.btn-quiet:hover { color: var(--ink); border-bottom-color: var(--ink); }

/* ── bands & rail ──────────────────────────────────────────────────────── */

.band { padding: var(--band-y) var(--gutter); }
.band-mist { background: var(--mist); }

.band-inner {
	max-width: var(--wrap);
	margin-inline: auto;
	display: grid;
	gap: clamp(2rem, 5vw, 4.5rem);
}

.rail-label {
	font-family: var(--body);
	font-size: .75rem;
	font-weight: 600;
	letter-spacing: .16em;
	text-transform: uppercase;
	color: var(--ink);
}
.rail-label::before {
	content: "";
	display: block;
	width: 56px;
	height: 2px;
	margin-bottom: 1.1rem;
	border-radius: 2px;
	background: var(--grad);
}

.rail-note {
	margin-top: .8rem;
	font-size: .875rem;
	color: var(--ink-3);
	max-width: 24ch;
}

@media (min-width: 900px) {
	.band-inner { grid-template-columns: var(--rail-w) minmax(0, 1fr); }
	.rail { position: sticky; top: 5.5rem; align-self: start; }
}

/* ── flagship ──────────────────────────────────────────────────────────── */

.flagship {
	display: grid;
	gap: clamp(2rem, 4vw, 3.25rem);
	align-items: start;
}
/* Two columns only once there is actually a .shot to fill the second one —
   otherwise the copy would be squeezed into half a screen beside nothing.
   Browsers without :has() simply keep the single-column stack. The 1100px
   floor is later than the 900px rail breakpoint: the rail takes 190px first. */
@media (min-width: 1100px) {
	.flagship:has(.shot) { grid-template-columns: minmax(0, 1fr) minmax(0, 19rem); }
}

.flagship-copy { display: grid; gap: 1.1rem; }

.flagship-name {
	font-size: clamp(2.1rem, 5.5vw, 3.1rem);
	letter-spacing: -.035em;
	line-height: 1.05;
}

.flagship-lede {
	font-size: clamp(1.0625rem, 1.9vw, 1.25rem);
	color: var(--ink-2);
	max-width: 54ch;
}

/* Capabilities. The gradient shows up here only as the 6px marker — the same
   restraint as .rail-label::before and .card::before. */
.caps {
	display: grid;
	gap: .7rem 2rem;
	padding-top: 1.45rem;
	border-top: 1px solid var(--line);
}
@media (min-width: 720px) {
	.caps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.caps li {
	position: relative;
	padding-left: 1.15rem;
	font-size: .9688rem;
	color: var(--ink-2);
}
.caps li::before {
	content: "";
	position: absolute;
	left: 0;
	top: .55rem;
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: var(--grad);
}

.flagship-who {
	padding-top: 1.45rem;
	border-top: 1px solid var(--line);
	color: var(--ink-3);
	font-size: .9688rem;
	max-width: 56ch;
}

.flagship-actions {
	margin-top: .4rem;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 1.4rem;
}

/* Frame for the product shot — borrows the card's border and radius so the
   flagship and the cards below it read as one family. */
.shot {
	border: 1px solid var(--line);
	border-radius: 14px;
	overflow: hidden;
	background: var(--mist);
}

/* ── work ──────────────────────────────────────────────────────────────── */

.work {
	display: grid;
	gap: 1.25rem;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
}

.card {
	position: relative;
	overflow: hidden;
	background: var(--paper);
	border: 1px solid var(--line);
	border-radius: 14px;
	padding: 1.6rem 1.6rem 1.75rem;
	display: flex;
	flex-direction: column;
	gap: .6rem;
	transition: border-color .22s ease, transform .22s ease;
}
.card::before {
	content: "";
	position: absolute;
	inset: 0 0 auto 0;
	height: 2px;
	background: var(--grad);
	transform: scaleX(0);
	transform-origin: left;
	transition: transform .35s cubic-bezier(.2, .7, .3, 1);
}
.card:hover { border-color: #D8D2E2; transform: translateY(-2px); }
.card:hover::before { transform: scaleX(1); }

.tag {
	font-size: .6875rem;
	font-weight: 600;
	letter-spacing: .12em;
	text-transform: uppercase;
	color: var(--ink-3);
}
.tag-product {
	background: var(--grad);
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
}

/* Status, not a badge: no gradient clip, so an unfinished product cannot
   out-shout a shipped one. */
.tag-soon { color: var(--ink-3); }

.card h3 { font-size: 1.3rem; letter-spacing: -.02em; }
.card p { color: var(--ink-2); font-size: .9688rem; }

.card-link {
	margin-top: auto;
	padding-top: .9rem;
	font-size: .875rem;
	color: var(--ink-2);
	transition: color .18s ease;
}
.card-link::after { content: " →"; }
.card-link:hover { color: var(--magenta-deep); }

/* Stands in for .card-link where there is nowhere to send people yet. Same
   margin-top: auto, so card footers still line up across the grid. */
.card-note {
	margin-top: auto;
	padding-top: .9rem;
	font-size: .875rem;
	color: var(--ink-3);
}
.card-note a { border-bottom: 1px solid var(--line); }
.card-note a:hover { color: var(--magenta-deep); border-bottom-color: currentColor; }

/* ── team ──────────────────────────────────────────────────────────────── */

.team-lede {
	color: var(--ink-2);
	font-size: clamp(1.0625rem, 1.5vw, 1.1875rem);
	max-width: 52ch;
	margin-bottom: clamp(2rem, 4vw, 3rem);
}

.team {
	display: grid;
	gap: clamp(1.75rem, 3vw, 2.5rem) 1.25rem;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 170px), 1fr));
}

.member { display: grid; gap: .35rem; justify-items: start; }
.member h3 { font-size: 1.0625rem; letter-spacing: -.015em; margin-top: .55rem; }
.member p { font-size: .875rem; color: var(--ink-3); }

/* Each person takes a different slice of the same gradient — one spectrum,
   distinct particles. --pos is set per member in the markup. */
.avatar {
	width: 72px;
	height: 72px;
	border-radius: 50%;
	background: var(--grad);
	background-size: 600% 100%;
	background-position: var(--pos, 50%) 50%;
	color: #fff;
	display: grid;
	place-items: center;
	font-family: var(--display);
	font-size: 1.75rem;
	font-weight: 500;
	line-height: 1;
	transition: transform .25s cubic-bezier(.2, .7, .3, 1);
}
.member:hover .avatar { transform: translateY(-3px); }

.avatar-img {
	width: 72px;
	height: 72px;
	border-radius: 50%;
	object-fit: cover;
}

.avatar-more {
	background: none;
	border: 1px dashed var(--line);
	color: var(--ink-3);
	font-size: 1.5rem;
}

.member-more h3 { color: var(--ink-2); }
.member-more p { max-width: 22ch; }

/* ── callout ───────────────────────────────────────────────────────────── */

.callout {
	border: 1px solid var(--line);
	border-radius: 16px;
	padding: clamp(1.75rem, 4vw, 2.75rem);
	display: grid;
	gap: 1rem;
	justify-items: start;
}
.callout h3 { font-size: clamp(1.4rem, 2.6vw, 1.9rem); letter-spacing: -.025em; }
.callout p { color: var(--ink-2); max-width: 56ch; }
.callout .btn { margin-top: .5rem; }

/* ── contact ───────────────────────────────────────────────────────────── */

.contact {
	background: var(--ink);
	color: #fff;
	padding: clamp(5rem, 11vw, 9rem) var(--gutter);
	text-align: center;
}
.contact-inner { max-width: 46rem; margin-inline: auto; }
.contact .eyebrow { color: rgba(255, 255, 255, .55); }

.contact-mail {
	display: inline-block;
	font-family: var(--display);
	font-size: clamp(1.9rem, 6.2vw, 4rem);
	font-weight: 500;
	letter-spacing: -.035em;
	line-height: 1.1;
	background: var(--grad-bright);
	background-size: 200% 100%;
	background-position: 0% 50%;
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
	transition: background-position .6s ease;
	word-break: break-word;
}
.contact-mail:hover { background-position: 100% 50%; }

.contact-phone {
	margin-top: .85rem;
	font-size: 1.0625rem;
	color: rgba(255, 255, 255, .55);
}
.contact-phone a { border-bottom: 1px solid rgba(255, 255, 255, .22); }
.contact-phone a:hover { color: #fff; border-bottom-color: rgba(255, 255, 255, .5); }

.contact-note {
	margin-top: 1.5rem;
	color: rgba(255, 255, 255, .6);
	font-size: 1rem;
}

/* ── footer ────────────────────────────────────────────────────────────── */

/* A grid, deliberately. The old flex + space-between distributed whatever was
   left over, so adding a fourth item scattered the row and stretched the
   meaning line to the far edge. */
.footer {
	padding: clamp(3rem, 6vw, 4.25rem) var(--gutter) 1.9rem;
	border-top: 1px solid var(--line);
}
.footer-inner {
	max-width: var(--wrap);
	margin-inline: auto;
	display: grid;
	gap: 2.25rem;
	font-size: .875rem;
	color: var(--ink-3);
}
/* The brand column takes the extra width; the two link columns stay equal. */
@media (min-width: 760px) {
	.footer-inner {
		grid-template-columns: minmax(0, 1.7fr) repeat(2, minmax(0, 1fr));
		gap: 2rem 3rem;
	}
}

.footer-brand { display: grid; gap: .85rem; align-content: start; }

.footer-name {
	display: inline-flex;
	align-items: center;
	gap: .5rem;
	font-family: var(--display);
	font-weight: 600;
	font-size: 1rem;
	color: var(--ink);
}
.footer-name img { width: 26px; height: auto; }

.footer-meaning { max-width: 36ch; }
.footer-meaning em { font-style: normal; color: var(--ink-2); }

.footer-col {
	display: grid;
	gap: .5rem;
	align-content: start;
	justify-items: start;
}
/* Labelled like .tag and .rail-label, so the footer belongs to the same
   typographic system as the rest of the page. */
.footer-head {
	margin-bottom: .2rem;
	font-size: .6875rem;
	font-weight: 600;
	letter-spacing: .12em;
	text-transform: uppercase;
	color: var(--ink-2);
}
.footer-col a { transition: color .18s ease; }
.footer-col a:hover { color: var(--ink); }

.footer-base {
	max-width: var(--wrap);
	margin: clamp(2.25rem, 4.5vw, 3rem) auto 0;
	padding-top: 1.6rem;
	border-top: 1px solid var(--line);
	font-size: .8125rem;
	color: var(--ink-3);
}

/* ── particles (the signature) ─────────────────────────────────────────── */

#particles .dot-wrap {
	transform: translate(var(--dx), var(--dy)) scale(.2);
	opacity: 0;
	transition:
		transform 1.5s cubic-bezier(.16, 1, .3, 1) var(--delay),
		opacity .9s ease var(--delay);
}
#particles.is-settled .dot-wrap {
	transform: translate(0, 0) scale(1);
	opacity: 1;
}
/* Once the entrance is done, the script drives .dot-wrap directly (cursor
   push), so the settle transition has to get out of the way. */
#particles.is-live .dot-wrap { transition: none; }

#particles circle {
	transform-box: fill-box;
	transform-origin: center;
	animation: drift var(--dur) ease-in-out var(--ddelay) infinite alternate;
}

@keyframes drift {
	from { transform: translate(0, 0) scale(1); }
	to   { transform: translate(var(--driftx), var(--drifty)) scale(var(--scale)); }
}

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	#particles .dot-wrap { transform: none; opacity: 1; transition: none; }
	#particles circle { animation: none; }
	*, *::before, *::after {
		animation-duration: .01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: .01ms !important;
	}
}

/* ── small screens ─────────────────────────────────────────────────────── */

@media (max-width: 640px) {
	.hero-field { width: 100%; opacity: .3; }
	.nav a:not(.nav-cta):not(.nav-tel) { display: none; }
	.nav-tel .tel-full { display: none; }
	.nav-tel .tel-short { display: inline; }
}
