/*
Theme Name: Nesbytek Company
Theme URI: https://nesbytek.ir
Author: Nesbytek
Author URI: https://nesbytek.ir
Description: A fast, clean block theme for company websites. Right-to-left ready, with Persian and English included. Edit everything in the Site Editor: no code needed.
Requires at least: 6.6
Tested up to: 7.1
Requires PHP: 8.0
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: nesbytek-company
Tags: business, block-patterns, block-styles, custom-colors, editor-style, full-site-editing, rtl-language-support, translation-ready, wide-blocks
*/

/*
 * Most styling lives in theme.json. This file only holds what theme.json cannot express.
 * Logical properties only (margin-inline, padding-inline, inset-inline, text-align: start), so the
 * same rules work left-to-right and right-to-left without a separate rtl.css.
 */

:root {
	/* Shapes follow theme.json (settings.custom.radius), so a style variation changes them everywhere. */
	--nc-radius: var(--wp--custom--radius--lg, 1.25rem);
	--nc-radius-md: var(--wp--custom--radius--md, 0.875rem);
	--nc-radius-sm: var(--wp--custom--radius--sm, 0.5rem);
	--nc-shadow: var(--wp--preset--shadow--card);
	--nc-topbar-height: 2.5rem;
}

/*
 * Typography. The sizes are in theme.json (a 1.25 scale on a 16px base, the usual web standard); two details belong here:
 * Persian needs a little more line height than Latin, and letter-spacing must never be applied to Persian because it
 * breaks the joining of the letters.
 */
html:lang(fa) body,
html:lang(fa) .wp-block-heading {
	line-height: 1.85;
}

html:lang(fa) .wp-block-heading {
	line-height: 1.5;
}

html:lang(fa) * {
	letter-spacing: 0 !important;
}

h1,
h2,
h3 {
	text-wrap: balance;
}

p {
	text-wrap: pretty;
}

html {
	scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}

	*,
	*::before,
	*::after {
		transition-duration: 0.01ms !important;
		animation-duration: 0.01ms !important;
	}
}

body {
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
	overflow-wrap: break-word;
}

/* Keyboard focus is always visible. */
:where(a, button, input, select, textarea, summary):focus-visible {
	outline: 3px solid var(--wp--preset--color--primary);
	outline-offset: 2px;
	border-radius: var(--nc-radius-sm);
}

.screen-reader-text:focus {
	background: var(--wp--preset--color--surface);
	color: var(--wp--preset--color--contrast);
	clip: auto !important;
	clip-path: none;
	height: auto;
	width: auto;
	padding: 0.75rem 1.25rem;
	z-index: 100000;
	inset-block-start: 0.5rem;
	inset-inline-start: 0.5rem;
}

/* Language switcher (shown only when the site has two or more languages) */
.nc-lang ul {
	display: flex;
	gap: 0.25rem;
	list-style: none;
	margin: 0;
	padding: 0.2rem;
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 999px;
	background: var(--wp--preset--color--surface);
}

.nc-lang a {
	display: block;
	padding: 0.2rem 0.75rem;
	border-radius: 999px;
	color: var(--wp--preset--color--contrast);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 600;
	text-decoration: none;
}

.nc-lang a[aria-current="true"] {
	background: var(--wp--preset--color--primary);
	color: #fff;
}

.nc-header .wp-block-shortcode {
	margin: 0;
}

/* Header: a slim announcement bar that scrolls away, and the main bar that stays on top */
.nc-header {
	position: sticky;
	/* The top bar is this tall; sticking this far up lets it scroll out of sight while the main bar stays. */
	inset-block-start: calc(var(--nc-topbar-height) * -1);
	z-index: 50;
	background: color-mix(in srgb, var(--wp--preset--color--base) 92%, transparent);
	backdrop-filter: saturate(1.4) blur(14px);
	border-block-end: 1px solid var(--wp--preset--color--border);
}

.admin-bar .nc-header {
	inset-block-start: calc(var(--wp-admin--admin-bar--height, 0px) - var(--nc-topbar-height));
}

