/* ==========================================================================
   Olton Golf Club - homepage "Our Club" section
   Loaded on the front page only. Styles hang off classes set on the Fusion
   Builder containers/elements (Element > Extras > CSS Class), so the club can
   change every word and image in the builder without touching this file:

     Container  .ogc-home-intro    intro block
       Text     .ogc-home-label    "OUR CLUB"
       Title    .ogc-home-heading  heading (h2)
       Text     .ogc-home-body     paragraphs
     Container  .ogc-home-tiles    tile row
       Column   .ogc-tile          one tile (column link + background image)
         Text   .ogc-tile__num     "01"
         Title  .ogc-tile__title   tile title (h3)
         Text   .ogc-tile__sub     one-line subline

   Fonts and brand tokens come from ogc-header.css.

   Contrast:
     navy #1a1d54 on #f6f5f1           14.3:1  heading
     slate #4a4f63 on #f6f5f1           7.4:1  body
     deep gold #7a6a32 on #f6f5f1       4.9:1  label (brand gold #b5a162 is
                                               2.3:1, so it is not used for text)
     white on the black tile scrim, over a pure white photo, 42% up the tile:
     6.6:1 at rest, 5.8:1 on hover. Two-line sublines at 1280-1400px can reach ~47%
     up, where a pure white photo would fall below 4.5:1, so check any
     replacement photo is not bright in its lower half. Measured on the three
     chosen photos (99th-percentile brightest pixel under the text, hover
     state): 6.3:1 or better at every breakpoint.
   ========================================================================== */

:root {
	--ogc-home-bg: #f6f5f1;
	--ogc-home-navy: #1a1d54;
	--ogc-home-slate: #4a4f63;
	--ogc-home-gold-deep: #7a6a32;
	--ogc-home-gold: #b5a162;
}

/* --------------------------------------------------------------------------
   Shared: neutralise Avada's row/column spacing inside both containers.
   Avada writes these as inline !important styles, hence the !important here.
   -------------------------------------------------------------------------- */

.ogc-home-intro > .fusion-row,
.ogc-home-tiles > .fusion-row {
	width: 100% !important;
	max-width: none !important;
	margin-left: 0 !important;
	margin-right: 0 !important;
}

.ogc-home-intro .fusion-text,
.ogc-home-tiles .fusion-text,
.ogc-home-intro .fusion-title,
.ogc-home-tiles .fusion-title {
	margin: 0 !important;
}

.ogc-home-intro .fusion-text p,
.ogc-home-tiles .fusion-text p {
	margin: 0;
}

/* --------------------------------------------------------------------------
   1. Intro
   -------------------------------------------------------------------------- */

.ogc-home-intro {
	background: var(--ogc-home-bg);
	padding: 120px 24px 0 !important;
}

.ogc-home-intro .ogc-home-intro__col {
	width: 100% !important;
	max-width: 760px;
	margin: 0 auto !important;
	padding: 0 !important;
	text-align: center;
}

.ogc-home-intro .ogc-home-intro__col > .fusion-column-wrapper {
	align-items: center;
	margin: 0 !important;
	padding: 0 !important;
}

.ogc-home-intro .ogc-home-label p {
	font-family: var(--ogc-hdr-sans) !important;
	font-size: 12px !important;
	font-weight: 500 !important;
	line-height: 1.4 !important;
	letter-spacing: 0.36em !important;
	text-transform: uppercase;
	color: var(--ogc-home-gold-deep) !important;
	/* Tracking pads the right edge; pull it back so it centres optically. */
	margin-right: -0.36em;
}

.ogc-home-intro .ogc-home-heading {
	margin-top: 28px !important;
}

.ogc-home-intro .ogc-home-heading .fusion-title-heading {
	font-family: var(--ogc-hdr-serif) !important;
	font-size: 56px !important;
	font-weight: 400 !important;
	line-height: 1.15 !important;
	letter-spacing: 0 !important;
	text-transform: none !important;
	color: var(--ogc-home-navy) !important;
	text-align: center;
}

.ogc-home-intro .ogc-home-body {
	margin-top: 32px !important;
}

.ogc-home-intro .ogc-home-body p {
	font-family: var(--ogc-hdr-sans) !important;
	font-size: 18px !important;
	font-weight: 400 !important;
	line-height: 1.8 !important;
	letter-spacing: 0 !important;
	color: var(--ogc-home-slate) !important;
}

