/* ==========================================================================
   Jed Glick Law Firm – Homepage Section Styles
   Requires global.css for CSS custom properties.
   ========================================================================== */

.jed-home {
	margin: 0;
	padding: 0;
	width: 100%;
}

/* ==========================================================================
   Homepage-only: transparent header → solid on scroll
   ========================================================================== */

/* Fixed so it overlays the hero instead of pushing it down */
.site-header--transparent {
	position: fixed;
	width: 100%;
	background: transparent;
	border-bottom: 1px solid transparent;
	box-shadow: none;
	transition: background 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
}

/* Solidified state — toggled by JS on scroll */
.site-header--transparent.is-scrolled {
	background: var(--color-white);
	border-bottom-color: rgba(0, 0, 0, 0.07);
	box-shadow: 0 2px 20px rgba(0, 0, 0, 0.05);
}

/* Text colours in transparent state */
.site-header--transparent:not(.is-scrolled) .site-header__firm-name {
	color: var(--color-white);
}

.site-header--transparent:not(.is-scrolled) .site-header__menu li a,
.site-header--transparent:not(.is-scrolled) .site-header__nav ul li a {
	color: rgba(255, 255, 255, 0.88);
}

.site-header--transparent:not(.is-scrolled) .site-header__menu li a:hover,
.site-header--transparent:not(.is-scrolled) .site-header__nav ul li a:hover,
.site-header--transparent:not(.is-scrolled) .site-header__menu .current-menu-item > a,
.site-header--transparent:not(.is-scrolled) .site-header__nav ul .current-menu-item > a {
	color: var(--color-gold);
}

/* Dropdown links always use dark text regardless of header transparency */
.site-header--transparent:not(.is-scrolled) .site-header__menu li.menu-item-has-children > ul li a {
	color: var(--color-text);
}

.site-header--transparent:not(.is-scrolled) .site-header__menu li.menu-item-has-children > ul li a:hover {
	color: var(--color-gold);
}

.site-header--transparent:not(.is-scrolled) .site-header__toggle span {
	background: var(--color-white);
}

/* Hero fills behind the fixed header */
.jed-home .section-hero {
	padding-top: calc(var(--section-v-pad) + var(--header-height));
}


/* Shared section heading style */
.section-heading {
	font-family: var(--font-serif);
	font-size: clamp(1.9rem, 3.5vw, 2.75rem);
	font-weight: 700;
	line-height: 1.2;
	margin: 0 0 1.5rem;
	position: relative;
	padding-bottom: 1.5rem;
}

.section-heading::after {
	content: '';
	position: absolute;
	bottom: 0;
	left: 50%;
	transform: translateX(-50%);
	width: 44px;
	height: 2px;
	background: #323e4d;
}

/* ==========================================================================
   Section: Hero
   ========================================================================== */
.section-hero {
	position: relative;
	min-height: 88vh;
	display: flex;
	align-items: center;
	justify-content: center;
	background-color: var(--color-navy);
	color: var(--color-white);
	padding: var(--section-v-pad) 2rem;
	overflow: hidden;
}

/* Full-bleed background video */
/* Oversized slightly so parallax offset never exposes a gap */
.section-hero__video {
	position: absolute;
	inset: -15% 0;
	width: 100%;
	height: 130%;
	object-fit: cover;
	z-index: 0;
	will-change: transform;
}

/* Dark overlay sits above video, below text */
.section-hero::before {
	content: '';
	position: absolute;
	inset: 0;
	background: linear-gradient(
		160deg,
		rgba(10, 18, 28, 0.82) 0%,
		rgba(15, 30, 48, 0.70) 100%
	);
	pointer-events: none;
	z-index: 1;
}

.section-hero__inner {
	position: relative;
	z-index: 2;
	max-width: 820px;
	width: 100%;
	text-align: center;
}

.section-hero__heading {
	font-family: var(--font-serif);
	font-size: clamp(2.5rem, 5.5vw, 4.2rem);
	font-weight: 600;
	line-height: 1.12;
	letter-spacing: -0.02em;
	margin: 0 0 1.5rem;
	color: var(--color-white);
}

.section-hero__logo {
	display: block;
	width: min(420px, 70vw);
	height: auto;
	margin: 0 auto 2.5rem;
}

.section-hero__subheading {
	font-size: clamp(1.05rem, 2vw, 1.25rem);
	line-height: 1.8;
	color: rgba(255, 255, 255, 0.72);
	margin: 0 auto 10px;
	max-width: 620px;
}