.nc-topbar {
	min-height: var(--nc-topbar-height);
	display: flex;
	align-items: center;
	background: var(--wp--preset--color--primary);
	color: #fff;
	font-size: var(--wp--preset--font-size--small);
}

.nc-topbar > .wp-block-group {
	width: 100%;
}

.nc-topbar__item {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	margin: 0;
	white-space: nowrap;
}

.nc-topbar__item .nc-icon {
	width: 1.125rem;
	height: 1.125rem;
}

@media (max-width: 781px) {
	/* On a phone only the first message is shown. */
	.nc-topbar__item:not(:first-child) {
		display: none;
	}
}

.nc-header .wp-block-site-title {
	margin: 0;
}

.nc-logo-mark {
	display: inline-flex;
	color: var(--wp--preset--color--primary);
}


/* Icons from nesbytek_company_icon() */
.nc-icon {
	flex: none;
	vertical-align: middle;
}

/* The arrow points the other way in right-to-left. */
:dir(rtl) .nc-icon--arrow {
	transform: scaleX(-1);
}

.nc-icon-badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 3rem;
	height: 3rem;
	margin: 0;
	border-radius: 50%;
	background: var(--wp--preset--color--sage);
	color: var(--wp--preset--color--primary);
}

/* Cards used by patterns */
.nc-card {
	background: var(--wp--preset--color--surface);
	border: 1px solid var(--wp--preset--color--border);
	border-radius: var(--nc-radius);
	box-shadow: var(--nc-shadow);
	height: 100%;
}

/* A section title with a small label above and an optional link on the other side */
.nc-section-head {
	align-items: end;
}

.nc-eyebrow {
	margin: 0;
	font-size: var(--wp--preset--font-size--small);
	font-weight: 700;
	color: var(--wp--preset--color--primary);
}

.nc-link-arrow {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	font-weight: 600;
	text-decoration: none;
}

.nc-link-arrow:hover {
	text-decoration: underline;
}

.nc-hero {
	background:
		radial-gradient(52rem 26rem at 90% -10%, color-mix(in srgb, var(--wp--preset--color--secondary) 28%, transparent), transparent 62%),
		radial-gradient(44rem 22rem at 4% 12%, color-mix(in srgb, var(--wp--preset--color--primary) 12%, transparent), transparent 60%),
		var(--wp--preset--color--base);
}

.nc-hero .wp-block-group.alignwide > :not(.alignleft):not(.alignright):not(.alignfull) {
	/* Start-aligned in both directions: left in English, right in Persian. */
	margin-inline-start: 0 !important;
	margin-inline-end: auto !important;
}


/* Buttons: one consistent shape */
.wp-element-button,
.wp-block-button__link {
	transition: background-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.wp-element-button:hover,
.wp-block-button__link:hover {
	transform: translateY(-1px);
}

/* Numbers and codes stay left-to-right inside right-to-left text */
.nc-ltr,
input[type="tel"],
input[type="email"],
input[type="url"],
input[type="number"] {
	direction: ltr;
	text-align: start;
}

/* Footer */
.nc-footer {
	background: var(--wp--preset--color--footer-bg);
	color: var(--wp--preset--color--footer-text);
}

.nc-footer ul {
	list-style: none;
	padding: 0;
	margin: 0;
}

.nc-footer li + li {
	margin-block-start: 0.5rem;
}

.nc-footer a {
	color: inherit;
	text-decoration: none;
}

.nc-footer a:hover {
	text-decoration: underline;
}

.nc-footer h3 {
	font-family: var(--wp--preset--font-family--inter);
	font-size: var(--wp--preset--font-size--medium);
	font-weight: 700;
	margin-block-end: 0.75rem;
}

.nc-footer .has-muted-color,
.nc-footer__note {
	color: color-mix(in srgb, var(--wp--preset--color--footer-text) 78%, transparent) !important;
}

.nc-footer h3,
.nc-footer .wp-block-site-title,
.nc-footer .wp-block-site-title a {
	color: inherit;
}


/* ---------------------------------------------------------------------------------------------
 * Company patterns
 * ------------------------------------------------------------------------------------------- */

.nc-contact-mini {
	display: grid;
	gap: 0.6rem;
}

.nc-contact-mini li {
	display: flex;
	align-items: center;
	gap: 0.6rem;
	margin: 0;
}

.nc-icon-badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 3rem;
	height: 3rem;
	margin: 0;
	border-radius: var(--nc-radius-md);
	background: var(--wp--preset--color--sage);
	color: var(--wp--preset--color--primary);
}

