/*
Theme Name:   Huge Coder
Theme URI:    https://hugecoder.com
Author:       Huge Coder
Author URI:   https://hugecoder.com
Description:  A modern, engaging WordPress theme for hugecoder.com — built to sell WordPress plugins and themes. Ships with scroll-reveal animations, a shrinking header, and full compatibility with the Nova Builder page builder. Design by Cemuyguc (https://cemuyguc.com.tr).
Version:      1.0.0
Requires at least: 6.0
Requires PHP: 7.4
License:      GNU General Public License v2 or later
License URI:  https://www.gnu.org/licenses/gpl-2.0.html
Text Domain:  huge-coder
Tags:         e-commerce, custom-menu, featured-images, full-width-template, threaded-comments, translation-ready

Huge Coder WordPress Theme is distributed under the terms of the GNU GPL.
*/

/* ==========================================================================
   1. Brand tokens
   ========================================================================== */
:root {
	/* Corporate palette */
	--hc-navy: #274359;
	--hc-teal: #47ede6;
	--hc-coral: #ff9a96;

	/* Surface colors */
	--hc-bg-peach: #ffede6;
	--hc-bg-gray: #f2f2f2;
	--hc-white: #ffffff;

	/* Text */
	--hc-text: #17242e;
	--hc-text-soft: #4c5c68;
	--hc-heading: var(--hc-navy);

	/* Derived / interactive */
	--hc-navy-dark: #1a2e3d;
	--hc-teal-dark: #26c9c1;
	--hc-coral-dark: #ff7d78;
	--hc-btn-bg: var(--hc-coral);
	--hc-btn-text: var(--hc-navy);
	--hc-btn-hover-bg: var(--hc-navy);
	--hc-btn-hover-text: var(--hc-white);

	--hc-footer-bg: var(--hc-navy);
	--hc-footer-bg-2: var(--hc-coral);

	/* Type */
	--hc-font-heading: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
	--hc-font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

	/* Layout */
	--hc-container: 1200px;
	--hc-container-narrow: 820px;
	--hc-radius-sm: 8px;
	--hc-radius: 16px;
	--hc-radius-lg: 28px;
	--hc-shadow-sm: 0 8px 24px -12px rgba(23, 36, 46, 0.14);
	--hc-shadow: 0 24px 48px -20px rgba(39, 67, 89, 0.22);
	--hc-shadow-lg: 0 32px 64px -24px rgba(39, 67, 89, 0.28);
	--hc-header-h: 96px;
	--hc-header-h-scrolled: 76px;
	--hc-ease: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ==========================================================================
   2. Reset / base
   ========================================================================== */
*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
		scroll-behavior: auto !important;
	}
}

body {
	margin: 0;
	font-family: var(--hc-font-body);
	color: var(--hc-text);
	background: var(--hc-white);
	font-size: 16px;
	line-height: 1.7;
	-webkit-font-smoothing: antialiased;
	overflow-x: hidden;
}

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

a {
	color: var(--hc-navy);
	text-decoration: none;
	transition: color 0.2s var(--hc-ease);
}
a:hover { color: var(--hc-coral-dark); }

h1, h2, h3, h4, h5, h6 {
	font-family: var(--hc-font-heading);
	color: var(--hc-heading);
	line-height: 1.22;
	font-weight: 700;
	margin: 0 0 0.6em;
	letter-spacing: -0.01em;
}

h1 { font-size: clamp(2.2rem, 1.6rem + 2.6vw, 3.75rem); }
h2 { font-size: clamp(1.8rem, 1.5rem + 1.5vw, 2.75rem); }
h3 { font-size: clamp(1.35rem, 1.2rem + 0.7vw, 1.75rem); }
h4 { font-size: 1.25rem; }

p { margin: 0 0 1.2em; color: var(--hc-text); }
p:last-child { margin-bottom: 0; }

ul, ol { padding-left: 1.2em; }

button, input, textarea, select { font-family: inherit; font-size: inherit; }

.screen-reader-text {
	border: 0;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px;
	width: 1px;
	overflow: hidden;
	position: absolute !important;
	word-wrap: normal !important;
}
.screen-reader-text:focus {
	background: var(--hc-white);
	color: var(--hc-navy);
	clip: auto !important;
	clip-path: none;
	height: auto;
	width: auto;
	display: block;
	top: 8px;
	left: 8px;
	padding: 12px 18px;
	z-index: 100000;
	border-radius: var(--hc-radius-sm);
	box-shadow: var(--hc-shadow);
}

