/*
Theme Name: Surfing Croyde Bay
Description: Clean, fast theme for Surfing Croyde Bay. Pages and posts are edited with the normal WordPress editor.
Version: 1.0.0
Requires at least: 6.3
Requires PHP: 7.4
Text Domain: scb
*/

:root {
  --ink: #12161c;
  --navy: #26405f;
  --navy-dark: #1a2e46;
  --sky: #9ccbe6;
  --sand: #f5f2ec;
  --muted: #5d6673;
  --line: #e4e6ea;
  --white: #ffffff;
  --wrap: 1160px;
  --narrow: 780px;
  --radius: 8px;
  --head: "Montserrat", system-ui, -apple-system, "Segoe UI", sans-serif;
  --body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --gutter: clamp(18px, 4vw, 32px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--white); color: var(--ink); font: 400 17px/1.7 var(--body); overflow-x: clip; }
img { max-width: 100%; height: auto; }
a { color: var(--navy); text-underline-offset: 3px; }
a:hover { color: var(--navy-dark); }
h1, h2, h3, h4, h5, h6 { font-family: var(--head); color: var(--ink); line-height: 1.15; margin: 1.6em 0 .55em; font-weight: 700; }
h1 { font-size: clamp(2.1rem, 5.2vw, 3.6rem); text-transform: uppercase; letter-spacing: .01em; }
h2 { font-size: clamp(1.55rem, 3.2vw, 2.25rem); text-transform: uppercase; letter-spacing: .015em; }
h3 { font-size: clamp(1.15rem, 2vw, 1.4rem); }
h4 { font-size: 1.1rem; }
h5, h6 { font-size: 1rem; text-transform: uppercase; letter-spacing: .06em; }
p { margin: 0 0 1.1em; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.skip-link:focus { position: fixed; left: 12px; top: 12px; z-index: 1000; background: #fff; padding: 10px 14px; clip: auto; width: auto; height: auto; }

/* ---------- header ---------- */
.site-header { position: sticky; top: 0; z-index: 100; background: rgba(255,255,255,.97); backdrop-filter: blur(6px); border-bottom: 1px solid var(--line); }
.admin-bar .site-header { top: 32px; }
.site-header__inner { max-width: 1320px; margin: 0 auto; padding: 10px var(--gutter); display: flex; align-items: center; gap: 24px; min-height: 76px; }
.site-logo img { display: block; width: 64px; height: 64px; }
.site-nav { margin-left: auto; }
.site-nav ul { list-style: none; margin: 0; padding: 0; }
.site-nav > ul { display: flex; gap: 4px; align-items: center; }
.site-nav li { position: relative; }
.site-nav a { display: block; padding: 10px 12px; font: 600 12.5px/1 var(--head); letter-spacing: .1em; text-transform: uppercase; color: var(--ink); text-decoration: none; }
.site-nav a:hover, .site-nav .current-menu-item > a, .site-nav .current-menu-ancestor > a { color: var(--navy); }
.site-nav .sub-menu { position: absolute; left: 0; top: 100%; min-width: 230px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 12px 30px rgba(18,22,28,.12); padding: 8px 0; opacity: 0; visibility: hidden; transform: translateY(6px); transition: .18s; }
.site-nav li:hover > .sub-menu, .site-nav li:focus-within > .sub-menu { opacity: 1; visibility: visible; transform: none; }
.site-nav .sub-menu a { padding: 10px 18px; letter-spacing: .06em; }
.header-cta { margin-left: 8px; }
.btn, .wp-block-button__link, .wp-element-button, button[type=submit], .scb-form button {
  display: inline-block; background: var(--ink); color: #fff !important; border: 0; border-radius: 4px; padding: 14px 26px;
  font: 600 13px/1.2 var(--head); letter-spacing: .12em; text-transform: uppercase; text-decoration: none; cursor: pointer; transition: background .2s, transform .2s;
}
.btn:hover, .wp-block-button__link:hover, button[type=submit]:hover { background: var(--navy); transform: translateY(-1px); }
.btn--light { background: #fff; color: var(--ink) !important; }
.btn--light:hover { background: var(--sky); }
.nav-toggle { display: none; margin-left: auto; background: none; border: 0; padding: 10px; cursor: pointer; }
.nav-toggle span { display: block; width: 26px; height: 2px; background: var(--ink); margin: 6px 0; transition: .2s; }
@media (max-width: 1060px) {
  .nav-toggle { display: block; }
  .site-nav { position: fixed; inset: 76px 0 0 0; background: #fff; margin: 0; padding: 12px var(--gutter) 40px; overflow-y: auto; display: none; }
  .admin-bar .site-nav { top: 108px; }
  .nav-open .site-nav { display: block; }
  .site-nav > ul { flex-direction: column; align-items: stretch; gap: 0; }
  .site-nav a { padding: 16px 4px; font-size: 14px; border-bottom: 1px solid var(--line); }
  .site-nav .sub-menu { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: 0; padding: 0 0 0 16px; }
  .header-cta { margin-left: 0; }
  .header-cta .btn { padding: 11px 16px; font-size: 12px; }
  .nav-open .nav-toggle span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
  .nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
  .nav-open .nav-toggle span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
}
@media (max-width: 600px) { .site-logo img { width: 52px; height: 52px; } .site-header__inner { gap: 12px; min-height: 68px; } .site-nav { inset: 68px 0 0 0; } }

/* ---------- page banner ---------- */
.hero { position: relative; display: flex; align-items: flex-end; min-height: clamp(320px, 52vh, 560px); background: var(--navy-dark) center 30%/cover no-repeat; color: #fff; isolation: isolate; }
.hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10,18,30,.15) 0%, rgba(10,18,30,.35) 45%, rgba(10,18,30,.78) 100%); z-index: -1; }
.hero--front { min-height: clamp(460px, 82vh, 820px); align-items: center; }
.hero--front::before { background: linear-gradient(90deg, rgba(10,18,30,.78) 0%, rgba(10,18,30,.45) 55%, rgba(10,18,30,.15) 100%); }
.hero__inner { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 64px var(--gutter) 56px; }
.hero h1 { color: #fff; margin: 0 0 .3em; max-width: 18ch; text-shadow: 0 2px 24px rgba(0,0,0,.25); }
.hero__sub { font: 500 clamp(1.05rem, 2vw, 1.35rem)/1.45 var(--body); max-width: 40ch; margin: 0 0 1.4em; color: rgba(255,255,255,.92); }
.hero__meta { font-size: .95rem; color: rgba(255,255,255,.85); margin: 0; }
.hero__meta a { color: #fff; }
.hero .btns { display: flex; gap: 12px; flex-wrap: wrap; }
.page-head { background: var(--sand); padding: clamp(48px, 8vw, 88px) var(--gutter) clamp(32px, 5vw, 56px); }
.page-head__inner { max-width: var(--wrap); margin: 0 auto; }
.page-head h1 { margin: 0 0 .25em; }
.page-head p { color: var(--muted); margin: 0; }
.single .page-head__inner, .single .hero__inner { max-width: var(--narrow); }

/* ---------- content bands ---------- */
.entry { padding-bottom: 24px; }
.entry > :not(.scb-band):not(.alignfull) { max-width: var(--wrap); margin-left: auto; margin-right: auto; padding-left: var(--gutter); padding-right: var(--gutter); }
.scb-band { padding: clamp(40px, 6vw, 72px) var(--gutter); margin: 0 !important; }
.scb-band > * { max-width: var(--wrap); margin-left: auto !important; margin-right: auto !important; }
.single .scb-band > * { max-width: var(--narrow); }
.single .scb-band { padding-top: 28px; padding-bottom: 28px; }
.scb-band:has(.scb-price), .scb-band:has(.scb-testimonials) { background: var(--sand); }
.scb-band > :first-child { margin-top: 0; }
.scb-band > :last-child { margin-bottom: 0; }
.scb-band h2:first-child, .scb-band h3:first-child { margin-top: 0; }
.wp-block-columns { gap: clamp(20px, 3vw, 40px); margin-bottom: 1.6em; align-items: flex-start !important; }
.wp-block-column > :first-child { margin-top: 0; }
.wp-block-image { margin: 0 0 1.2em; }
.wp-block-image img { border-radius: var(--radius); display: block; }
.wp-block-columns .wp-block-image.scb-photo img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.wp-block-column > .scb-logos { justify-content: flex-start; }
.wp-block-image.scb-graphic img { width: auto; max-height: 220px; }
.scb-kicker { font: 700 .82rem/1.3 var(--head); letter-spacing: .14em; text-transform: uppercase; color: var(--navy); margin-bottom: .4em; }
.wp-block-separator { border: 0; border-top: 1px solid var(--line); margin: 2em auto; }
.wp-block-list li { margin-bottom: .35em; }
.wp-block-buttons { display: flex; flex-wrap: wrap; gap: 12px; margin: 1.2em 0; }
.wp-block-quote { margin: 0 0 1.4em; padding: 0 0 0 22px; border-left: 3px solid var(--sky); font-size: 1.05rem; }
.wp-block-quote cite { display: block; margin-top: .6em; font: 600 .85rem/1.3 var(--head); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); font-style: normal; }
.wp-block-embed { margin: 0 0 1.4em; }
.wp-block-embed iframe, .entry iframe { width: 100%; border-radius: var(--radius); }
.wp-block-table table { width: 100%; border-collapse: collapse; }
.wp-block-table td, .wp-block-table th { border: 1px solid var(--line); padding: 10px 12px; }

/* press logos */
.scb-logos { display: flex !important; flex-wrap: wrap; align-items: center; justify-content: center; gap: 18px 44px; padding: 8px 0; }
.scb-logos .wp-block-image { margin: 0; }
.scb-logos img { height: 34px !important; width: auto !important; max-height: none; border-radius: 0; filter: grayscale(1); opacity: .75; transition: .2s; }
.scb-logos img:hover { filter: none; opacity: 1; }
.scb-band:has(> .scb-logos:only-child), .scb-band:has(> .wp-block-columns:only-child .scb-logos) { padding-top: 28px; padding-bottom: 28px; border-bottom: 1px solid var(--line); }

/* price cards */
.scb-price { position: relative; height: 100%; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 32px 26px 28px !important; text-align: center; box-shadow: 0 6px 24px rgba(18,22,28,.06); }
.scb-price > * { max-width: none !important; }
.scb-price h3 { margin: 0 0 .3em; font-size: 1.15rem; text-transform: uppercase; letter-spacing: .06em; }
.scb-price-sub { color: var(--muted); font-size: .85rem; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 1em; }
.scb-price-amount { font-family: var(--head); margin: .2em 0 .8em; color: var(--navy); }
.scb-price-amount strong { font-size: 2.7rem; font-weight: 800; line-height: 1; }
.scb-price-amount span { font-size: .9rem; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.scb-price ul { list-style: none; padding: 0; margin: 0 0 1.4em; text-align: left; display: inline-block; }
.scb-price li { padding-left: 26px; position: relative; font-size: .95rem; }
.scb-price li::before { content: ""; position: absolute; left: 2px; top: .45em; width: 12px; height: 7px; border-left: 2px solid var(--navy); border-bottom: 2px solid var(--navy); transform: rotate(-45deg); }
.scb-price .wp-block-buttons { justify-content: center; margin-bottom: 0; }
.scb-ribbon { position: absolute; top: 14px; right: 14px; background: var(--navy); color: #fff; font: 700 .7rem/1 var(--head); letter-spacing: .1em; text-transform: uppercase; padding: 7px 10px; border-radius: 3px; margin: 0; }
.wp-block-columns:has(.scb-price) { align-items: stretch !important; }
.wp-block-column:has(> .scb-price) { display: flex; }
.wp-block-column:has(> .scb-price) > .scb-price { width: 100%; }

/* cards, boxes, slides */
.scb-card, .scb-box { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 26px !important; height: 100%; }
.scb-card > *, .scb-box > * { max-width: none !important; }
.scb-card h3, .scb-box h4 { margin-top: 0; }
.scb-slide { background: var(--navy-dark); color: #fff; border: 0; }
.scb-slide h3 { color: #fff; text-transform: uppercase; letter-spacing: .05em; }
.scb-slide .wp-block-button__link { background: #fff; color: var(--ink) !important; }

/* testimonials */
.scb-testimonials { display: grid !important; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 22px; }
.scb-testimonials > .wp-block-quote { margin: 0 !important; background: #fff; border: 0; border-radius: 12px; padding: 28px 26px; box-shadow: 0 6px 24px rgba(18,22,28,.06); font-size: .98rem; position: relative; }
.scb-testimonials > .wp-block-quote::before { content: "\201C"; font: 700 3.6rem/1 Georgia, serif; color: var(--sky); position: absolute; top: 10px; left: 22px; }
.scb-testimonials > .wp-block-quote p { margin-top: 1.4em; }
.scb-testimonials > .wp-block-quote:nth-child(n+7) { display: none; }

/* FAQs */
.scb-faq { border-top: 1px solid var(--line); }
.scb-faq > * { max-width: none !important; }
.wp-block-details { border-bottom: 1px solid var(--line); padding: 0; margin: 0 !important; }
.wp-block-details summary { list-style: none; cursor: pointer; padding: 18px 40px 18px 0; position: relative; font: 600 1.02rem/1.4 var(--head); }
.wp-block-details summary::-webkit-details-marker { display: none; }
.wp-block-details summary::after { content: "+"; position: absolute; right: 6px; top: 14px; font: 400 1.6rem/1 var(--body); color: var(--navy); transition: transform .2s; }
.wp-block-details[open] summary::after { transform: rotate(45deg); }
.wp-block-details > :not(summary) { margin-left: 0; }
.wp-block-details[open] { padding-bottom: 14px; }

/* forms */
.scb-form { display: grid; gap: 14px; max-width: 640px; }
.scb-field { display: grid; gap: 6px; font-size: .9rem; font-weight: 600; }
.scb-field input, .scb-field textarea, .scb-field select { font: inherit; font-weight: 400; padding: 12px 14px; border: 1px solid #cfd4db; border-radius: 6px; background: #fff; width: 100%; }
.scb-field input:focus, .scb-field textarea:focus { outline: 2px solid var(--sky); border-color: var(--navy); }
.scb-form button { justify-self: start; }
.scb-form-msg { font-weight: 600; }
.scb-form-msg.ok { color: #1f7a4a; } .scb-form-msg.err { color: #b42318; }

/* posts grids */
.wp-block-latest-posts.is-grid { display: grid !important; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 26px; padding: 0; margin: 0; }
.wp-block-latest-posts.is-grid li { width: auto !important; margin: 0 !important; background: #fff; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; padding: 0 0 22px; }
.wp-block-latest-posts__featured-image { margin: 0 0 16px !important; }
.wp-block-latest-posts__featured-image img { width: 100%; aspect-ratio: 16/10; object-fit: cover; display: block; border-radius: 0; }
.wp-block-latest-posts__post-title { display: block; padding: 0 20px; font: 700 1.08rem/1.3 var(--head); color: var(--ink); text-decoration: none; }
.wp-block-latest-posts__post-excerpt { padding: 0 20px; margin: .6em 0 0; color: var(--muted); font-size: .95rem; }
.cards { list-style: none; margin: 0 auto; padding: clamp(36px, 6vw, 64px) var(--gutter); max-width: calc(var(--wrap) + 2 * var(--gutter)); display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 26px; }
.card { background: #fff; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; display: flex; flex-direction: column; }
.card__img:not([style*=url]) { display: none; }
.card__img { display: block; aspect-ratio: 16/10; background: var(--sand) center/cover no-repeat; }
.card__body { padding: 20px 22px 24px; }
.card__meta { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 0 0 .4em; }
.card h2 { font-size: 1.12rem; text-transform: none; letter-spacing: 0; margin: 0 0 .5em; }
.card h2 a { color: var(--ink); text-decoration: none; }
.card p { color: var(--muted); font-size: .95rem; margin: 0; }
.pagination { max-width: var(--wrap); margin: 0 auto 64px; padding: 0 var(--gutter); display: flex; gap: 8px; flex-wrap: wrap; }
.pagination .page-numbers { padding: 10px 15px; border: 1px solid var(--line); border-radius: 4px; text-decoration: none; color: var(--ink); }
.pagination .current { background: var(--ink); color: #fff; }

/* post extras */
.post-footer { max-width: var(--narrow); margin: 0 auto; padding: 8px var(--gutter) 56px; }
.share { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; font-size: .9rem; color: var(--muted); }
.share a { padding: 8px 14px; border: 1px solid var(--line); border-radius: 30px; text-decoration: none; color: var(--ink); font-size: .85rem; }
.share a:hover { border-color: var(--navy); color: var(--navy); }
.tags { margin-top: 18px; font-size: .9rem; color: var(--muted); }
.related { background: var(--sand); }
.related > h2 { text-align: center; margin: 0; padding-top: clamp(40px, 6vw, 64px); }

/* CTA strip + footer */
.cta-strip { background: var(--navy); color: #fff; }
.cta-strip__inner { max-width: var(--wrap); margin: 0 auto; padding: 48px var(--gutter); display: flex; gap: 24px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.cta-strip h2 { color: #fff; margin: 0; font-size: clamp(1.3rem, 2.6vw, 1.9rem); }
.cta-strip p { margin: .3em 0 0; color: rgba(255,255,255,.85); }
.site-footer { background: #0d1117; color: rgba(255,255,255,.78); font-size: .95rem; }
.site-footer a { color: rgba(255,255,255,.78); text-decoration: none; }
.site-footer a:hover { color: #fff; }
.site-footer__inner { max-width: 1240px; margin: 0 auto; padding: 64px var(--gutter) 40px; display: grid; grid-template-columns: 1.3fr 1fr 1fr 1fr; gap: 40px; }
.site-footer h3 { color: #fff; font-size: .82rem; letter-spacing: .14em; text-transform: uppercase; margin: 0 0 1.2em; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: .55em; }
.footer-logo img { width: 120px; height: auto; display: block; margin-bottom: 18px; }
.social { display: flex; gap: 10px; margin-top: 18px; }
.social a { width: 40px; height: 40px; border: 1px solid rgba(255,255,255,.25); border-radius: 50%; display: grid; place-items: center; }
.social svg { width: 18px; height: 18px; fill: currentColor; }
.site-footer__base { border-top: 1px solid rgba(255,255,255,.1); text-align: center; padding: 20px var(--gutter); font-size: .85rem; color: rgba(255,255,255,.55); }
@media (max-width: 900px) { .site-footer__inner { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .site-footer__inner { grid-template-columns: 1fr; gap: 30px; } }
@media (max-width: 781px) {
  .wp-block-columns { flex-wrap: wrap !important; }
  .wp-block-columns > .wp-block-column { flex-basis: 100% !important; }
  .hero__inner { padding-top: 48px; padding-bottom: 40px; }
}

/* 404 / search */
.notfound { max-width: var(--narrow); margin: 0 auto; padding: 80px var(--gutter); text-align: center; }
.search-form { display: flex; gap: 8px; max-width: 520px; margin: 24px auto 0; }
.search-form input[type=search] { flex: 1; font: inherit; padding: 12px 14px; border: 1px solid #cfd4db; border-radius: 6px; }

/* homepage tiles + feature */
.scb-tiles { align-items: stretch !important; margin-bottom: 28px !important; }
.scb-tile { height: 100%; background: #fff; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); padding: 0 0 22px !important; display: flex; flex-direction: column; }
.scb-tile > * { max-width: none !important; margin-left: 22px !important; margin-right: 22px !important; }
.scb-tile > .wp-block-image { margin: 0 0 18px !important; }
.scb-tile .wp-block-image img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 0; }
.scb-tile h3 { margin: 0 0 .4em; text-transform: uppercase; letter-spacing: .04em; }
.scb-tile h3 a { color: var(--ink); text-decoration: none; }
.scb-tile p { font-size: .96rem; color: #3b4350; }
.scb-tile > p:last-child { margin-top: auto; margin-bottom: 0; }
.scb-more { font: 700 .78rem/1 var(--head); letter-spacing: .12em; text-transform: uppercase; text-decoration: none; }
.scb-more::after { content: " →"; }
.scb-band:has(.scb-tiles) { background: var(--sand); }
.scb-feature { align-items: center !important; }
.scb-feature .scb-square img { width: 100%; max-width: 460px; max-height: none; aspect-ratio: 1; object-fit: contain; padding: 12%; background: var(--navy); border-radius: 12px; }
.scb-strip { display: grid !important; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.scb-strip > * { max-width: none !important; margin: 0 !important; }
.scb-strip img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
@media (max-width: 781px) { .scb-strip { grid-template-columns: 1fr; } }

.scb-box:not(:has(img)) { border: 0; background: none; padding: 0 !important; height: auto; }
.scb-box:not(:has(img)) h4 { margin-bottom: .2em; }
.wp-block-column:has(> .scb-box:not(:has(img))) .scb-kicker { font-size: .95rem; letter-spacing: .02em; text-transform: none; }