/* Heroes */
.nc-hero {
	background:
		radial-gradient(52rem 26rem at 90% -10%, color-mix(in srgb, var(--wp--preset--color--secondary) 22%, transparent), transparent 62%),
		radial-gradient(44rem 22rem at 4% 12%, color-mix(in srgb, var(--wp--preset--color--primary) 12%, transparent), transparent 60%),
		var(--wp--preset--color--base);
}

.nc-accent {
	font-style: normal;
	color: var(--wp--preset--color--primary);
}

.nc-hero-card {
	box-shadow: var(--nc-shadow);
}

.nc-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	margin-block-start: var(--wp--preset--spacing--30);
}

.nc-chips--center {
	justify-content: center;
	margin-block-start: var(--wp--preset--spacing--50);
}

.nc-chip {
	display: grid;
	gap: 0.1rem;
	margin: 0;
	padding: 0.7rem 1.1rem;
	border: 1px solid var(--wp--preset--color--border);
	border-radius: var(--nc-radius-md);
	background: var(--wp--preset--color--surface);
	text-align: center;
}

.nc-chip strong {
	font-size: var(--wp--preset--font-size--x-large);
	line-height: 1.2;
	color: var(--wp--preset--color--primary);
}

.nc-chip span {
	font-size: var(--wp--preset--font-size--small);
	color: var(--wp--preset--color--muted);
}

.nc-hero-modern {
	background:
		radial-gradient(40rem 22rem at 50% -8%, color-mix(in srgb, var(--wp--preset--color--primary) 22%, transparent), transparent 66%),
		radial-gradient(30rem 18rem at 88% 30%, color-mix(in srgb, var(--wp--preset--color--secondary) 20%, transparent), transparent 62%),
		var(--wp--preset--color--base);
}

.nc-hero-modern .wp-block-buttons {
	justify-content: center;
}

/* Numbers band */
.nc-stat {
	text-align: center;
}

.nc-stat__n {
	margin: 0;
	color: var(--wp--preset--color--primary);
}

.nc-stat p {
	margin: 0;
}

/* Cards in grids keep their height equal */
.nc-service,
.nc-quote,
.nc-person {
	height: 100%;
}

.nc-service h3 {
	margin-block: var(--wp--preset--spacing--30) 0.5rem;
}

.nc-service .nc-icon-badge {
	margin: 0;
}

/* Check lists */
.nc-checks {
	display: grid;
	gap: 0.7rem;
	list-style: none;
	margin: var(--wp--preset--spacing--30) 0 var(--wp--preset--spacing--40);
	padding: 0;
}

.nc-checks li {
	display: flex;
	align-items: flex-start;
	gap: 0.6rem;
	margin: 0;
}

.nc-checks .nc-icon {
	margin-block-start: 0.2rem;
	color: var(--wp--preset--color--primary);
}

.nc-promise {
	text-align: center;
}

.nc-big-icon {
	margin: var(--wp--preset--spacing--30) 0 0;
	color: var(--wp--preset--color--primary);
}

/* Process */
.nc-step {
	position: relative;
}

.nc-step__n {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.75rem;
	height: 2.75rem;
	margin: 0 0 var(--wp--preset--spacing--20);
	border-radius: 50%;
	background: var(--wp--preset--color--primary);
	color: #fff;
	font-weight: 700;
}

.nc-step h3 {
	margin-block-start: 0;
}

/* Portfolio: a colored picture area stands in for a screenshot */
.nc-project {
	overflow: hidden;
	padding: 0 !important;
}

