/*
Theme Name: Nexo
Theme URI: https://www.nexobiz.org/
Author: Nexo Trading Inc.
Author URI: https://www.nexobiz.org/
Description: A dark, maritime block theme for commodity trading, freight forwarding and import/export businesses. Deep navy surfaces, cyan accents, photographic sections, a stats band, service cards, a shipping-process stepper and a built-in quote form. No build step, locally hosted fonts.
Requires at least: 6.5
Tested up to: 7.1
Requires PHP: 7.4
Version: 2.0.1
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: nexo-trade
Tags: block-theme, full-site-editing, one-column, two-columns, three-columns, four-columns, wide-blocks, custom-colors, custom-typography, editor-style, translation-ready
*/

/* ==========================================================================
   1. Foundations
   ========================================================================== */

body {
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}

h1,
h2,
h3,
h4 {
	text-wrap: balance;
	letter-spacing: -0.03em;
}

p {
	text-wrap: pretty;
}

a {
	transition: color 0.15s ease, opacity 0.15s ease;
}

/* Keep multi-column rows side by side on desktop; core's gap otherwise pushes
   the last column onto a new line. */
@media (min-width: 782px) {
	.wp-block-columns {
		flex-wrap: nowrap;
	}

	.wp-block-column {
		min-width: 0;
	}
}

/* Small caps label with a cyan rule, used above every section heading */
.nx-eyebrow {
	display: inline-flex;
	align-items: center;
	gap: 12px;
	margin: 0 0 18px;
	font-size: 0.78rem;
	font-weight: 600;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--wp--preset--color--accent);
}

.nx-eyebrow::before {
	content: "";
	width: 28px;
	height: 2px;
	background: currentColor;
	flex: none;
}

.nx-lede {
	max-width: 52ch;
	color: var(--wp--preset--color--muted);
	font-size: 1.05rem;
	line-height: 1.7;
}

.nx-dark .nx-lede,
.has-navy-background-color .nx-lede,
.has-ink-background-color .nx-lede {
	color: var(--wp--preset--color--fog);
}

/* Long-form content rhythm */
.wp-block-post-content > :first-child {
	margin-top: 0;
}

.wp-block-post-content :where(h2, h3) {
	margin-top: 2.2em;
}

.wp-block-post-content :where(p, ul, ol, blockquote, figure) {
	margin-block: 1.25em;
}

/* ==========================================================================
   2. Header
   ========================================================================== */

.nx-header {
	position: sticky;
	top: 0;
	z-index: 50;
	background: var(--wp--preset--color--ink);
	color: var(--wp--preset--color--base);
	backdrop-filter: saturate(140%) blur(6px);
}

.nx-header .wp-block-site-title a {
	color: var(--wp--preset--color--base);
	text-decoration: none;
}

.nx-brand {
	display: flex;
	align-items: center;
	gap: 14px;
}

.nx-brand svg {
	display: block;
	flex: none;
}

.nx-brand .wp-block-site-title {
	margin: 0;
	line-height: 1.05;
	max-width: 12ch;
}

.nx-header .wp-block-navigation__container {
	gap: 2rem;
	margin-left: auto;
}

.nx-header-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	flex-wrap: wrap;
}

.nx-header .wp-block-navigation-item__content {
	position: relative;
	padding-block: 6px;
	color: var(--wp--preset--color--fog);
}

.nx-header .wp-block-navigation-item__content:hover,
.nx-header .wp-block-navigation-item.current-menu-item > .wp-block-navigation-item__content,
.nx-header .wp-block-navigation-item.current-menu-ancestor > .wp-block-navigation-item__content {
	color: var(--wp--preset--color--base);
}

.nx-header .wp-block-navigation-item.current-menu-item > .wp-block-navigation-item__content::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: -2px;
	height: 2px;
	background: var(--wp--preset--color--accent);
}

.nx-header .wx-quote-btn,
.nx-header .wp-block-button__link {
	padding: 0.7rem 1.25rem;
	font-size: 0.88rem;
}