.container {
	width: 100%;
	max-width: var(--hc-container);
	margin-inline: auto;
	padding-inline: 24px;
}
.container--narrow { max-width: var(--hc-container-narrow); }

/* ==========================================================================
   3. Sections / surfaces
   ========================================================================== */
.section { padding: clamp(56px, 5vw + 20px, 120px) 0; }
.section--peach { background: var(--hc-bg-peach); }
.section--gray { background: var(--hc-bg-gray); }
.section--navy { background: var(--hc-navy); color: var(--hc-white); }
.section--navy h1, .section--navy h2, .section--navy h3, .section--navy h4 { color: var(--hc-white); }
.section--navy p { color: rgba(255,255,255,0.78); }

.eyebrow {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-family: var(--hc-font-heading);
	font-size: 0.8rem;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--hc-coral-dark);
	background: rgba(255, 154, 150, 0.14);
	padding: 8px 16px;
	border-radius: 999px;
	margin-bottom: 18px;
}
.eyebrow::before {
	content: '';
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: var(--hc-teal);
}

.section-head { max-width: 720px; margin-bottom: 48px; }
.section-head.is-center { margin-inline: auto; text-align: center; }
.section-head p { color: var(--hc-text-soft); font-size: 1.08rem; }

/* ==========================================================================
   4. Buttons
   ========================================================================== */
.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	font-family: var(--hc-font-heading);
	font-weight: 600;
	font-size: 0.98rem;
	padding: 15px 30px;
	border-radius: 999px;
	border: 2px solid transparent;
	cursor: pointer;
	white-space: nowrap;
	transition: background-color 0.25s var(--hc-ease), color 0.25s var(--hc-ease), border-color 0.25s var(--hc-ease), transform 0.25s var(--hc-ease), box-shadow 0.25s var(--hc-ease);
}
.btn:active { transform: translateY(1px); }

.btn--primary {
	background: var(--hc-btn-bg);
	color: var(--hc-btn-text);
	box-shadow: 0 14px 30px -12px rgba(255, 154, 150, 0.65);
}
.btn--primary:hover {
	background: var(--hc-btn-hover-bg);
	color: var(--hc-btn-hover-text);
	box-shadow: 0 14px 30px -12px rgba(39, 67, 89, 0.5);
}

.btn--outline {
	background: transparent;
	border-color: currentColor;
	color: var(--hc-navy);
}
.btn--outline:hover { background: var(--hc-navy); color: var(--hc-white); border-color: var(--hc-navy); }

/* Any navy-background block — hand-coded or Nova-rendered alike, since
   .page-hero/.cta-banner are shared class names in both — must flip
   outline buttons to white text/border, otherwise "navy on navy" makes
   them unreadable. */
.section--navy .btn--outline,
.page-hero .btn--outline,
.cta-banner .btn--outline,
.on-navy-text .btn--outline { color: var(--hc-white); }
.section--navy .btn--outline:hover,
.page-hero .btn--outline:hover,
.cta-banner .btn--outline:hover,
.on-navy-text .btn--outline:hover { background: var(--hc-white); color: var(--hc-navy); }

.btn--ghost {
	background: rgba(39, 67, 89, 0.06);
	color: var(--hc-navy);
}
.btn--ghost:hover { background: var(--hc-coral); color: var(--hc-navy); }

.btn--sm { padding: 10px 20px; font-size: 0.88rem; }
.btn--block { width: 100%; }

/* ==========================================================================
   5. Site header
   ========================================================================== */
.site-header {
	position: sticky;
	top: 0;
	z-index: 999;
	background: rgba(255, 255, 255, 0.88);
	backdrop-filter: blur(14px) saturate(160%);
	-webkit-backdrop-filter: blur(14px) saturate(160%);
	border-bottom: 1px solid rgba(39, 67, 89, 0.08);
	transition: box-shadow 0.35s var(--hc-ease);
}
.site-header.is-scrolled { box-shadow: 0 10px 30px -18px rgba(23, 36, 46, 0.35); }

.header-inner {
	max-width: var(--hc-container);
	margin-inline: auto;
	padding-inline: 24px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	height: var(--hc-header-h);
	transition: height 0.32s var(--hc-ease);
}
.site-header.is-scrolled .header-inner { height: var(--hc-header-h-scrolled); }

