/*
Theme Name: Warmsun
Theme URI: https://warmsun.example.com
Author: Warmsun
Description: Warmsun OEM/ODM manufacturing website — WordPress implementation of the Figma Make design (eRroKKNH04iC3R94tt5hw2).
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: warmsun
Tags: business, portfolio, custom-logo, custom-menu, featured-images, translation-ready
*/

/* ==========================================================================
   1. Design tokens (mirrors the Figma `:root` variables)
   ========================================================================== */

:root {
	--orange: #f47716;
	--orange-dark: #d95d08;
	--ink: #24201e;
	--muted: #6d6762;
	--cream: #f6f3ed;
	--line: #ddd7ce;
	--white: #fff;

	--font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
	--font-serif: Georgia, "Times New Roman", serif;
}

/* ==========================================================================
   2. Base
   ========================================================================== */

* {
	box-sizing: border-box;
}

html {
	scroll-behavior: smooth;
	scroll-padding-top: 82px;
}

body {
	margin: 0;
	color: var(--ink);
	background: var(--cream);
	font-family: var(--font-sans);
	-webkit-font-smoothing: antialiased;
}

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

button {
	font: inherit;
}

img {
	max-width: 100%;
	height: auto;
}

h1,
h2 {
	margin: 0;
	font-family: var(--font-serif);
	font-weight: 400;
	line-height: 0.94;
	letter-spacing: -0.045em;
}

h1 {
	font-size: clamp(72px, 8.2vw, 132px);
}

h2 {
	font-size: clamp(48px, 5.4vw, 82px);
}

h1 em,
h2 em {
	color: var(--orange);
	font-style: normal;
	font-weight: 400;
}

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

.screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.skip-link:focus {
	position: fixed;
	top: 12px;
	left: 12px;
	z-index: 999;
	padding: 12px 20px;
	background: var(--ink);
	color: var(--white);
	font-size: 13px;
	text-transform: uppercase;
	letter-spacing: 0.08em;
}

/* ==========================================================================
   3. Header
   ========================================================================== */

.site-header {
	position: fixed;
	z-index: 20;
	top: 0;
	left: 0;
	right: 0;
	height: 82px;
	padding: 0 4vw;
	display: flex;
	align-items: center;
	background: rgba(255, 255, 255, 0.94);
	-webkit-backdrop-filter: blur(14px);
	backdrop-filter: blur(14px);
	border-bottom: 1px solid rgba(36, 32, 30, 0.08);
}

.admin-bar .site-header {
	top: 32px;
}

.brand {
	width: 156px;
	height: 62px;
	display: flex;
	align-items: center;
}

.brand img {
	display: block;
	width: 132px;
	max-height: 58px;
	object-fit: contain;
}

.nav {
	margin: auto;
	padding: 0;
	list-style: none;
	display: flex;
	gap: 34px;
	font-size: 13px;
	font-weight: 650;
	text-transform: uppercase;
	letter-spacing: 0.08em;
}

.nav li {
	display: block;
}

.nav a {
	transition: color 0.2s;
}

.nav a:hover,
.nav a:focus {
	color: var(--orange);
}

.header-cta {
	background: var(--ink);
	color: var(--white);
	padding: 15px 20px;
	font-size: 13px;
	font-weight: 700;
}

.header-cta span,
.button span,
.text-link span {
	margin-left: 16px;
}

.menu-toggle {
	display: none;
	border: 0;
	background: transparent;
	width: 42px;
	height: 42px;
	cursor: pointer;
}

.menu-toggle span {
	display: block;
	width: 24px;
	height: 2px;
	background: var(--ink);
	margin: 6px auto;
	transition: transform 0.2s, opacity 0.2s;
}

/* ==========================================================================
   4. Hero
   ========================================================================== */

.hero {
	height: min(880px, 100vh);
	min-height: 720px;
	margin-top: 82px;
	position: relative;
	color: var(--white);
	overflow: hidden;
}

.admin-bar .hero {
	margin-top: 114px;
}

.hero-photo {
	position: absolute;
	inset: 0;
	background-image: var(--hero-image, none);
	background-position: center;
	background-size: cover;
	transform: scale(1.02);
}