/* ==========================================================================
   3. Hero
   ========================================================================== */

.nx-hero {
	position: relative;
	isolation: isolate;
	overflow: hidden;
	color: var(--wp--preset--color--base);
	background-color: var(--wp--preset--color--navy);
	background-image:
		radial-gradient(120% 90% at 78% 12%, rgba(46, 224, 195, 0.16), transparent 55%),
		linear-gradient(100deg, rgba(5, 22, 31, 0.96) 12%, rgba(5, 22, 31, 0.86) 46%, rgba(5, 22, 31, 0.62) 72%, rgba(5, 22, 31, 0.72) 100%),
		url("assets/img/hero-port.jpg");
	background-size: cover, cover, cover;
	background-position: center, center, center;
	background-repeat: no-repeat;
}

.nx-hero h1 {
	margin: 0;
	max-width: 17ch;
	color: var(--wp--preset--color--base);
	font-size: clamp(2.7rem, 5.4vw, 4.4rem);
	font-weight: 800;
	line-height: 1.02;
	letter-spacing: -0.035em;
}

.nx-hero .nx-lede {
	margin-top: 24px;
	max-width: 46ch;
	color: rgba(236, 245, 248, 0.9);
	font-size: 1.08rem;
}

.nx-hero .wp-block-buttons {
	margin-top: 36px;
	gap: 14px;
}

.nx-hero .nx-arrow {
	display: inline-block;
	margin-left: 6px;
	transform: translateX(0);
	transition: transform 0.18s ease;
}

.nx-hero .wp-block-button__link:hover .nx-arrow {
	transform: translateX(4px);
}

/* ==========================================================================
   4. Stats band
   ========================================================================== */

.nx-stats {
	color: var(--wp--preset--color--base);
	background: var(--wp--preset--color--ink);
	border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.nx-stats .wp-block-columns {
	align-items: stretch;
}

.nx-stats .wp-block-column {
	border-left: 1px solid rgba(255, 255, 255, 0.1);
}

.nx-stats .wp-block-column:first-child {
	border-left: 0;
	padding-left: 0;
}

.nx-stats .wp-block-column + .wp-block-column {
	padding-left: 28px;
}

.nx-stat {
	display: flex;
	align-items: center;
	gap: 16px;
	margin: 0;
}

.nx-stat svg {
	flex: none;
	color: var(--wp--preset--color--accent);
	width: 34px;
	height: 34px;
}

.nx-stat b {
	display: block;
	font-size: 1.75rem;
	font-weight: 750;
	letter-spacing: -0.03em;
	line-height: 1.1;
	color: var(--wp--preset--color--base);
}

.nx-stat span {
	display: block;
	margin-top: 2px;
	font-size: 0.86rem;
	line-height: 1.4;
	color: var(--wp--preset--color--fog);
}

/* ==========================================================================
   5. Who we are
   ========================================================================== */

.nx-who {
	background: var(--wp--preset--color--light);
}

.nx-who-media {
	margin: 0;
	border-radius: 16px;
	overflow: hidden;
	aspect-ratio: 4 / 3.4;
	background-image: url("assets/img/who-we-are.jpg");
}

.nx-who-media img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.nx-who h2 {
	margin: 0;
	max-width: 20ch;
}

.nx-who .nx-lede {
	margin-top: 22px;
}

.nx-values {
	margin-top: var(--wp--preset--spacing--70);
	border-top: 1px solid var(--wp--preset--color--line);
}

.nx-values .wp-block-column {
	padding: 30px 34px 0 0;
	border-right: 1px solid var(--wp--preset--color--line);
}

.nx-values .wp-block-column + .wp-block-column {
	padding-left: 34px;
}

.nx-values .wp-block-column:last-child {
	border-right: 0;
	padding-right: 0;
}

.nx-value-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 46px;
	height: 46px;
	border-radius: 12px;
	background: var(--wp--preset--color--mint);
	color: #0d8b78;
	margin: 0 0 16px;
}