.site-logo { display: flex; align-items: center; }
.site-logo img,
.site-logo svg {
	height: 64px;
	width: auto;
	transition: height 0.32s var(--hc-ease);
}
.site-header.is-scrolled .site-logo img,
.site-header.is-scrolled .site-logo svg { height: 48px; }

.primary-nav { display: flex; align-items: center; gap: 4px; }
.primary-nav ul {
	list-style: none;
	display: flex;
	align-items: center;
	gap: 2px;
	margin: 0;
	padding: 0;
}
.primary-nav li { position: relative; }
.primary-nav a {
	display: flex;
	align-items: center;
	gap: 6px;
	font-family: var(--hc-font-heading);
	font-weight: 600;
	font-size: 0.96rem;
	color: var(--hc-navy);
	padding: 12px 16px;
	border-radius: 999px;
}
.primary-nav > ul > li > a:hover,
.primary-nav > ul > li.current-menu-item > a,
.primary-nav > ul > li.current_page_item > a { background: rgba(39, 67, 89, 0.07); }

.primary-nav .menu-item-has-children > a::after {
	content: '';
	width: 7px;
	height: 7px;
	border-right: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	transform: rotate(45deg);
	margin-top: -4px;
	opacity: 0.6;
	transition: transform 0.2s var(--hc-ease);
}
.primary-nav .menu-item-has-children:hover > a::after { transform: rotate(225deg); margin-top: 4px; }

.primary-nav .nova-lang-switcher {
	margin-left: 6px;
	color: var(--hc-navy);
}
.primary-nav .nova-lang-switcher__item {
	padding: 8px 10px;
	border-radius: 999px;
	font-family: var(--hc-font-heading);
	font-weight: 600;
	font-size: 0.9rem;
	opacity: 0.85;
}
.primary-nav .nova-lang-switcher__item:hover { background: rgba(39, 67, 89, 0.07); opacity: 1; }
.primary-nav .nova-lang-switcher--dropdown:hover,
.primary-nav .nova-lang-switcher--dropdown:focus-within {
	background: var(--hc-white);
}
@media (max-width: 900px) {
	.primary-nav .nova-lang-switcher { margin: 12px 0 0; }
}

.primary-nav .sub-menu {
	position: absolute;
	top: calc(100% + 10px);
	left: 0;
	min-width: 240px;
	background: var(--hc-white);
	border-radius: var(--hc-radius);
	box-shadow: var(--hc-shadow);
	padding: 10px;
	list-style: none;
	margin: 0;
	opacity: 0;
	visibility: hidden;
	transform: translateY(8px);
	transition: opacity 0.22s var(--hc-ease), transform 0.22s var(--hc-ease), visibility 0.22s;
}
.primary-nav li:hover > .sub-menu,
.primary-nav li:focus-within > .sub-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.primary-nav .sub-menu a {
	padding: 11px 14px;
	border-radius: var(--hc-radius-sm);
	font-weight: 500;
	color: var(--hc-text);
}
.primary-nav .sub-menu a:hover { background: var(--hc-bg-peach); color: var(--hc-navy); }

.header-actions { display: flex; align-items: center; gap: 14px; }

.menu-toggle {
	display: none;
	flex-direction: column;
	gap: 5px;
	width: 42px;
	height: 42px;
	align-items: center;
	justify-content: center;
	background: rgba(39, 67, 89, 0.07);
	border: none;
	border-radius: 50%;
	cursor: pointer;
}
.menu-toggle span {
	display: block;
	width: 18px;
	height: 2px;
	background: var(--hc-navy);
	border-radius: 2px;
	transition: transform 0.25s var(--hc-ease), opacity 0.25s var(--hc-ease);
}
.site-header.is-menu-open .menu-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.site-header.is-menu-open .menu-toggle span:nth-child(2) { opacity: 0; }
.site-header.is-menu-open .menu-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 900px) {
	.primary-nav { position: fixed; inset: var(--hc-header-h-scrolled) 0 0 0; background: var(--hc-white); padding: 20px 24px 40px; overflow-y: auto; transform: translateY(-12px); opacity: 0; visibility: hidden; transition: opacity 0.28s var(--hc-ease), transform 0.28s var(--hc-ease), visibility 0.28s; }
	.site-header.is-menu-open .primary-nav { opacity: 1; visibility: visible; transform: translateY(0); }
	.primary-nav ul { flex-direction: column; align-items: stretch; gap: 4px; width: 100%; }
	.primary-nav a { padding: 14px 16px; }
	.primary-nav .sub-menu { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; background: var(--hc-bg-gray); margin-top: 4px; display: none; }
	.primary-nav li.is-open > .sub-menu { display: block; }
	.primary-nav .menu-item-has-children > a::after { margin-left: auto; }
	.menu-toggle { display: inline-flex; }
	.header-actions .btn--primary { display: none; }
}