.hero-shade {
	position: absolute;
	inset: 0;
	background:
		linear-gradient(90deg, rgba(24, 20, 18, 0.88) 0%, rgba(24, 20, 18, 0.55) 47%, rgba(24, 20, 18, 0.12) 78%),
		linear-gradient(0deg, rgba(24, 20, 18, 0.4), transparent 55%);
}

.hero-content {
	position: relative;
	z-index: 2;
	padding: 13vh 7vw 0;
	max-width: 900px;
}

.eyebrow {
	margin: 0 0 24px;
	color: var(--orange);
	font-size: 12px;
	font-weight: 800;
	letter-spacing: 0.2em;
	text-transform: uppercase;
}

.eyebrow::before {
	content: "";
	display: inline-block;
	width: 38px;
	height: 2px;
	margin: 0 14px 4px 0;
	background: currentColor;
}

.eyebrow.light {
	color: #ff9b4f;
}

.hero-copy {
	max-width: 590px;
	margin: 34px 0;
	font-size: 18px;
	line-height: 1.65;
	color: rgba(255, 255, 255, 0.82);
}

.hero-actions {
	display: flex;
	gap: 12px;
}

.button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 54px;
	padding: 0 25px;
	font-weight: 750;
	font-size: 13px;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	transition: transform 0.2s, background 0.2s;
}

.button:hover {
	transform: translateY(-2px);
}

.button.primary {
	background: var(--orange);
	color: var(--white);
}

.button.primary:hover {
	background: var(--orange-dark);
}

.button.ghost {
	border: 1px solid rgba(255, 255, 255, 0.45);
	color: var(--white);
}

.button.white {
	background: var(--white);
	color: var(--ink);
}

.hero-stats {
	position: absolute;
	z-index: 2;
	right: 5vw;
	bottom: 0;
	display: grid;
	grid-template-columns: repeat(3, 170px);
	background: var(--cream);
	color: var(--ink);
	padding: 26px 34px;
	gap: 30px;
}

.hero-stats div {
	display: flex;
	flex-direction: column;
	border-right: 1px solid var(--line);
}

.hero-stats div:last-child {
	border: 0;
}

.hero-stats strong {
	font: 44px var(--font-serif);
	color: var(--orange);
}

.hero-stats span {
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: 0.1em;
	color: var(--muted);
}

/* ==========================================================================
   5. Sections
   ========================================================================== */

.section {
	padding: 115px 7vw;
}

.section-head {
	display: flex;
	align-items: end;
	justify-content: space-between;
	gap: 50px;
	margin-bottom: 55px;
}

.section-head > p {
	width: 360px;
	color: var(--muted);
	font-size: 16px;
	line-height: 1.7;
}

/* Intro ------------------------------------------------------------------ */

.intro {
	display: grid;
	grid-template-columns: 1.1fr 0.9fr;
	gap: 10vw;
}

.intro-copy {
	padding-top: 46px;
}

.intro-copy p {
	max-width: 610px;
	font-size: 17px;
	line-height: 1.8;
	color: var(--muted);
}

.text-link {
	display: inline-block;
	margin-top: 22px;
	padding-bottom: 8px;
	border-bottom: 2px solid var(--orange);
	font-size: 13px;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: 0.08em;
}

/* Products --------------------------------------------------------------- */

.products {
	background: var(--white);
}

.product-grid {
	display: grid;
	grid-template-columns: repeat(5, 1fr);
	gap: 12px;
}

.product-card {
	position: relative;
	height: 475px;
	overflow: hidden;
	color: var(--white);
	display: block;
}

.product-card img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.55s;
	filter: saturate(0.75);
}

.product-card:hover img,
.product-card:focus-within img {
	transform: scale(1.05);
}

.product-overlay {
	position: absolute;
	inset: 0;
	background: linear-gradient(0deg, rgba(24, 20, 18, 0.85), transparent 65%);
}

.product-number {
	position: absolute;
	top: 22px;
	left: 22px;
	font-size: 11px;
	letter-spacing: 0.12em;
}

.product-info {
	position: absolute;
	left: 25px;
	bottom: 25px;
}

.product-info h3,
.strength-item h3 {
	margin: 0 0 8px;
	font: 27px var(--font-serif);
}

.product-info p {
	margin: 0;
	font-size: 12px;
	color: rgba(255, 255, 255, 0.7);
}