.nx-values h3 {
	margin: 0 0 8px;
	font-size: 1.02rem;
}

.nx-values p {
	margin: 0;
	font-size: 0.93rem;
	line-height: 1.6;
	color: var(--wp--preset--color--muted);
}

/* ==========================================================================
   6. Services
   ========================================================================== */

.nx-services {
	position: relative;
	color: var(--wp--preset--color--base);
	background: var(--wp--preset--color--navy);
}

.nx-services .nx-section-head .wp-block-column:last-child {
	align-self: flex-end;
}

.nx-services h2 {
	margin: 0;
	max-width: 22ch;
	color: var(--wp--preset--color--base);
}

.nx-services .nx-lede {
	color: var(--wp--preset--color--fog);
	max-width: 44ch;
}

.nx-svc-grid {
	align-items: stretch;
}

.nx-svc {
	display: flex;
	flex-direction: column;
	padding: 0 0 26px;
	border: 1px solid var(--wp--preset--color--line-dark);
	border-radius: 16px;
	background: var(--wp--preset--color--navy-soft);
	overflow: hidden;
	transition: border-color 0.18s ease, transform 0.18s ease;
}

.nx-svc:hover {
	border-color: rgba(46, 224, 195, 0.5);
	transform: translateY(-3px);
}

.nx-svc figure {
	margin: 0;
	aspect-ratio: 16 / 11;
	overflow: hidden;
}

.nx-svc figure img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	filter: saturate(0.85) contrast(1.02);
	transition: transform 0.4s ease;
}

.nx-svc:hover figure img {
	transform: scale(1.04);
}

.nx-svc h3 {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 0;
	font-size: 1.06rem;
	color: var(--wp--preset--color--base);
}

.nx-svc-head {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 22px 22px 0;
	margin: 0;
}

.nx-svc-head h3 {
	margin: 0;
}

.nx-svc h3 svg {
	flex: none;
	width: 20px;
	height: 20px;
	color: var(--wp--preset--color--accent);
}

.nx-svc p {
	margin: 14px 0 0;
	padding: 0 22px;
	font-size: 0.92rem;
	line-height: 1.6;
	color: var(--wp--preset--color--fog);
}

.nx-svc-link {
	margin: auto 0 0;
	padding: 16px 22px 0;
}

.nx-svc-link a {
	font-size: 0.92rem;
	font-weight: 600;
	color: var(--wp--preset--color--accent);
	text-decoration: none;
}

.nx-svc-link a:hover {
	text-decoration: none;
	opacity: 0.8;
}

/* Photographic panels (images live in assets/img and are swapped in CSS) */
.nx-svc-media,
.nx-who-media {
	background-color: #0f2b38;
	background-position: center;
	background-size: cover;
	background-repeat: no-repeat;
}

.nx-svc-media {
	margin: 0;
	aspect-ratio: 16 / 11;
	border-radius: 16px 16px 0 0;
	transition: filter 0.3s ease;
	filter: saturate(0.9);
}

.nx-svc:hover .nx-svc-media {
	filter: saturate(1.05);
}

.nx-svc-media--ocean {
	background-image: url("assets/img/svc-ocean.jpg");
}

.nx-svc-media--air {
	background-image: url("assets/img/svc-air.jpg");
}

.nx-svc-media--road {
	background-image: url("assets/img/svc-road.jpg");
}

.nx-svc-media--e2e {
	background-image: url("assets/img/svc-e2e.jpg");
}

/* ==========================================================================
   7. Process
   ========================================================================== */

.nx-process {
	background: var(--wp--preset--color--base);
}

.nx-process h2 {
	margin: 0;
	max-width: 22ch;
}

.nx-process .nx-lede {
	max-width: 42ch;
}

.nx-steps {
	position: relative;
	align-items: flex-start;
}

.nx-steps::before {
	content: "";
	position: absolute;
	top: 28px;
	left: 8%;
	right: 8%;
	height: 1px;
	background: var(--wp--preset--color--line);
}