.section-hero__tagline {
	font-size: clamp(1.2rem, 2.5vw, 1.55rem);
	font-family: var(--font-serif);
	font-weight: 400;
	font-style: italic;
	line-height: 1.6;
	color: rgba(255, 255, 255, 0.85);
	margin: 0 auto 15px;
	max-width: 580px;
}

.section-hero__body {
	font-size: 0.9rem;
	line-height: 1.8;
	color: rgba(255, 255, 255, 0.65);
	margin: 0 auto 1.5rem;
	max-width: 780px;
}

.section-hero__cta {
	display: inline-block;
	background-color: transparent;
	color: var(--color-white);
	text-decoration: none;
	padding: 0.65rem 2.25rem;
	font-size: 0.82rem;
	font-weight: 600;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	border: 2px solid var(--color-white);
	border-radius: 100px;
	transition: background-color 0.2s ease, color 0.2s ease;
}

.section-hero__cta:hover,
.section-hero__cta:focus-visible {
	background-color: var(--color-white);
	color: var(--color-navy);
	outline: none;
}

/* ==========================================================================
   Section: About
   ========================================================================== */
.section-about {
	background: var(--color-white);
	padding: var(--section-v-pad) 2rem 2rem;
}

.section-about__inner {
	max-width: 740px;
	margin: 0 auto;
	text-align: center;
}

.section-about__heading {
	font-family: var(--font-serif);
	font-size: clamp(1.9rem, 3.5vw, 2.75rem);
	font-weight: 500;
	color: var(--color-navy);
	margin: 0 0 1.5rem;
	position: relative;
	padding-bottom: 1.5rem;
}

.section-about__heading::after {
	content: '';
	position: absolute;
	bottom: 0;
	left: 50%;
	transform: translateX(-50%);
	width: 44px;
	height: 2px;
	background: #323e4d;
}

.section-about__body {
	text-align: left;
	font-size: 1.05rem;
	line-height: 1.85;
	color: var(--color-text-md);
}

.section-about__body p { margin: 0 0 1.25rem; }
.section-about__body p:last-child { margin-bottom: 0; }

/* ==========================================================================
   Section: Services
   ========================================================================== */
.section-services {
	background: var(--color-white);
	padding: 0 2rem var(--section-v-pad);
}

.section-services__inner {
	max-width: var(--max-width);
	margin: 0 auto;
}

.section-services__heading {
	font-family: var(--font-serif);
	font-size: clamp(1.9rem, 3.5vw, 2.75rem);
	font-weight: 500;
	color: var(--color-navy);
	text-align: center;
	margin: 0 0 1.5rem;
	position: relative;
	padding-bottom: 1.5rem;
}

.section-services__heading::after {
	content: '';
	position: absolute;
	bottom: 0;
	left: 50%;
	transform: translateX(-50%);
	width: 44px;
	height: 2px;
	background: #323e4d;
}

.section-services__intro {
	text-align: center;
	color: var(--color-text-md);
	font-size: 1.05rem;
	max-width: 580px;
	margin: 0 auto 3.5rem;
	line-height: 1.8;
}

.section-services__grid {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	align-items: flex-start;
}

.section-services__card {
	flex: 1;
	padding: 0 3.5rem;
	border-right: 1px solid #323e4d;
}

.section-services__card:first-child { padding-left: 0; }
.section-services__card:last-child  { border-right: none; padding-right: 0; }

.section-services__num {
	display: block;
	font-family: var(--font-serif);
	font-size: clamp(3.5rem, 5vw, 5.5rem);
	font-weight: 300;
	line-height: 1;
	color: #323e4d;
	opacity: 0.35;
	margin-bottom: 1.75rem;
	letter-spacing: -0.02em;
}

.section-services__card-title {
	font-family: var(--font-serif);
	font-size: 2rem;
	font-weight: 500;
	color: var(--color-navy);
	margin: 0 0 1rem;
}

.section-services__card-desc {
	font-size: 0.925rem;
	color: var(--color-text-md);
	line-height: 1.8;
	margin: 0;
}

/* ==========================================================================
   Section: Blog
   ========================================================================== */
.section-blog {
	background: #F8FCFF;
	padding: var(--section-v-pad) 2rem;
}

.section-blog__inner {
	max-width: var(--max-width);
	margin: 0 auto;
}

.section-blog__header {
	text-align: center;
	margin-bottom: 4rem;
}

.section-blog__heading {
	font-family: var(--font-serif);
	font-size: clamp(1.9rem, 3.5vw, 2.75rem);
	font-weight: 500;
	color: var(--color-navy);
	margin: 0 0 1.5rem;
	position: relative;
	padding-bottom: 1.5rem;
}