/* ==========================================================================
   6. Footer
   ========================================================================== */
.site-footer { background: var(--hc-footer-bg); color: rgba(255,255,255,0.72); }
.footer-main { padding: 80px 0 56px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 48px; }
.footer-brand .site-logo img { height: 54px; }
.footer-brand p { color: rgba(255,255,255,0.62); margin-top: 18px; max-width: 34ch; }
.footer-col h4 { color: var(--hc-white); font-size: 1rem; margin-bottom: 20px; }
.footer-col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.footer-col a { color: rgba(255,255,255,0.68); font-size: 0.95rem; }
.footer-col a:hover { color: var(--hc-teal); }
.footer-contact li { display: flex; gap: 10px; align-items: flex-start; color: rgba(255,255,255,0.68); font-size: 0.95rem; }
.footer-contact .hc-icon { flex-shrink: 0; color: var(--hc-teal); margin-top: 3px; }

.social-links { display: flex; gap: 10px; margin-top: 22px; }
.social-links a {
	width: 40px; height: 40px;
	display: flex; align-items: center; justify-content: center;
	background: rgba(255,255,255,0.08);
	border-radius: 50%;
	color: var(--hc-white);
	transition: background-color 0.25s var(--hc-ease), transform 0.25s var(--hc-ease);
}
.social-links a:hover { background: var(--hc-coral); color: var(--hc-navy); transform: translateY(-3px); }
.social-links svg { width: 17px; height: 17px; }

.footer-bottom { background: var(--hc-footer-bg-2); }
.footer-bottom-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 18px 0;
	flex-wrap: wrap;
	font-size: 0.88rem;
	color: var(--hc-navy);
	font-weight: 500;
}
.footer-bottom a { color: var(--hc-navy); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.footer-bottom a:hover { color: var(--hc-white); }
.footer-credit { display: flex; align-items: center; gap: 6px; }
.legal-menu { display: flex; gap: 18px; list-style: none; margin: 0; padding: 0; }
.legal-menu a { color: var(--hc-navy); font-weight: 600; text-decoration: none; }
.legal-menu a:hover { color: var(--hc-white); }

@media (max-width: 900px) {
	.footer-grid { grid-template-columns: 1fr 1fr; row-gap: 40px; }
}
@media (max-width: 560px) {
	.footer-grid { grid-template-columns: 1fr; }
	.footer-bottom-inner { flex-direction: column; text-align: center; }
}

/* ==========================================================================
   7. Scroll-reveal animation (fade in from bottom)
   ========================================================================== */
.reveal {
	opacity: 0;
	transform: translateY(34px);
	transition: opacity 0.8s var(--hc-ease), transform 0.8s var(--hc-ease);
	transition-delay: var(--reveal-delay, 0ms);
	will-change: opacity, transform;
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
	.reveal { opacity: 1; transform: none; transition: none; }
}

/* ==========================================================================
   8. Back-to-top button
   ========================================================================== */
.back-to-top {
	position: fixed;
	right: 24px;
	bottom: 24px;
	z-index: 900;
	width: 48px;
	height: 48px;
	display: flex;
	align-items: center;
	justify-content: center;
	border: none;
	border-radius: 50%;
	background: var(--hc-navy);
	color: var(--hc-white);
	cursor: pointer;
	box-shadow: 0 10px 24px rgba(39, 67, 89, 0.28);
	opacity: 0;
	visibility: hidden;
	transform: translateY(12px);
	transition: opacity 0.25s var(--hc-ease), transform 0.25s var(--hc-ease), visibility 0.25s, background-color 0.25s var(--hc-ease);
}
.back-to-top.is-visible { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top:hover { background: var(--hc-coral); color: var(--hc-navy); }
.back-to-top svg { width: 20px; height: 20px; }

@media (max-width: 560px) {
	.back-to-top { right: 16px; bottom: 16px; width: 44px; height: 44px; }
}
@media (prefers-reduced-motion: reduce) {
	.back-to-top { transition: opacity 0.15s linear, visibility 0.15s; }
}
