﻿/* ==================================================================
   public.css  —  CreatorWebServices.com  (CWS)
   GOES IN: /Public/assets/css/public.css
   ------------------------------------------------------------------
   The PUBLIC SITE component layer. Consumes tokens from theme.css
   (loaded first). Defines the look of: header/nav, hero, buttons,
   section rhythm, gallery cards (the centerpiece), the inquiry form,
   and the footer.

   PRINCIPLES
     - Black canvas. Elevation = subtle border + colored glow, never
       a drop-shadow (shadows vanish on black).
     - Cyan/blue = interactive. Red = high-intent only. (per theme.css)
     - Mobile-first; the two breakpoints in theme.css scale type/space.
     - Bootstrap 5.3 sits underneath; these are our own components, not
       overrides of Bootstrap internals.
   ================================================================== */


/* ============================ HEADER / NAV ============================ */

.site-header {
	position: sticky;
	top: 0;
	z-index: var(--z-header);
	height: var(--header-h);
	display: flex;
	align-items: center;
	background: color-mix(in srgb, var(--bg-canvas) 82%, transparent);
	-webkit-backdrop-filter: blur(10px);
	backdrop-filter: blur(10px);
	border-bottom: 1px solid var(--border-subtle);
}

.site-header__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	width: 100%;
}

/* Logo lockup — inline SVG so --logo-structural themes it */
.site-header .cws-logo {
	height: 56px;
	width: auto;
	display: block;
}

@media (min-width: 768px) {
	.site-header .cws-logo {
		height: 64px;
	}
}

/* Primary nav — hidden on mobile (toggles into the drawer) */
.site-nav {
	display: none;
	align-items: center;
	gap: var(--space-5);
}

	.site-nav a {
		color: var(--text-secondary);
		font-size: var(--fs-sm);
		font-weight: var(--fw-medium);
		letter-spacing: 0.01em;
		padding: var(--space-2) 0;
		position: relative;
		transition: color var(--dur-fast) var(--ease-out);
	}

		.site-nav a:hover,
		.site-nav a[aria-current="page"] {
			color: var(--text-primary);
		}
		/* animated underline in brand blue */
		.site-nav a::after {
			content: "";
			position: absolute;
			left: 0;
			right: 100%;
			bottom: -2px;
			height: 2px;
			background: var(--accent);
			transition: right var(--dur-base) var(--ease-out);
		}

		.site-nav a:hover::after,
		.site-nav a[aria-current="page"]::after {
			right: 0;
		}

/* Mobile menu button */
.nav-toggle {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	background: transparent;
	border: 1px solid var(--border-default);
	border-radius: var(--radius-md);
	color: var(--text-primary);
	cursor: pointer;
}

	.nav-toggle:hover {
		border-color: var(--border-strong);
	}

/* Slide-in mobile drawer */
.nav-drawer {
	position: fixed;
	inset: 0 0 0 auto;
	width: min(78vw, 320px);
	background: var(--bg-surface);
	border-left: 1px solid var(--border-default);
	transform: translateX(100%);
	transition: transform var(--dur-base) var(--ease-out);
	z-index: var(--z-modal); /* above the scrim (which is at --z-overlay) */
	padding: var(--space-6) var(--space-5);
	display: flex;
	flex-direction: column;
	gap: var(--space-2);
}

	.nav-drawer.is-open {
		transform: translateX(0);
	}

	.nav-drawer a {
		color: var(--text-primary);
		font-size: var(--fs-lg);
		font-weight: var(--fw-medium);
		padding: var(--space-3) 0;
		border-bottom: 1px solid var(--border-subtle);
	}

.nav-scrim {
	position: fixed;
	inset: 0;
	background: #00000099;
	opacity: 0;
	visibility: hidden;
	transition: opacity var(--dur-base) var(--ease-out);
	z-index: var(--z-overlay); /* below the drawer */
}

	.nav-scrim.is-open {
		opacity: 1;
		visibility: visible;
	}

@media (min-width: 768px) {
	.site-nav {
		display: flex;
	}

	.nav-toggle {
		display: none;
	}
}


/* ============================== BUTTONS ============================== */