.round-arrow {
	position: absolute;
	right: 20px;
	bottom: 22px;
	width: 42px;
	height: 42px;
	border: 1px solid rgba(255, 255, 255, 0.6);
	border-radius: 50%;
	display: grid;
	place-items: center;
}

/* Selected custom work -------------------------------------------------- */

.work {
	background: var(--cream);
}

.work-grid {
	display: grid;
	grid-template-columns: repeat(12, 1fr);
	gap: 14px;
}

.work-item {
	grid-column: span 3;
	margin: 0;
	background: var(--white);
	overflow: hidden;
}

.work-item:nth-child(1),
.work-item:nth-child(6),
.work-item:nth-child(11),
.work-item:nth-child(16) {
	grid-column: span 6;
}

.work-item:nth-child(1) img,
.work-item:nth-child(6) img,
.work-item:nth-child(11) img,
.work-item:nth-child(16) img {
	aspect-ratio: 2 / 1;
}

.work-item img {
	display: block;
	width: 100%;
	aspect-ratio: 1 / 1;
	object-fit: cover;
	transition: transform 0.45s ease;
}

.work-item:hover img {
	transform: scale(1.025);
}

.work-item figcaption {
	display: flex;
	gap: 15px;
	padding: 16px 18px 18px;
	font: 17px var(--font-serif);
}

.work-item figcaption span {
	color: var(--orange);
	padding-top: 3px;
	font: 800 10px var(--font-sans);
	letter-spacing: 0.1em;
}

/* Process ---------------------------------------------------------------- */

.process {
	background: var(--ink);
	color: var(--white);
}

.process-inner {
	padding-top: 110px;
	padding-bottom: 110px;
}

.light-head > p {
	color: rgba(255, 255, 255, 0.55);
}

.steps {
	display: grid;
	grid-template-columns: repeat(6, 1fr);
	border-top: 1px solid rgba(255, 255, 255, 0.18);
}

.step {
	position: relative;
	padding: 32px 10px 10px 0;
	display: flex;
	flex-direction: column;
	gap: 34px;
}

.step span {
	color: var(--orange);
	font-size: 12px;
}

.step strong {
	font: 20px var(--font-serif);
}

.step i {
	position: absolute;
	right: 20px;
	bottom: 8px;
	color: rgba(255, 255, 255, 0.3);
	font-style: normal;
}

/* Strengths -------------------------------------------------------------- */

.strengths {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 8vw;
	align-items: center;
}

.strength-image {
	position: relative;
	height: 700px;
}

.strength-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	filter: saturate(0.8);
}

.quality-badge {
	position: absolute;
	right: -32px;
	bottom: 45px;
	width: 150px;
	height: 150px;
	background: var(--orange);
	color: var(--white);
	border-radius: 50%;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	text-align: center;
}

.quality-badge strong {
	font: 48px var(--font-serif);
}

.quality-badge span {
	width: 90px;
	font-size: 10px;
	text-transform: uppercase;
	letter-spacing: 0.1em;
}

.strength-list {
	margin-top: 45px;
	border-top: 1px solid var(--line);
}

.strength-item {
	display: grid;
	grid-template-columns: 45px 1fr;
	gap: 18px;
	padding: 23px 0;
	border-bottom: 1px solid var(--line);
}

.strength-item > span {
	color: var(--orange);
	font-size: 11px;
	font-weight: 700;
}

.strength-item h3 {
	font-size: 22px;
}

.strength-item p {
	margin: 0;
	color: var(--muted);
	font-size: 13px;
	line-height: 1.55;
}

/* Contact ---------------------------------------------------------------- */

.contact {
	background: var(--orange);
	color: var(--white);
	text-align: center;
}

.contact .eyebrow {
	color: var(--white);
}

.contact h2 em {
	color: var(--ink);
}

.contact > p:not(.eyebrow) {
	max-width: 540px;
	margin: 30px auto;
	line-height: 1.7;
	color: rgba(255, 255, 255, 0.84);
}

/* ==========================================================================
   6. Footer
   ========================================================================== */

.site-footer {
	min-height: 250px;
	padding: 55px 7vw;
	display: grid;
	grid-template-columns: 240px 1fr auto;
	align-items: center;
	gap: 60px;
	background: var(--white);
}

.site-footer img {
	width: 180px;
}

.site-footer p {
	color: var(--muted);
	font-size: 13px;
	line-height: 1.7;
}