.ogc-home-intro .ogc-home-body p + p {
	margin-top: 28px;
}

/* Optional quote. Not used yet: no genuine published quote about Olton was
   found. If the club supplies one, add two Text elements with these classes
   (a <p>, never a <blockquote> - Avada gives blockquotes a gold background)
   and a Separator, or a Text element, with .ogc-home-divider. */
.ogc-home-intro .ogc-home-divider {
	display: block;
	width: 56px;
	height: 1px;
	margin: 56px auto !important;
	background: var(--ogc-home-gold);
	border: 0;
}

.ogc-home-intro .ogc-home-quote p {
	font-family: var(--ogc-hdr-serif) !important;
	font-size: 34px !important;
	font-style: italic;
	font-weight: 400 !important;
	line-height: 1.35 !important;
	color: var(--ogc-home-navy) !important;
}

.ogc-home-intro .ogc-home-cite p {
	margin-top: 20px;
	font-family: var(--ogc-hdr-sans) !important;
	font-size: 12px !important;
	font-weight: 500 !important;
	letter-spacing: 0.3em !important;
	text-transform: uppercase;
	color: var(--ogc-home-slate) !important;
}

/* --------------------------------------------------------------------------
   2. Tiles
   -------------------------------------------------------------------------- */

/* Side padding lives on the section: Avada zeroes row padding with
   "#wrapper #main .fullwidth-box .fusion-row", which no class selector beats. */
.ogc-home-tiles {
	background: var(--ogc-home-bg);
	padding: 96px 56px 120px !important;
}

.ogc-home-tiles > .fusion-row {
	display: grid !important;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 36px;
	max-width: 1588px !important; /* 1700px container less 2 x 56px padding */
	margin: 0 auto !important;
}

/* The tile: a Fusion column with a link and a background image. Avada draws
   the link as an <a> filling the whole column behind the text, and sets
   pointer-events:none on the text layer, so the whole tile is one target. */
.ogc-home-tiles .ogc-tile {
	position: relative;
	width: auto !important;
	margin: 0 !important;
	aspect-ratio: 1.07 / 1;
	overflow: hidden;
	cursor: pointer;
	isolation: isolate;
}

.ogc-home-tiles .ogc-tile .fusion-column-inner-bg {
	margin: 0 !important;
	inset: 0;
	overflow: hidden;
}

.ogc-home-tiles .ogc-tile .fusion-column-anchor {
	position: absolute !important;
	inset: 0;
	display: block;
	z-index: 0;
}

.ogc-home-tiles .ogc-tile .fusion-column-inner-bg-image {
	position: absolute !important;
	inset: 0;
	transform: scale(1);
	transition: transform 0.8s ease;
	will-change: transform;
}

/* Functional scrim so white text always passes 4.5:1. Neutral black (not
   navy, which tinted the photos blue) from ~75% at the bottom to 0 at 60% up,
   eased to hold its strength where the text sits. */
.ogc-home-tiles .ogc-tile .fusion-column-inner-bg::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
	pointer-events: none;
	background: linear-gradient(
		to top,
		rgba(0, 0, 0, 0.74) 0%,
		rgba(0, 0, 0, 0.7) 25%,
		rgba(0, 0, 0, 0.64) 42%,
		rgba(0, 0, 0, 0.36) 52%,
		rgba(0, 0, 0, 0.11) 57%,
		rgba(0, 0, 0, 0) 60%
	);
	transition: opacity 0.8s ease;
}

.ogc-home-tiles .ogc-tile:hover .fusion-column-inner-bg-image,
.ogc-home-tiles .ogc-tile:focus-within .fusion-column-inner-bg-image {
	transform: scale(1.04);
}

.ogc-home-tiles .ogc-tile:hover .fusion-column-inner-bg::after,
.ogc-home-tiles .ogc-tile:focus-within .fusion-column-inner-bg::after {
	opacity: 0.93;
}

/* Text layer, bottom-left. */
.ogc-home-tiles .ogc-tile > .fusion-column-wrapper {
	position: relative;
	z-index: 3;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	height: 100%;
	margin: 0 !important;
	padding: clamp(28px, 3vw, 50px) !important;
	box-sizing: border-box;
	background: none !important;
	pointer-events: none;
}