a.btn-cws,
button.btn-cws,
.btn-cws {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: var(--space-2, 0.5rem);
	font-family: var(--font-body);
	font-size: var(--fs-base, 1rem);
	font-weight: var(--fw-medium, 500);
	line-height: 1.2;
	white-space: nowrap;
	padding: var(--space-3, 0.75rem) var(--space-5, 1.5rem);
	border-radius: var(--radius-pill, 999px);
	border: 1px solid transparent;
	cursor: pointer;
	text-decoration: none !important;
	vertical-align: middle;
	transition: background var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out), box-shadow var(--dur-base) var(--ease-out), transform var(--dur-fast) var(--ease-out);
}

	.btn-cws:active {
		transform: translateY(1px);
	}

/* Primary = high intent => the brand RED (used sparingly) */
.btn-cws--primary {
	background: var(--cta);
	color: var(--brand-paper);
}

	.btn-cws--primary:hover {
		background: var(--cta-hover);
		box-shadow: var(--glow-red);
		color: var(--brand-paper);
	}

/* Secondary = everyday interactive => brand BLUE outline */
.btn-cws--ghost {
	background: transparent;
	color: var(--text-primary);
	border-color: var(--border-strong);
}

	.btn-cws--ghost:hover {
		border-color: var(--accent);
		color: var(--accent-hover);
		box-shadow: var(--glow-blue);
	}

.btn-cws--lg {
	font-size: var(--fs-lg);
	padding: var(--space-4) var(--space-6);
}

.btn-cws--block {
	width: 100%;
}


/* ============================ SECTION RHYTHM ============================ */

.section {
	padding-block: var(--space-8);
}

.section--tight {
	padding-block: var(--space-7);
}

.section + .section {
	padding-top: 0;
}

.section__head {
	max-width: 60ch;
	margin-inline: auto;
	margin-bottom: var(--space-6);
	text-align: center;
}

	.section__head .eyebrow {
		display: block;
		margin-bottom: var(--space-2);
	}

.section__title {
	margin: 0 0 var(--space-3);
}

.section__lead {
	color: var(--text-secondary);
	font-size: var(--fs-lg);
	margin: 0 auto;
	max-width: 56ch;
}

@media (min-width: 768px) {
	.section {
		padding-block: var(--space-9);
	}
}


/* ================================ HERO ================================ */
/* Type-led hero. The "doorway" thesis up front, the brand gradient on
   the single hero word, ambient brand glow behind — no stock imagery. */

.hero {
	position: relative;
	overflow: hidden;
	padding-block: var(--space-8) var(--space-9);
}
	/* ambient glow blobs (decorative, behind content) */
	.hero::before,
	.hero::after {
		content: "";
		position: absolute;
		border-radius: 50%;
		filter: blur(80px);
		opacity: 0.18;
		z-index: 0;
		pointer-events: none;
	}

	.hero::before {
		width: 380px;
		height: 380px;
		background: var(--brand-blue);
		top: -120px;
		left: -80px;
	}

	.hero::after {
		width: 320px;
		height: 320px;
		background: var(--brand-red);
		bottom: -120px;
		right: -60px;
	}

.hero__inner {
	position: relative;
	z-index: 1;
	max-width: 30ch;
	margin-inline: auto;
	text-align: center;
}

.hero__eyebrow {
	margin-bottom: var(--space-3);
}

.hero__title {
	font-size: var(--fs-4xl);
	line-height: var(--lh-tight);
	letter-spacing: var(--tracking-tight);
	margin: 0 auto var(--space-4);
	max-width: 16ch;
}

.hero__sub {
	color: var(--text-secondary);
	font-size: var(--fs-lg);
	max-width: 48ch;
	margin: 0 auto var(--space-6);
}

.hero__actions {
	display: flex;
	flex-wrap: wrap;
	gap: var(--space-3);
	justify-content: center;
}

@media (min-width: 768px) {
	.hero__inner {
		max-width: 46ch;
	}

	.hero::before {
		width: 560px;
		height: 560px;
	}

	.hero::after {
		width: 480px;
		height: 480px;
	}
}


/* ====================== GALLERY (THE CENTERPIECE) ====================== */
/* This is the proof. Cards get the most polish: cover screenshot,
   capability chips, hover lift via border + blue glow. */

.gallery-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: var(--space-5);
}