.site-footer .footer-meta {
	display: flex;
	flex-direction: column;
	gap: 16px;
	text-align: right;
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: 0.08em;
}

.site-footer .footer-meta span {
	color: var(--muted);
}

.site-footer .footer-links {
	display: flex;
	flex-direction: column;
	gap: 16px;
	margin: 0;
	padding: 0;
	list-style: none;
}

/* ==========================================================================
   7. Inner pages (WP fallback templates)
   ========================================================================== */

.page-hero {
	padding: 200px 7vw 90px;
	background: var(--ink);
	color: var(--white);
}

.page-hero h1 {
	font-size: clamp(48px, 6vw, 92px);
}

.page-content {
	padding: 90px 7vw;
	max-width: 860px;
}

.page-content p {
	font-size: 17px;
	line-height: 1.8;
	color: var(--muted);
}

/* ==========================================================================
   8. Responsive
   ========================================================================== */

@media (max-width: 900px) {
	.site-header {
		height: 70px;
	}

	.admin-bar .site-header {
		top: 46px;
	}

	.brand {
		width: 130px;
	}

	.brand img {
		width: 112px;
		max-height: 52px;
	}

	.header-cta {
		display: none;
	}

	.menu-toggle {
		display: block;
		margin-left: auto;
	}

	.nav {
		display: none;
		position: absolute;
		top: 70px;
		left: 0;
		right: 0;
		padding: 25px 7vw;
		background: var(--white);
		flex-direction: column;
		gap: 20px;
	}

	.nav.open {
		display: flex;
	}

	.hero {
		margin-top: 70px;
		min-height: 700px;
	}

	.admin-bar .hero {
		margin-top: 116px;
	}

	.hero-content {
		padding-top: 100px;
	}

	.hero-stats {
		left: 0;
		right: 0;
		grid-template-columns: repeat(3, 1fr);
		padding: 18px 7vw;
	}

	.hero-stats strong {
		font-size: 30px;
	}

	.intro,
	.strengths {
		grid-template-columns: 1fr;
	}

	.product-grid {
		grid-template-columns: repeat(2, 1fr);
	}

	.product-card {
		height: 400px;
	}

	.work-item {
		grid-column: span 6;
	}

	.work-item:nth-child(1),
	.work-item:nth-child(6),
	.work-item:nth-child(11),
	.work-item:nth-child(16) {
		grid-column: span 12;
	}

	.steps {
		grid-template-columns: repeat(3, 1fr);
		row-gap: 30px;
	}

	.strength-image {
		height: 520px;
	}

	.quality-badge {
		right: 20px;
	}

	.site-footer {
		grid-template-columns: 1fr 1fr;
	}
}

@media (max-width: 580px) {
	.section {
		padding: 80px 6vw;
	}

	.hero {
		min-height: 720px;
	}

	.hero-content {
		padding: 85px 6vw 0;
	}

	h1 {
		font-size: 62px;
	}

	h2 {
		font-size: 45px;
	}

	.hero-copy {
		font-size: 15px;
	}

	.hero-actions {
		flex-direction: column;
		align-items: stretch;
		width: 220px;
	}

	.hero-stats {
		gap: 12px;
		padding: 16px 5vw;
	}

	.hero-stats div {
		padding-right: 6px;
	}

	.hero-stats span {
		font-size: 8px;
	}

	.intro-copy {
		padding-top: 0;
	}

	.section-head {
		display: block;
	}

	.section-head > p {
		width: auto;
		margin-top: 25px;
	}

	.product-grid {
		grid-template-columns: 1fr;
	}

	.product-card {
		height: 390px;
	}

	.work-grid {
		display: block;
	}

	.work-item,
	.work-item:nth-child(1),
	.work-item:nth-child(6),
	.work-item:nth-child(11),
	.work-item:nth-child(16) {
		margin-bottom: 14px;
	}

	.work-item:nth-child(1) img,
	.work-item:nth-child(6) img,
	.work-item:nth-child(11) img,
	.work-item:nth-child(16) img {
		aspect-ratio: 1 / 1;
	}

	.steps {
		grid-template-columns: repeat(2, 1fr);
	}

	.strength-image {
		height: 420px;
	}

	.site-footer {
		grid-template-columns: 1fr;
		gap: 25px;
	}

	.site-footer .footer-meta {
		text-align: left;
	}
}