.section-blog__heading::after {
	content: '';
	position: absolute;
	bottom: 0;
	left: 50%;
	transform: translateX(-50%);
	width: 44px;
	height: 2px;
	background: #323e4d;
}

.section-blog__subheading {
	font-size: 1.05rem;
	color: var(--color-text-md);
	line-height: 1.8;
	margin: 0;
	max-width: 520px;
	margin-inline: auto;
}

.section-blog__grid {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 1.5rem;
}

/* ── Blog card ── */
.blog-card {
	background: var(--color-white);
	overflow: hidden;
}

.blog-card__link {
	display: flex;
	flex-direction: column;
	text-decoration: none;
	height: 100%;
}

/* Image */
.blog-card__image-wrap {
	width: 100%;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	background: var(--color-navy-2);
}

.blog-card__image {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.5s ease;
}

.blog-card__link:hover .blog-card__image {
	transform: scale(1.04);
}

.blog-card__image-placeholder {
	width: 100%;
	height: 100%;
	background: linear-gradient(135deg, var(--color-navy) 0%, var(--color-navy-2) 100%);
}

/* Body */
.blog-card__body {
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	gap: 1.5rem;
	padding: 1.75rem 1.75rem;
	border-top: 1px solid #323e4d;
	flex: 1;
}

.blog-card__title {
	font-family: var(--font-serif);
	font-size: 1.2rem;
	font-weight: 500;
	color: var(--color-navy);
	line-height: 1.4;
	margin: 0;
	transition: color 0.2s ease;
}

.blog-card__link:hover .blog-card__title {
	color: var(--color-gold);
}

.blog-card__cta {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--color-navy);
	transition: color 0.2s ease;
}

.blog-card__arrow {
	display: inline-block;
	transition: transform 0.25s ease;
}

.blog-card__link:hover .blog-card__arrow {
	transform: translateX(6px);
}

.blog-card__link:hover .blog-card__cta {
	color: var(--color-gold);
}

@media (max-width: 780px) {
	.section-blog__grid { grid-template-columns: 1fr; }
}

/* ==========================================================================
   Section: CTA
   ========================================================================== */
.section-cta {
	position: relative;
	padding: 9rem 2rem;
	background-color: var(--color-navy);
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
	display: flex;
	align-items: center;
	justify-content: center;
	text-align: center;
	overflow: hidden;
}

/* Dark overlay so text stays readable over any image */
.section-cta::before {
	content: '';
	position: absolute;
	inset: 0;
	background: rgba(10, 18, 28, 0.62);
	pointer-events: none;
}

.section-cta__inner {
	position: relative;
	z-index: 1;
	max-width: 900px;
	width: 100%;
}

.section-cta__heading {
	font-family: var(--font-serif);
	font-size: clamp(1.25rem, 2vw, 1.75rem);
	font-weight: 500;
	line-height: 1.3;
	color: var(--color-white);
	margin: 0 0 2.5rem;
	letter-spacing: -0.01em;
}