.nx-step {
	position: relative;
	margin: 0;
	padding: 0 18px;
	text-align: center;
}

.nx-step-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 56px;
	height: 56px;
	margin: 0 auto 20px;
	border-radius: 50%;
	background: var(--wp--preset--color--mint);
	color: #0d8b78;
	border: 6px solid var(--wp--preset--color--base);
	box-sizing: content-box;
}

.nx-step-icon svg {
	width: 24px;
	height: 24px;
}

.nx-step h3 {
	margin: 0 0 8px;
	font-size: 1rem;
	font-weight: 700;
}

.nx-step p {
	margin: 0;
	font-size: 0.9rem;
	line-height: 1.6;
	color: var(--wp--preset--color--muted);
}

/* ==========================================================================
   8. Contact
   ========================================================================== */

.nx-contact {
	position: relative;
	isolation: isolate;
	overflow: hidden;
	color: var(--wp--preset--color--base);
	background: var(--wp--preset--color--navy);
}

.nx-contact::before {
	content: "";
	position: absolute;
	inset: 0;
	background: url("assets/img/world-dots.svg") center left / 82% auto no-repeat;
	opacity: 0.16;
	z-index: -1;
	pointer-events: none;
}

.nx-contact h2 {
	margin: 0;
	max-width: 18ch;
	color: var(--wp--preset--color--base);
}

.nx-contact .nx-lede {
	margin-top: 20px;
	max-width: 42ch;
	color: var(--wp--preset--color--fog);
}

.nx-details {
	margin-top: var(--wp--preset--spacing--60);
	display: grid;
	gap: 26px;
}

.nx-detail {
	display: grid;
	grid-template-columns: 26px minmax(0, 1fr);
	gap: 14px;
	margin: 0;
}

.nx-detail svg {
	width: 22px;
	height: 22px;
	margin-top: 3px;
	color: var(--wp--preset--color--accent);
}

.nx-detail b {
	display: block;
	margin-bottom: 2px;
	font-size: 0.8rem;
	font-weight: 600;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--wp--preset--color--fog);
}

.nx-detail span,
.nx-detail a {
	font-size: 0.98rem;
	line-height: 1.55;
	color: var(--wp--preset--color--base);
	text-decoration: none;
}

.nx-detail a:hover {
	color: var(--wp--preset--color--accent);
}

/* Quote form card */
.nx-form-card {
	padding: 30px 30px 32px;
	border: 1px solid var(--wp--preset--color--line-dark);
	border-radius: 16px;
	background: rgba(6, 26, 36, 0.82);
	box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.6);
}

.nx-form-card h3 {
	margin: 0 0 22px;
	font-size: 1.3rem;
	font-weight: 700;
	color: var(--wp--preset--color--base);
}

.nx-form-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 12px;
}

.nx-field {
	display: block;
}

.nx-field-wide {
	grid-column: 1 / -1;
}

.nx-field input,
.nx-field select,
.nx-field textarea {
	width: 100%;
	padding: 12px 14px;
	font-family: inherit;
	font-size: 0.92rem;
	color: var(--wp--preset--color--base);
	background: rgba(255, 255, 255, 0.04);
	border: 1px solid var(--wp--preset--color--line-dark);
	border-radius: 8px;
	transition: border-color 0.15s ease, background 0.15s ease;
}

.nx-field textarea {
	min-height: 96px;
	resize: vertical;
}

.nx-field input::placeholder,
.nx-field textarea::placeholder {
	color: #7f97a1;
	opacity: 1;
}

.nx-field input:focus,
.nx-field select:focus,
.nx-field textarea:focus {
	outline: none;
	border-color: var(--wp--preset--color--accent);
	background: rgba(255, 255, 255, 0.07);
}