@media (min-width: 576px) {
	.gallery-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (min-width: 992px) {
	.gallery-grid {
		grid-template-columns: repeat(3, 1fr);
	}
}

/* Filter pills above the grid */
.gallery-filter {
	display: flex;
	flex-wrap: wrap;
	gap: var(--space-2);
	margin-bottom: var(--space-6);
}

.filter-pill {
	font-size: var(--fs-sm);
	font-weight: var(--fw-medium);
	color: var(--text-secondary);
	background: var(--bg-surface-2);
	border: 1px solid var(--border-subtle);
	border-radius: var(--radius-pill);
	padding: var(--space-2) var(--space-4);
	cursor: pointer;
	transition: all var(--dur-fast) var(--ease-out);
}

	.filter-pill:hover {
		color: var(--text-primary);
		border-color: var(--border-default);
	}

	.filter-pill.is-active {
		color: var(--text-on-accent);
		background: var(--accent);
		border-color: var(--accent);
	}

.gallery-card {
	display: flex;
	flex-direction: column;
	background: var(--bg-surface);
	border: 1px solid var(--border-subtle);
	border-radius: var(--radius-lg);
	overflow: hidden;
	text-decoration: none;
	transition: border-color var(--dur-base) var(--ease-out), box-shadow var(--dur-base) var(--ease-out), transform var(--dur-base) var(--ease-out);
}

	.gallery-card:hover {
		border-color: var(--accent);
		box-shadow: var(--glow-blue);
		transform: translateY(-4px);
	}

.gallery-card__media {
	position: relative;
	aspect-ratio: 16 / 10;
	background: var(--bg-surface-3);
	overflow: hidden;
}

	.gallery-card__media img {
		width: 100%;
		height: 100%;
		object-fit: cover;
		display: block;
		transition: transform var(--dur-slow) var(--ease-out);
	}

.gallery-card:hover .gallery-card__media img {
	transform: scale(1.04);
}

/* "Featured" ribbon — red, high-intent */
.gallery-card__badge {
	position: absolute;
	top: var(--space-3);
	left: var(--space-3);
	font-size: var(--fs-xs);
	font-weight: var(--fw-medium);
	letter-spacing: var(--tracking-wide);
	text-transform: uppercase;
	color: var(--brand-paper);
	background: var(--cta);
	padding: var(--space-1) var(--space-3);
	border-radius: var(--radius-pill);
}

.gallery-card__body {
	padding: var(--space-4);
	display: flex;
	flex-direction: column;
	gap: var(--space-2);
}

.gallery-card__client {
	font-size: var(--fs-xs);
	letter-spacing: var(--tracking-wide);
	text-transform: uppercase;
	color: var(--text-tertiary);
}

.gallery-card__title {
	font-family: var(--font-display);
	font-size: var(--fs-lg);
	font-weight: var(--fw-bold);
	color: var(--text-primary);
	margin: 0;
	line-height: var(--lh-snug);
}

.gallery-card__summary {
	font-size: var(--fs-sm);
	color: var(--text-secondary);
	margin: 0;
}

/* Capability chips */
.cap-chips {
	display: flex;
	flex-wrap: wrap;
	gap: var(--space-2);
	margin-top: var(--space-2);
}

.cap-chip {
	font-size: var(--fs-xs);
	color: var(--accent);
	background: var(--accent-soft);
	border-radius: var(--radius-sm);
	padding: 2px var(--space-2);
}


/* =============================== FORM =============================== */
/* Inquiry + onboarding share these field styles. */

.field {
	margin-bottom: var(--space-4);
}

.field__label {
	display: block;
	font-size: var(--fs-sm);
	font-weight: var(--fw-medium);
	color: var(--text-primary);
	margin-bottom: var(--space-2);
}

.field__hint {
	font-size: var(--fs-xs);
	color: var(--text-tertiary);
	margin-top: var(--space-1);
}

.field__req {
	color: var(--cta);
	margin-left: 2px;
}

.input,
.textarea,
.select {
	width: 100%;
	font-family: var(--font-body);
	font-size: var(--fs-base);
	color: var(--text-primary);
	background: var(--bg-surface-3);
	border: 1px solid var(--border-default);
	border-radius: var(--radius-md);
	padding: var(--space-3) var(--space-4);
	transition: border-color var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out);
}

	.input::placeholder, .textarea::placeholder {
		color: var(--text-tertiary);
	}

	.input:focus, .textarea:focus, .select:focus {
		outline: none;
		border-color: var(--accent);
		box-shadow: 0 0 0 3px var(--accent-soft);
	}

.textarea {
	min-height: 120px;
	resize: vertical;
}

/* Field error state */
.field.is-invalid .input,
.field.is-invalid .textarea,
.field.is-invalid .select {
	border-color: var(--danger);
}

.field__error {
	display: none;
	font-size: var(--fs-xs);
	color: var(--danger);
	margin-top: var(--space-1);
}

.field.is-invalid .field__error {
	display: block;
}