.section-cta__btn {
	display: inline-flex;
	align-items: center;
	gap: 1.2em;
	background-color: transparent;
	color: var(--color-white);
	text-decoration: none;
	padding: 1rem 3rem;
	font-size: 0.8rem;
	font-weight: 600;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	border: 1px solid rgba(255, 255, 255, 0.7);
	border-radius: 999px;
	transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.section-cta__btn::after {
	content: '→';
	display: inline-block;
	font-size: 1em;
	letter-spacing: 0;
	transition: transform 0.5s ease;
}

.section-cta__btn:hover,
.section-cta__btn:focus-visible {
	background-color: var(--color-white);
	border-color: var(--color-white);
	color: var(--color-navy);
	outline: none;
}

.section-cta__btn:hover::after,
.section-cta__btn:focus-visible::after {
	transform: translateX(20px);
}

/* Image-only strip — no text, no overlay */
.section-cta--strip {
	height: 200px;
	padding: 0;
	background-position: bottom;
}

.section-cta--strip::before {
	display: none;
}

/* ==========================================================================
   Section: Contact
   ========================================================================== */
.section-contact {
	background: var(--color-white);
	padding: var(--section-v-pad) 2rem;
}

.section-contact--white  { background: var(--color-white); }
.section-contact--gray   { background: #f4f5f7; }
.section-contact--navy   { background: #1e3247; }

/* Dark variant — flip all text to light */
.section-contact--navy .section-contact__heading,
.section-contact--navy .section-contact__value {
	color: var(--color-white);
}

.section-contact--navy .section-contact__subheading {
	color: rgba(255, 255, 255, 0.65);
}

.section-contact--navy .section-contact__label {
	color: var(--color-gold);
}

.section-contact--navy a.section-contact__value:hover {
	color: #dd5847;
}

.section-contact--navy .contact-form__label {
	color: rgba(255, 255, 255, 0.6);
}

.section-contact--navy .contact-form__input {
	background: rgba(255, 255, 255, 0.07);
	border-color: rgba(255, 255, 255, 0.15);
	color: var(--color-white);
}

.section-contact--navy .contact-form__input::placeholder {
	color: rgba(255, 255, 255, 0.3);
}

.section-contact--navy .contact-form__input:focus {
	border-color: var(--color-gold);
}

.section-contact--navy .contact-form__submit {
	background: var(--color-gold);
	border-color: var(--color-gold);
	color: var(--color-white);
}

.section-contact--navy .contact-form__submit:hover {
	background: transparent;
	border-color: var(--color-gold);
	color: var(--color-gold);
}

.section-contact__inner {
	max-width: var(--max-width);
	margin: 0 auto;
	display: grid;
	grid-template-columns: 1fr 1.4fr;
	gap: 6rem;
	align-items: start;
}

/* ── Left: info ── */
.section-contact__heading {
	font-family: var(--font-serif);
	font-size: clamp(1.9rem, 3vw, 2.75rem);
	font-weight: 500;
	color: #dd5847;
	margin: 0 0 1.25rem;
}

.section-contact__subheading {
	color: var(--color-text-md);
	font-size: 1rem;
	line-height: 1.8;
	margin: 0 0 3rem;
}

.section-contact__subheading br {
	display: block;
	margin-bottom: 10px;
}

.section-contact__details {
	display: flex;
	flex-direction: column;
	gap: 1.75rem;
}

.section-contact__label {
	display: block;
	font-size: 0.6rem;
	font-weight: 600;
	letter-spacing: 0.2em;
	text-transform: uppercase;
	color: var(--color-gold);
	margin-bottom: 0.4rem;
}

.section-contact__value {
	font-size: 0.975rem;
	color: var(--color-text-md);
	text-decoration: none;
	transition: color 0.3s ease;
	line-height: 1.65;
	display: block;
}

a.section-contact__value:hover { color: #dd5847; }

/* ── Right: form ── */
.contact-form {
	display: flex;
	flex-direction: column;

}

/* ── CF7 layout ── */
.contact-form--cf7 .wpcf7-form {
	display: flex;
	flex-direction: column;

}

/* Strip CF7's default <p> margins */
.contact-form--cf7 .wpcf7-form p {
	margin: 0;
}

/* Single field wrapper */
.cf7-field {
	display: flex;
	flex-direction: column;
	gap: 0.45rem;
}

/* Two-column row */
.cf7-row--two {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 1.25rem;
}

/* Labels — wrap the input so display:flex stacks text above field */
.contact-form--cf7 label {
	display: flex;
	flex-direction: column;
	gap: 0.45rem;
	font-size: 0.7rem;
	font-weight: 600;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--color-white);
}

/* Inputs & textarea */
.contact-form--cf7 input[type="text"],
.contact-form--cf7 input[type="email"],
.contact-form--cf7 input[type="tel"],
.contact-form--cf7 textarea {
	background: #2e4054;
	border: 1px solid rgba(255, 255, 255, 0.18);
	color: var(--color-white);
	font-family: var(--font-sans);
	font-size: 0.925rem;
	padding: 0.85rem 1rem;
	outline: none;
	transition: border-color 0.2s ease;
	width: 100%;
	box-sizing: border-box;
	border-radius: 0;
}

.contact-form--cf7 input[type="text"]::placeholder,
.contact-form--cf7 input[type="email"]::placeholder,
.contact-form--cf7 input[type="tel"]::placeholder,
.contact-form--cf7 textarea::placeholder {
	color: rgba(255, 255, 255, 0.35);
}

.contact-form--cf7 input[type="text"]:focus,
.contact-form--cf7 input[type="email"]:focus,
.contact-form--cf7 input[type="tel"]:focus,
.contact-form--cf7 textarea:focus {
	border-color: rgba(255, 255, 255, 0.55);
}

.contact-form--cf7 textarea {
	resize: vertical;
	min-height: 130px;
}

/* Submit button */
.contact-form--cf7 input[type="submit"] {
	align-self: flex-start;
	background: var(--color-white);
	border: 1px solid var(--color-white);
	color: var(--color-navy);
	font-family: var(--font-sans);
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	padding: 0.9rem 2.5rem;
	cursor: pointer;
	transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
	border-radius: 0;
}

.contact-form--cf7 input[type="submit"]:hover {
	background: transparent;
	border-color: var(--color-white);
	color: var(--color-white);
}

/* Validation */
.contact-form--cf7 .wpcf7-not-valid-tip {
	font-size: 0.72rem;
	color: #f87171;
	margin-top: 0.25rem;
}

.contact-form--cf7 .wpcf7-response-output {
	font-size: 0.8rem;
	margin: 0.5rem 0 0;
	padding: 0.75rem 1rem;
	border: 1px solid;
	color: var(--color-white);
}

.contact-form--cf7 .wpcf7-mail-sent-ok {
	border-color: var(--color-gold);
}

.contact-form--cf7 .wpcf7-validation-errors,
.contact-form--cf7 .wpcf7-mail-sent-ng {
	border-color: #f87171;
}

@media (max-width: 860px) {
	.cf7-row--two {
		grid-template-columns: 1fr;
	}
}

.contact-form__row--two {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 1.25rem;
}

.contact-form__field {
	display: flex;
	flex-direction: column;
	gap: 0.45rem;
}

.contact-form__label {
	font-size: 0.7rem;
	font-weight: 600;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--color-text-md);
}

.contact-form__input {
	background: var(--color-white);
	border: 1px solid rgba(50, 62, 77, 0.2);
	color: var(--color-text);
	font-family: var(--font-sans);
	font-size: 0.925rem;
	padding: 0.85rem 1rem;
	outline: none;
	transition: border-color 0.2s ease;
	width: 100%;
	box-sizing: border-box;
}

.contact-form__input::placeholder {
	color: rgba(74, 74, 74, 0.35);
}

.contact-form__input:focus {
	border-color: var(--color-gold);
}

.contact-form__textarea {
	resize: vertical;
	min-height: 130px;
}

.contact-form__submit {
	align-self: flex-start;
	background: var(--color-navy);
	border: 1px solid var(--color-navy);
	color: var(--color-white);
	font-family: var(--font-sans);
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	padding: 0.9rem 2.5rem;
	cursor: pointer;
	transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.contact-form__submit:hover {
	background: transparent;
	border-color: var(--color-navy);
	color: var(--color-navy);
}

@media (max-width: 860px) {
	.section-contact__inner {
		grid-template-columns: 1fr;
		gap: 3.5rem;
	}
	.contact-form__row--two {
		grid-template-columns: 1fr;
	}
	.section-contact__heading,
	.section-contact__subheading,
	.section-contact__label,
	.section-contact__value {
		text-align: center;
	}
	.section-contact__details {
		align-items: center;
	}
}

/* ==========================================================================
   Animations
   ========================================================================== */

/* Hero content fades in on page load */
@keyframes jed-hero-in {
	from { opacity: 0; transform: translateY(22px); }
	to   { opacity: 1; transform: none; }
}

.section-hero__inner {
	animation: jed-hero-in 1.1s ease forwards;
	animation-delay: 0.25s;
	opacity: 0;
}

/* Scroll-reveal: sections fade up when they enter the viewport.
   JS (home.js) adds .is-visible via IntersectionObserver. */
.jed-reveal {
	opacity: 0;
	transform: translateY(30px);
	transition: opacity 0.75s ease, transform 0.75s ease;
}

.jed-reveal.is-visible {
	opacity: 1;
	transform: none;
}

/* Stagger child reveals inside a grid */
.jed-reveal-stagger > * {
	opacity: 0;
	transform: translateY(24px);
	transition: opacity 0.6s ease, transform 0.6s ease;
}

.jed-reveal-stagger.is-visible > *:nth-child(1) { opacity: 1; transform: none; transition-delay: 0s; }
.jed-reveal-stagger.is-visible > *:nth-child(2) { opacity: 1; transform: none; transition-delay: 0.1s; }
.jed-reveal-stagger.is-visible > *:nth-child(3) { opacity: 1; transform: none; transition-delay: 0.2s; }
.jed-reveal-stagger.is-visible > *:nth-child(4) { opacity: 1; transform: none; transition-delay: 0.3s; }

/* Respect reduced-motion preference */
@media (prefers-reduced-motion: reduce) {
	.section-hero__inner { animation: none; opacity: 1; }
	.jed-reveal,
	.jed-reveal-stagger > * { opacity: 1; transform: none; transition: none; }
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 700px) {
	.section-services__grid {
		flex-direction: column;
		gap: 3rem;
	}
	.section-services__card {
		padding: 0;
		border-right: none;
		border-bottom: 1px solid #323e4d;
		padding-bottom: 3rem;
	}
	.section-services__card:last-child { border-bottom: none; padding-bottom: 0; }
}