/* Keyboard focus: 2px white ring inset 6px, drawn above image and scrim. */
.ogc-home-tiles .ogc-tile > .fusion-column-wrapper::after {
	content: "";
	position: absolute;
	inset: 6px;
	border: 2px solid #fff;
	opacity: 0;
	pointer-events: none;
}

.ogc-home-tiles .ogc-tile:has(.fusion-column-anchor:focus-visible) > .fusion-column-wrapper::after {
	opacity: 1;
}

.ogc-home-tiles .ogc-tile .fusion-column-anchor:focus,
.ogc-home-tiles .ogc-tile .fusion-column-anchor:focus-visible {
	outline: none;
}

/* Fallback for browsers without :has() - outline on the link itself. */
@supports not selector(:has(*)) {
	.ogc-home-tiles .ogc-tile .fusion-column-anchor:focus-visible {
		outline: 2px solid #fff;
		outline-offset: -6px;
	}
}

.ogc-home-tiles .ogc-tile__num p {
	font-family: var(--ogc-hdr-sans) !important;
	font-size: 13px !important;
	font-weight: 500 !important;
	line-height: 1.4 !important;
	letter-spacing: 0.3em !important;
	color: rgba(255, 255, 255, 0.8) !important;
}

.ogc-home-tiles .ogc-tile__title {
	margin-top: 6px !important;
}

.ogc-home-tiles .ogc-tile__title .fusion-title-heading {
	font-family: var(--ogc-hdr-serif) !important;
	font-size: clamp(30px, 2.4vw, 40px) !important;
	font-weight: 400 !important;
	line-height: 1.1 !important;
	letter-spacing: 0 !important;
	text-transform: none !important;
	color: #fff !important;
}

.ogc-home-tiles .ogc-tile__sub {
	margin-top: 12px !important;
}

.ogc-home-tiles .ogc-tile__sub p {
	font-family: var(--ogc-hdr-sans) !important;
	font-size: 17px !important;
	font-weight: 400 !important;
	line-height: 1.5 !important;
	letter-spacing: 0 !important;
	color: rgba(255, 255, 255, 0.9) !important;
}

/* --------------------------------------------------------------------------
   Breakpoints

   Below 1280px three columns crowd: the subline wraps and the text block
   climbs past the scrim. So the tiles stack as wide panels from there down
   (the brief allowed one column on tablet if the titles crowd).
   -------------------------------------------------------------------------- */

@media (max-width: 1279px) {
	.ogc-home-tiles > .fusion-row {
		grid-template-columns: minmax(0, 1fr);
		gap: 20px;
	}

	.ogc-home-tiles {
		padding-left: 32px !important;
		padding-right: 32px !important;
	}

	.ogc-home-tiles .ogc-tile {
		aspect-ratio: auto;
		height: 440px;
	}
}

@media (max-width: 767px) {
	.ogc-home-intro {
		padding-top: 72px !important;
	}

	.ogc-home-intro .ogc-home-heading .fusion-title-heading {
		font-size: 36px !important;
	}

	.ogc-home-intro .ogc-home-body p {
		font-size: 16px !important;
	}

	.ogc-home-intro .ogc-home-quote p {
		font-size: 26px !important;
	}

	.ogc-home-tiles {
		padding: 72px 24px 72px !important;
	}

	.ogc-home-tiles > .fusion-row {
		gap: 16px;
	}

	.ogc-home-tiles .ogc-tile {
		height: 380px;
	}

	.ogc-home-tiles .ogc-tile > .fusion-column-wrapper {
		padding: 28px !important;
	}

	.ogc-home-tiles .ogc-tile__title .fusion-title-heading {
		font-size: 30px !important;
	}
}

@media (prefers-reduced-motion: reduce) {
	.ogc-home-tiles .ogc-tile .fusion-column-inner-bg-image,
	.ogc-home-tiles .ogc-tile .fusion-column-inner-bg::after {
		transition: none;
	}

	.ogc-home-tiles .ogc-tile:hover .fusion-column-inner-bg-image,
	.ogc-home-tiles .ogc-tile:focus-within .fusion-column-inner-bg-image {
		transform: none;
	}
}
