/*
Theme Name: Pearl of Ocean
Theme URI: https://pearlofocean.com
Author: Pearl of Ocean
Description: An editorial, image-led WordPress theme for discovering Sri Lanka.
Version: 1.0.0
Requires at least: 6.2
Requires PHP: 7.4
License: GPL-2.0-or-later
Text Domain: pearl-of-ocean
*/

:root {
	--ocean: #123f4b;
	--ocean-deep: #0c303a;
	--sea-glass: #527b72;
	--palm: #71875e;
	--sand: #f4f0e6;
	--paper: #fbfaf6;
	--ink: #19343a;
	--muted: #687777;
	--gold: #c48a4b;
	--line: rgba(25, 52, 58, .16);
	--serif: "Iowan Old Style", "Baskerville Old Face", Baskerville, Georgia, serif;
	--sans: "Avenir Next", Avenir, "Segoe UI", sans-serif;
	--content: 1280px;
	--gutter: clamp(1.25rem, 5vw, 5rem);
	--radius: 2px;
	--ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 6rem; }
body {
	margin: 0;
	background: var(--paper);
	color: var(--ink);
	font-family: var(--sans);
	font-size: 16px;
	line-height: 1.65;
	-webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .2em; }
button, input, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
::selection { background: #d9e1d6; color: var(--ocean-deep); }

.skip-link {
	position: fixed; z-index: 1000; top: .75rem; left: .75rem;
	transform: translateY(-180%); padding: .8rem 1rem;
	background: var(--paper); color: var(--ocean-deep); border: 1px solid var(--line);
}
.skip-link:focus { transform: translateY(0); }
.container { width: min(calc(100% - 2 * var(--gutter)), var(--content)); margin-inline: auto; }
.eyebrow {
	display: inline-flex; align-items: center; gap: .6rem;
	margin: 0 0 1rem; color: var(--sea-glass); font-size: .68rem;
	font-weight: 700; letter-spacing: .16em; line-height: 1.3; text-transform: uppercase;
}
.eyebrow::before { content: ""; width: 1.8rem; height: 1px; background: currentColor; }
.display, h1, h2, h3 { font-family: var(--serif); font-weight: 400; letter-spacing: -.035em; }
h1, h2, h3, p { margin-top: 0; }
.section-heading { max-width: 740px; margin-bottom: clamp(2rem, 4vw, 3.8rem); }
.section-heading h2 { margin: 0; font-size: clamp(2.65rem, 5.8vw, 5.4rem); line-height: .99; text-wrap: balance; }
.section-heading p { max-width: 48ch; margin: 1.35rem 0 0; color: var(--muted); font-size: 1rem; }
.section-heading--row { display: flex; align-items: end; justify-content: space-between; gap: 2rem; max-width: none; }
.section-heading--row .heading-copy { max-width: 740px; }
.text-link { display: inline-flex; align-items: center; gap: .6rem; color: var(--ocean); font-size: .8rem; font-weight: 700; text-decoration: none; white-space: nowrap; }
.text-link::after { content: "↗"; font-size: 1rem; transition: transform .25s var(--ease); }
.text-link:hover::after { transform: translate(3px, -3px); }

/* Navigation */
.site-header {
	position: fixed; z-index: 50; inset: 0 0 auto; color: #fff;
	transition: background-color .3s ease, color .3s ease, box-shadow .3s ease;
}
.site-header.is-scrolled, .site-header.menu-open {
	background: rgba(251, 250, 246, .97); color: var(--ocean-deep);
	box-shadow: 0 1px 0 rgba(20, 50, 56, .1);
}
body:not(.home) .site-header { background: rgba(251, 250, 246, .97); color: var(--ocean-deep); box-shadow: 0 1px 0 rgba(20, 50, 56, .1); }
.header-inner { display: flex; min-height: 82px; align-items: center; justify-content: space-between; gap: 2rem; }
.custom-logo-link { display: block; max-width: 170px; }
.custom-logo { display: block; width: auto; max-width: 100%; max-height: 56px; }
.brand { display: inline-flex; align-items: center; gap: .72rem; color: inherit; text-decoration: none; flex-shrink: 0; }
.brand-mark { position: relative; width: 29px; height: 29px; border: 1px solid currentColor; border-radius: 50%; opacity: .86; }
.brand-mark::before, .brand-mark::after { content: ""; position: absolute; left: 5px; width: 17px; height: 7px; border-top: 1px solid currentColor; border-radius: 50%; transform: rotate(-22deg); }
.brand-mark::before { top: 9px; }
.brand-mark::after { top: 14px; left: 7px; width: 13px; }
.brand-name { display: grid; font-family: var(--serif); font-size: 1.05rem; line-height: 1; letter-spacing: -.02em; }
.brand-name small { margin-top: .28rem; font-family: var(--sans); font-size: .52rem; font-weight: 600; letter-spacing: .21em; text-transform: uppercase; }
.primary-nav { display: flex; align-items: center; gap: clamp(1rem, 2.5vw, 2.25rem); }
.primary-nav ul { display: flex; align-items: center; gap: clamp(1rem, 2.3vw, 2rem); margin: 0; padding: 0; list-style: none; }
.primary-nav a { color: inherit; font-size: .77rem; font-weight: 600; text-decoration: none; transition: opacity .2s ease; }
.primary-nav a:hover { opacity: .68; }
.header-cta { display: inline-flex; align-items: center; justify-content: center; min-height: 42px; padding: .65rem 1.05rem; border: 1px solid currentColor; color: inherit; font-size: .72rem; font-weight: 700; text-decoration: none; transition: color .25s ease, background .25s ease; }
.header-cta:hover { background: var(--paper); color: var(--ocean); }
.is-scrolled .header-cta:hover, .menu-open .header-cta:hover { background: var(--ocean); color: #fff; }
.menu-toggle { display: none; width: 44px; height: 44px; border: 1px solid currentColor; background: transparent; color: inherit; cursor: pointer; }
.menu-toggle span { display: block; width: 17px; height: 1px; margin: 5px auto; background: currentColor; transition: transform .2s ease; }
.menu-toggle[aria-expanded="true"] span:first-child { transform: translateY(3px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:last-child { transform: translateY(-3px) rotate(-45deg); }

/* Hero */
.hero { position: relative; display: grid; min-height: min(790px, 100svh); min-height: min(790px, 100dvh); align-items: end; overflow: hidden; background: #77867d; color: #fff; }
.hero-media, .hero-shade { position: absolute; inset: 0; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; object-position: center 52%; }
.hero-shade { background: linear-gradient(90deg, rgba(5, 33, 39, .55) 0%, rgba(9, 37, 40, .19) 47%, rgba(9, 37, 40, .04) 78%), linear-gradient(0deg, rgba(8, 32, 37, .39), transparent 45%); }
.hero-content { position: relative; z-index: 1; width: min(calc(100% - 2 * var(--gutter)), var(--content)); margin: 0 auto; padding: 10rem 0 clamp(4rem, 9vh, 7rem); }
.hero .eyebrow { color: #f0d2a7; }
.hero h1 { max-width: 750px; margin: 0; font-size: clamp(3.7rem, 8.2vw, 7.75rem); line-height: .91; text-wrap: balance; }
.hero h1 em { font-weight: 400; }
.hero-copy { max-width: 43ch; margin: 1.45rem 0 0; color: rgba(255,255,255,.9); font-size: clamp(1rem, 1.5vw, 1.15rem); line-height: 1.6; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.6rem; margin-top: 2rem; }
.button { display: inline-flex; min-height: 52px; align-items: center; justify-content: center; gap: .8rem; padding: .85rem 1.3rem; background: var(--ocean); border: 1px solid var(--ocean); color: #fff; font-size: .76rem; font-weight: 700; line-height: 1.2; text-decoration: none; transition: transform .25s var(--ease), background .25s ease, border-color .25s ease; }
.button::after { content: "↗"; font-size: 1rem; }
.button:hover { transform: translateY(-2px); background: var(--ocean-deep); border-color: var(--ocean-deep); }
.button:active { transform: translateY(1px) scale(.99); }
.button--light { background: var(--paper); border-color: var(--paper); color: var(--ocean-deep); }
.button--light:hover { background: #fff; border-color: #fff; }
.button--outline-light { background: transparent; border-color: rgba(255,255,255,.68); color: #fff; }
.button--outline-light:hover { background: rgba(255,255,255,.12); border-color: #fff; }
.hero-caption { position: absolute; right: var(--gutter); bottom: 2rem; z-index: 1; color: rgba(255,255,255,.82); font-size: .62rem; letter-spacing: .13em; text-transform: uppercase; }

/* Destinations */
.destinations-section { padding: clamp(5.5rem, 10vw, 9.5rem) 0 clamp(5rem, 9vw, 8.5rem); }
.destination-grid { display: grid; grid-template-columns: repeat(12, 1fr); grid-auto-rows: minmax(102px, 1fr); gap: 1rem; }
.destination-card { position: relative; min-height: 245px; overflow: hidden; background: #d6ddd6; color: #fff; isolation: isolate; }
.destination-card:nth-child(1) { grid-column: span 5; grid-row: span 4; min-height: 465px; }
.destination-card:nth-child(2) { grid-column: span 4; grid-row: span 3; min-height: 350px; }
.destination-card:nth-child(3) { grid-column: span 3; grid-row: span 3; min-height: 350px; }
.destination-card:nth-child(4) { grid-column: span 3; grid-row: span 3; min-height: 350px; }
.destination-card:nth-child(5) { grid-column: span 4; grid-row: span 3; min-height: 350px; }
.destination-card:nth-child(6) { grid-column: span 5; grid-row: span 3; min-height: 350px; }
.destination-card img { width: 100%; height: 100%; position: absolute; inset: 0; object-fit: cover; transition: transform .7s var(--ease); }
.destination-card::after { content: ""; position: absolute; inset: 0; z-index: 0; background: linear-gradient(0deg, rgba(7, 27, 31, .78), rgba(7, 27, 31, .07) 67%); transition: opacity .3s ease; }
.destination-card:hover img, .destination-card:focus-within img { transform: scale(1.045); }
.destination-card:hover::after { opacity: .88; }
.destination-copy { position: absolute; z-index: 1; inset: auto 1.35rem 1.3rem; }
.destination-copy .eyebrow { margin-bottom: .4rem; color: #f3d6ad; font-size: .58rem; }
.destination-copy h3 { margin: 0; font-size: clamp(1.65rem, 2.8vw, 2.6rem); line-height: 1; }
.destination-copy p { max-width: 34ch; margin: .55rem 0 0; color: rgba(255,255,255,.86); font-size: .78rem; line-height: 1.5; }
.destination-link { position: absolute; z-index: 2; inset: 0; display: block; color: transparent; font-size: 0; }
.destination-link:focus-visible { outline: 3px solid #fff; outline-offset: -6px; }

/* Island story */
.island-section { padding: clamp(5.5rem, 9vw, 8.5rem) 0; background: var(--sand); }
.island-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, .84fr); align-items: center; gap: clamp(3rem, 8vw, 8rem); }
.island-media { position: relative; min-height: 550px; }
.island-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.island-media::after { content: ""; position: absolute; inset: 1rem -1rem -1rem 1rem; border: 1px solid rgba(18,63,75,.25); pointer-events: none; }
.island-copy { max-width: 510px; padding: 1rem 0; }
.island-copy h2 { margin: 0; font-size: clamp(3rem, 6vw, 5.5rem); line-height: .96; text-wrap: balance; }
.island-copy h2 em { color: var(--sea-glass); }
.island-copy > p:not(.eyebrow) { margin: 1.5rem 0 0; color: #566768; font-size: .96rem; line-height: 1.8; }
.island-facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin: 2rem 0 2.2rem; padding-top: 1.35rem; border-top: 1px solid var(--line); }
.island-fact strong { display: block; font-family: var(--serif); font-size: 1.2rem; font-weight: 400; }
.island-fact span { display: block; margin-top: .25rem; color: var(--muted); font-size: .65rem; line-height: 1.45; }

/* Experiences */
.experiences-section { padding: clamp(5.5rem, 10vw, 9rem) 0; }
.experience-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.experience-card { position: relative; min-height: 320px; overflow: hidden; color: #fff; background: #536e69; }
.experience-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .65s var(--ease); }
.experience-card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(7, 27, 31, .75), rgba(7, 27, 31, .03) 72%); }
.experience-card:hover img { transform: scale(1.04); }
.experience-card a { position: absolute; z-index: 2; inset: 0; display: block; color: transparent; font-size: 0; }
.experience-card a:focus-visible { outline: 3px solid #fff; outline-offset: -6px; }
.experience-copy { position: absolute; z-index: 1; inset: auto 1.35rem 1.35rem; }
.experience-copy span { color: #f3d6ad; font-size: .62rem; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; }
.experience-copy h3 { max-width: 15ch; margin: .35rem 0 0; font-size: clamp(1.8rem, 3vw, 2.5rem); line-height: 1.05; }

/* Guides */
.journal-section { padding: clamp(5.5rem, 9vw, 8.5rem) 0; background: #e9eee9; }
.journal-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem; }
.journal-card { min-width: 0; }
.journal-image { display: block; position: relative; aspect-ratio: 1.42 / 1; overflow: hidden; background: #d4ded7; }
.journal-image img { width: 100%; height: 100%; object-fit: cover; transition: transform .65s var(--ease); }
.journal-card:hover .journal-image img { transform: scale(1.04); }
.journal-meta { display: flex; gap: .75rem; margin: 1rem 0 .55rem; color: var(--sea-glass); font-size: .62rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.journal-card h3 { max-width: 22ch; margin: 0; font-size: clamp(1.7rem, 2.8vw, 2.45rem); line-height: 1.05; }
.journal-card h3 a { text-decoration: none; }
.journal-card h3 a:hover { color: var(--sea-glass); }
.journal-card p { margin: .7rem 0 0; color: var(--muted); font-size: .82rem; line-height: 1.65; }
.journal-card .text-link { margin-top: .8rem; font-size: .7rem; }
.journal-empty { grid-column: 1 / -1; padding: 2rem 0; border-top: 1px solid var(--line); }
.journal-empty h3 { margin: 0; font-size: 2rem; }
.journal-empty p { max-width: 52ch; margin: .65rem 0 1rem; color: var(--muted); }

/* Closing invitation and footer */
.invitation { position: relative; display: grid; min-height: 500px; align-items: center; overflow: hidden; color: #fff; background: var(--ocean-deep); }
.invitation-media, .invitation-shade { position: absolute; inset: 0; }
.invitation-media img { width: 100%; height: 100%; object-fit: cover; object-position: center 64%; }
.invitation-shade { background: linear-gradient(90deg, rgba(7, 30, 35, .77), rgba(7, 30, 35, .24)), linear-gradient(0deg, rgba(7, 30, 35, .3), transparent 55%); }
.invitation-copy { position: relative; z-index: 1; max-width: 780px; padding: 7rem 0; }
.invitation .eyebrow { color: #f0d2a7; }
.invitation h2 { margin: 0; font-size: clamp(3rem, 7vw, 6.5rem); line-height: .93; text-wrap: balance; }
.invitation p:not(.eyebrow) { max-width: 43ch; margin: 1.25rem 0 1.8rem; color: rgba(255,255,255,.86); }
.site-footer { padding: 4.5rem 0 1.5rem; color: #e8eeeb; background: #103943; }
.footer-main { display: grid; grid-template-columns: 1.35fr 1fr 1fr 1fr; gap: 2rem; padding-bottom: 3.5rem; }
.footer-brand .brand { margin-bottom: 1rem; }
.footer-brand p { max-width: 31ch; color: rgba(232,238,235,.72); font-size: .8rem; }
.footer-column h2 { margin: .15rem 0 1rem; font-family: var(--sans); font-size: .66rem; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; }
.footer-column ul { display: grid; gap: .6rem; margin: 0; padding: 0; list-style: none; }
.footer-column a { color: rgba(232,238,235,.75); font-size: .76rem; text-decoration: none; }
.footer-column a:hover { color: #fff; }
.footer-bottom { display: flex; justify-content: space-between; gap: 1rem; padding-top: 1.2rem; border-top: 1px solid rgba(255,255,255,.18); color: rgba(232,238,235,.6); font-size: .65rem; }
.footer-bottom p { margin: 0; }

/* WordPress content views */
.content-shell { min-height: 60vh; padding: 10rem 0 6rem; }
.content-shell h1 { margin: 0 0 1.2rem; font-size: clamp(2.8rem, 6vw, 5rem); line-height: 1; }
.content-shell .entry-content { max-width: 72ch; }
.content-shell .entry-content img { height: auto; }
.content-shell .entry-content a { color: var(--ocean); }
.post-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem; margin-top: 3rem; }
.post-list .journal-card { padding-bottom: 2rem; }
.pagination { margin-top: 3rem; }
.pagination .nav-links { display: flex; gap: 1rem; }
.pagination a, .pagination .page-numbers { padding: .45rem .8rem; border: 1px solid var(--line); text-decoration: none; }
.post-nav { display: flex; justify-content: space-between; gap: 2rem; margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }
.post-nav a { max-width: 45%; color: var(--ocean); font-size: .85rem; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; }

@media (max-width: 980px) {
	.header-inner { min-height: 74px; }
	.menu-toggle { display: block; order: 3; }
	.primary-nav { position: absolute; top: 100%; left: 0; right: 0; display: none; align-items: stretch; padding: .5rem var(--gutter) 1.5rem; background: var(--paper); color: var(--ocean-deep); }
	.menu-open .primary-nav { display: grid; }
	.primary-nav ul { display: grid; gap: 0; }
	.primary-nav li { border-bottom: 1px solid var(--line); }
	.primary-nav a { display: block; padding: .9rem 0; font-size: .9rem; }
	.primary-nav .header-cta { width: fit-content; margin-top: 1rem; }
	.hero { min-height: min(720px, 100svh); min-height: min(720px, 100dvh); }
	.destination-card:nth-child(n) { grid-column: span 6; grid-row: span 3; min-height: 300px; }
	.destination-card:nth-child(1), .destination-card:nth-child(6) { grid-column: span 6; grid-row: span 4; min-height: 380px; }
	.island-layout { grid-template-columns: 1fr 1fr; gap: 3rem; }
	.island-media { min-height: 460px; }
	.experience-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.experience-card { min-height: 290px; }
	.footer-main { grid-template-columns: 1.4fr 1fr 1fr; }
	.footer-brand { grid-row: span 2; }
}

@media (max-width: 640px) {
	:root { --gutter: 1.2rem; }
	.header-inner { min-height: 68px; }
	.brand-name { font-size: .96rem; }
	.hero { min-height: 740px; min-height: max(680px, 92svh); min-height: max(680px, 92dvh); align-items: end; }
	.hero-media img { object-position: 63% center; }
	.hero-shade { background: linear-gradient(0deg, rgba(5, 33, 39, .78), rgba(9, 37, 40, .24) 70%, rgba(9, 37, 40, .06)); }
	.hero-content { padding: 8.5rem 0 5rem; }
	.hero h1 { max-width: 10ch; font-size: clamp(3.4rem, 17vw, 5.2rem); }
	.hero-copy { max-width: 34ch; font-size: .97rem; }
	.hero-actions { align-items: flex-start; gap: .85rem 1rem; }
	.hero-caption { display: none; }
	.section-heading--row { display: block; }
	.section-heading--row > .text-link { margin-top: 1.2rem; }
	.destination-grid { grid-template-columns: 1fr; grid-auto-rows: auto; gap: .8rem; }
	.destination-card:nth-child(n) { grid-column: auto; grid-row: auto; min-height: 340px; }
	.destination-card:nth-child(1), .destination-card:nth-child(6) { min-height: 400px; }
	.destination-copy { inset: auto 1.1rem 1.1rem; }
	.island-layout { grid-template-columns: 1fr; gap: 2.6rem; }
	.island-media { min-height: 390px; margin-right: .75rem; }
	.island-copy { padding: 0; }
	.island-copy h2 { font-size: clamp(3.2rem, 13vw, 4.6rem); }
	.experience-grid { grid-template-columns: 1fr; gap: .8rem; }
	.experience-card { min-height: 330px; }
	.journal-grid { grid-template-columns: 1fr; gap: 2.2rem; }
	.journal-image { aspect-ratio: 1.25 / 1; }
	.journal-card h3 { max-width: 19ch; font-size: 2rem; }
	.invitation { min-height: 520px; }
	.invitation-copy { padding: 5.5rem 0; }
	.invitation h2 { max-width: 10ch; font-size: clamp(3.2rem, 14vw, 4.8rem); }
	.footer-main { grid-template-columns: 1fr 1fr; gap: 2.4rem 1.5rem; }
	.footer-brand { grid-column: 1 / -1; grid-row: auto; }
	.footer-bottom { display: grid; gap: .5rem; }
	.post-list { grid-template-columns: 1fr; }
	.post-nav { display: grid; }
	.post-nav a { max-width: none; }
}

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