/* ============================== FOOTER ============================== */

.site-footer {
	border-top: 1px solid var(--border-subtle);
	padding-block: var(--space-7) var(--space-6);
	margin-top: var(--space-9);
}

.site-footer__grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: var(--space-6);
}

.site-footer__brand .cws-logo {
	height: 48px;
	margin-bottom: var(--space-3);
}

.site-footer__tagline {
	color: var(--text-secondary);
	font-size: var(--fs-sm);
	max-width: 36ch;
}

.footer-col h4 {
	font-family: var(--font-body);
	font-size: var(--fs-xs);
	letter-spacing: var(--tracking-wide);
	text-transform: uppercase;
	color: var(--text-tertiary);
	margin-bottom: var(--space-3);
}

.footer-col a {
	display: block;
	color: var(--text-secondary);
	font-size: var(--fs-sm);
	padding: var(--space-1) 0;
}

	.footer-col a:hover {
		color: var(--text-primary);
	}

.site-footer__base {
	display: flex;
	flex-wrap: wrap;
	gap: var(--space-3);
	justify-content: space-between;
	margin-top: var(--space-6);
	padding-top: var(--space-4);
	border-top: 1px solid var(--border-subtle);
	color: var(--text-tertiary);
	font-size: var(--fs-xs);
}

@media (min-width: 768px) {
	.site-footer__grid {
		grid-template-columns: 2fr 1fr 1fr 1fr;
		gap: var(--space-7);
	}
}


/* ============================ TOAST (shared) ============================ */
.toast-stack {
	position: fixed;
	bottom: var(--space-5);
	right: var(--space-5);
	z-index: var(--z-toast);
	display: flex;
	flex-direction: column;
	gap: var(--space-2);
}

.toast {
	background: var(--bg-surface-2);
	border: 1px solid var(--border-default);
	border-left: 3px solid var(--accent);
	border-radius: var(--radius-md);
	padding: var(--space-3) var(--space-4);
	color: var(--text-primary);
	font-size: var(--fs-sm);
	box-shadow: var(--shadow-md);
	max-width: 320px;
}

.toast--ok {
	border-left-color: var(--ok);
}

.toast--error {
	border-left-color: var(--danger);
}

/* ------------------------------------------------------------------
   NEXT: Site.master (-> /Public/Site.master) wires the header (inlined
   logo + nav + drawer), the <asp:ContentPlaceHolder>, the footer, and
   the script includes (core.js, public.js) together.
   ------------------------------------------------------------------ */


/* ===================== BRAND TEXT LOCKUP (placeholder) =====================
   Temporary text-based logo until true vector art lands. The badge is a
   typographic stand-in (a "W" in a brand-blue rounded square with a red
   corner tick); swap the .brand-badge innards for inline SVG later. */

.brand-lockup {
	display: inline-flex;
	align-items: center;
	gap: var(--space-3);
	text-decoration: none;
}

.brand-badge {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	background: var(--accent);
	border-radius: var(--radius-md);
	flex: none;
	overflow: hidden;
}
	/* red corner tick echoing the mark's flag */
	.brand-badge::after {
		content: "";
		position: absolute;
		top: 0;
		right: 0;
		width: 12px;
		height: 12px;
		background: var(--cta);
		clip-path: polygon(100% 0, 0 0, 100% 100%);
	}

.brand-badge__w {
	font-family: var(--font-display);
	font-weight: var(--fw-bold);
	font-size: 20px;
	line-height: 1;
	color: var(--brand-paper);
	transform: translateY(-1px);
}

.brand-word {
	font-family: var(--font-display);
	font-weight: var(--fw-bold);
	font-size: var(--fs-xl);
	letter-spacing: var(--tracking-tight);
	color: var(--text-primary);
	white-space: nowrap;
}

.brand-word__accent {
	color: var(--accent);
}

/* footer variant: a touch smaller, stacked above the tagline */
.brand-lockup--footer {
	margin-bottom: var(--space-3);
}

	.brand-lockup--footer .brand-word {
		font-size: var(--fs-lg);
	}

@media (max-width: 380px) {
	/* tightest phones: keep the badge, hide the long wordmark */
	.site-header .brand-word {
		display: none;
	}
}


/* Gallery empty / loading state — span the full grid width so a single
   message centers instead of sitting orphaned in one grid column. */
.gallery-grid > p {
	grid-column: 1 / -1;
	text-align: center;
	padding: var(--space-7) 0;
	margin: 0;
}