.nx-field select {
	appearance: none;
	background-image: linear-gradient(45deg, transparent 50%, #7f97a1 50%),
		linear-gradient(135deg, #7f97a1 50%, transparent 50%);
	background-position: calc(100% - 20px) 52%, calc(100% - 15px) 52%;
	background-size: 5px 5px, 5px 5px;
	background-repeat: no-repeat;
}

.nx-field select option {
	color: #0a1d27;
}

.nx-form-submit {
	width: 100%;
	margin-top: 4px;
	padding: 14px 18px;
	font-family: inherit;
	font-size: 0.95rem;
	font-weight: 650;
	color: var(--wp--preset--color--ink);
	background: var(--wp--preset--color--accent);
	border: 0;
	border-radius: 8px;
	cursor: pointer;
	transition: background 0.15s ease;
}

.nx-form-submit:hover {
	background: var(--wp--preset--color--accent-deep);
}

.nx-form-note {
	margin: 14px 0 0;
	font-size: 0.78rem;
	line-height: 1.5;
	color: #7f97a1;
}

.nx-form-alert {
	margin: 0 0 18px;
	padding: 12px 14px;
	font-size: 0.9rem;
	border-radius: 8px;
	border: 1px solid rgba(46, 224, 195, 0.45);
	background: rgba(46, 224, 195, 0.12);
	color: #d7faf2;
}

.nx-form-alert.is-error {
	border-color: rgba(255, 122, 122, 0.5);
	background: rgba(255, 122, 122, 0.12);
	color: #ffd9d9;
}

.nx-hp {
	position: absolute !important;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

/* ==========================================================================
   9. Footer
   ========================================================================== */

.nx-footer {
	position: relative;
	isolation: isolate;
	overflow: hidden;
	border-top: 1px solid var(--wp--preset--color--line-dark);
	color: var(--wp--preset--color--base);
	background: var(--wp--preset--color--ink);
}

.nx-footer::before {
	content: "";
	position: absolute;
	right: -6%;
	bottom: -12%;
	width: 60%;
	height: 130%;
	background: url("assets/img/world-dots.svg") right bottom / contain no-repeat;
	opacity: 0.12;
	z-index: -1;
	pointer-events: none;
}

.nx-footer .wp-block-site-title a {
	color: var(--wp--preset--color--base);
	text-decoration: none;
}

.nx-footer p,
.nx-footer a {
	color: var(--wp--preset--color--fog);
	font-size: 0.92rem;
}

.nx-footer .nx-footer-title {
	margin: 0 0 14px;
	font-size: 0.78rem;
	font-weight: 600;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--wp--preset--color--base);
}

.nx-social {
	display: flex;
	gap: 10px;
	margin-top: 22px;
}

.nx-social a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	border: 1px solid var(--wp--preset--color--line-dark);
	border-radius: 50%;
	color: var(--wp--preset--color--fog);
	transition: color 0.15s ease, border-color 0.15s ease;
}

.nx-social a:hover {
	color: var(--wp--preset--color--accent);
	border-color: var(--wp--preset--color--accent);
}

.nx-social svg {
	width: 16px;
	height: 16px;
}

.nx-footer .wp-block-navigation__container {
	flex-direction: column;
	align-items: flex-start;
	gap: 6px !important;
}

.nx-footer .wp-block-navigation-item {
	margin: 0;
	line-height: 1.5;
}

.nx-footer .wp-block-navigation-item__content {
	color: var(--wp--preset--color--fog);
	font-size: 0.92rem;
	line-height: 1.5;
	padding-block: 1px;
}

.nx-footer .wp-block-navigation-item__content:hover {
	color: var(--wp--preset--color--accent);
}

.nx-legal {
	font-size: 0.82rem;
	color: #7d949d;
}

/* ==========================================================================
   10. Utilities & details
   ========================================================================== */

:where(a, button, input, textarea, select, summary, .wp-block-button__link):focus-visible {
	outline: 2px solid var(--wp--preset--color--accent);
	outline-offset: 3px;
}

.wp-block-button.is-style-outline .wp-block-button__link {
	background: transparent;
	color: var(--wp--preset--color--base);
	border-color: rgba(255, 255, 255, 0.45);
}

.wp-block-button.is-style-outline .wp-block-button__link:hover {
	background: rgba(255, 255, 255, 0.1);
	color: var(--wp--preset--color--base);
	border-color: var(--wp--preset--color--base);
}

/* Outline button on light backgrounds */
.nx-on-light .wp-block-button.is-style-outline .wp-block-button__link {
	color: var(--wp--preset--color--contrast);
	border-color: rgba(10, 29, 39, 0.35);
}

.nx-on-light .wp-block-button.is-style-outline .wp-block-button__link:hover {
	background: var(--wp--preset--color--contrast);
	color: var(--wp--preset--color--base);
	border-color: var(--wp--preset--color--contrast);
}

.wp-block-navigation .wp-block-navigation-item__content {
	text-decoration: none;
}

.nx-post-row h2,
.nx-post-row h3 {
	margin: 0;
}

.nx-post-row h2 a,
.nx-post-row h3 a {
	text-decoration: none;
}

.nx-post-row h2 a:hover,
.nx-post-row h3 a:hover {
	color: var(--wp--preset--color--accent-deep);
}

/* ==========================================================================
   11. Responsive
   ========================================================================== */

@media (max-width: 1100px) {
	.nx-svc {
		border-radius: 14px;
	}

	.nx-steps::before {
		display: none;
	}
}

@media (max-width: 960px) {
	.nx-hero {
		background-image:
			radial-gradient(100% 70% at 80% 0%, rgba(46, 224, 195, 0.14), transparent 60%),
			linear-gradient(180deg, rgba(5, 22, 31, 0.9) 20%, rgba(5, 22, 31, 0.94) 100%),
			url("assets/img/hero-port.jpg");
	}

	.nx-hero h1 {
		max-width: 22ch;
	}

	.nx-stats .wp-block-column,
	.nx-stats .wp-block-column + .wp-block-column {
		border-left: 0;
		padding-left: 0;
		border-top: 1px solid rgba(255, 255, 255, 0.08);
		padding-top: 20px;
	}

	.nx-stats .wp-block-column:first-child {
		border-top: 0;
		padding-top: 0;
	}

	.nx-values .wp-block-column,
	.nx-values .wp-block-column + .wp-block-column {
		border-right: 0;
		padding: 24px 0 0;
		border-top: 1px solid var(--wp--preset--color--line);
	}

	.nx-values .wp-block-column:first-child {
		border-top: 0;
		padding-top: 0;
	}

	.nx-step {
		text-align: left;
		padding: 0 0 28px;
	}

	.nx-step-icon {
		margin: 0 0 16px;
	}
}

@media (max-width: 781px) {
	.wp-block-columns {
		flex-wrap: wrap;
	}

	.wp-block-column {
		flex-basis: 100% !important;
		flex-grow: 1;
	}

	.nx-header .wp-block-columns {
		flex-wrap: nowrap;
		gap: 12px;
	}

	.nx-header .wp-block-column:first-child {
		flex-basis: auto;
		flex-grow: 1;
	}

	.nx-header .wp-block-column:nth-child(2) {
		flex-basis: auto;
	}

	.nx-header .wp-block-buttons {
		display: none;
	}

	.nx-form-grid {
		grid-template-columns: 1fr;
	}

	.nx-form-card {
		padding: 24px 20px 26px;
	}

	.nx-hero,
	.nx-services,
	.nx-process,
	.nx-who,
	.nx-contact,
	.nx-stats {
		padding-top: 64px !important;
		padding-bottom: 64px !important;
	}
}

@media (max-width: 620px) {
	.nx-eyebrow {
		font-size: 0.72rem;
		letter-spacing: 0.1em;
	}

	.nx-hero h1 {
		font-size: clamp(2.15rem, 9vw, 2.9rem);
	}

	.nx-stat b {
		font-size: 1.5rem;
	}
}

@media (prefers-reduced-motion: reduce) {
	* {
		animation-duration: 0.001ms !important;
		transition-duration: 0.001ms !important;
	}
}