.nc-project__art {
	aspect-ratio: 16 / 10;
	background: linear-gradient(135deg, var(--wp--preset--color--primary), var(--wp--preset--color--secondary));
}

.nc-project__art--b {
	background: linear-gradient(135deg, var(--wp--preset--color--secondary), var(--wp--preset--color--primary-strong));
}

.nc-project__art--c {
	background: linear-gradient(135deg, var(--wp--preset--color--primary-strong), var(--wp--preset--color--accent));
}

.nc-project h3 {
	margin-block: 0.25rem 0.75rem;
}

/* Testimonials */
.nc-stars {
	display: flex;
	gap: 0.15rem;
	margin: 0;
	color: var(--wp--preset--color--secondary);
}

/* Call to action */
.nc-cta__box {
	border-radius: var(--nc-radius);
	background: var(--wp--preset--gradient--primary-glow);
	color: #fff;
}

.nc-cta__box :where(h2, p) {
	color: #fff;
}

.nc-cta__box .wp-block-button__link {
	background: #fff;
	color: var(--wp--preset--color--primary-strong);
}

/* FAQ */
.nc-faq__item {
	margin: 0 0 0.75rem;
	padding: 1rem 1.25rem;
	border: 1px solid var(--wp--preset--color--border);
	border-radius: var(--nc-radius-md);
	background: var(--wp--preset--color--surface);
}

.nc-faq__item summary {
	cursor: pointer;
	font-weight: 600;
}

.nc-faq__item[open] summary {
	margin-block-end: 0.5rem;
	color: var(--wp--preset--color--primary);
}

/* Team */
.nc-avatar {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 5rem;
	height: 5rem;
	margin: 0 auto var(--wp--preset--spacing--20);
	border-radius: 50%;
	background: var(--wp--preset--color--sage);
	color: var(--wp--preset--color--primary);
}

.nc-person h3 {
	margin-block: 0.25rem;
}

/* Contact */
.nc-contact-list {
	display: grid;
	gap: 1.25rem;
	list-style: none;
	margin: 0;
	padding: 0;
}

.nc-contact-list li {
	display: flex;
	align-items: flex-start;
	gap: 0.9rem;
	margin: 0;
}

.nc-contact-list .nc-icon {
	margin-block-start: 0.15rem;
	color: var(--wp--preset--color--primary);
}

.nc-contact-list strong {
	display: block;
}

.nc-pagehead {
	background: var(--wp--preset--color--surface-muted);
}

/* Small screens */
@media (max-width: 781px) {
	.nc-hero .wp-block-buttons {
		justify-content: flex-start;
	}

	.nc-hero-modern .wp-block-buttons {
		justify-content: center;
	}
}

/* Card grids: fixed columns on wide screens, two on tablets, one on phones */
.nc-hero-card .nc-chips {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
}

@media (max-width: 1023px) {
	.nc-grid.is-layout-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 599px) {
	.nc-grid.is-layout-grid {
		grid-template-columns: minmax(0, 1fr);
	}

	.nc-hero-card .nc-chips {
		grid-template-columns: 1fr;
	}
}

/* Pricing, case study and legal pages */
.nc-tier {
	display: flex;
	flex-direction: column;
	position: relative;
}

.nc-tier--hot {
	border-color: var(--wp--preset--color--primary);
	box-shadow: 0 0 0 1px var(--wp--preset--color--primary), var(--nc-shadow);
}

.nc-tier .nc-checks {
	margin-block: var(--wp--preset--spacing--30);
}

.nc-tier .wp-block-buttons {
	margin-block-start: auto;
}

.nc-price {
	margin: var(--wp--preset--spacing--30) 0 0;
	color: var(--wp--preset--color--primary);
}

.nc-casebox h3 {
	margin-block-start: 0;
}

.nc-notice {
	padding: 0.9rem 1.1rem;
	border: 1px dashed var(--wp--preset--color--border);
	border-radius: var(--nc-radius-md);
	background: var(--wp--preset--color--surface-muted);
	color: var(--wp--preset--color--muted);
	font-size: var(--wp--preset--font-size--small);
}
