/*
Theme Name: Peninsula Design
Theme URI: https://www.peninsulawebstudio.co.uk
Author: Peninsula Web Studio
Author URI: https://www.peninsulawebstudio.co.uk
Description: A lightweight, editorial one-page theme for Peninsula Web Studio, an independent web design studio in County Down, Northern Ireland. Built as a direct conversion of the studio's approved static design — no page builder, no third-party framework.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.6
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: peninsula-design
Tags: one-column, custom-menu, custom-logo, featured-images, translation-ready
*/

/* =========================================================
   Design tokens
   ========================================================= */
:root {
  --ink: #1C1C19;
  --paper: #F4F3EF;
  --stone: #E2E0D9;
  --graphite: #605E57;
  --mist: #8B897F;
  --harbour-dark: #233A4C;
  --max-content: 76rem;
  --max-prose: 38rem;
  --ease-studio: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }

html, body { max-width: 100%; overflow-x: hidden; }
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;
  background-color: var(--paper);
  color: var(--ink);
  font-family: "Public Sans", Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  font-size: 16px;
  line-height: 1.5;
}

h1, h2, h3 {
  margin: 0;
  font-family: "Newsreader", Georgia, serif;
  font-weight: 500;
}

p { margin: 0; }

a { color: inherit; text-decoration: none; }

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

::selection { background-color: var(--harbour-dark); color: var(--paper); }

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--harbour-dark);
  outline-offset: 3px;
  border-radius: 1px;
}

.container {
  max-width: var(--max-content);
  margin: 0 auto;
  padding: 0 1.5rem;
}
@media (min-width: 640px) { .container { padding: 0 2rem; } }
@media (min-width: 1024px) { .container { padding: 0 2.5rem; } }

.rule-top { border-top: 1px solid var(--stone); }
.rule-bottom { border-bottom: 1px solid var(--stone); }

/* Keep the sticky nav clear of the WP admin bar */
.admin-bar header.site-nav { top: 32px; }
@media (max-width: 782px) {
  .admin-bar header.site-nav { top: 46px; }
}

/* Basic editor / content compatibility (page.php, single.php) */
.alignleft { float: left; margin: 0.3em 1.5em 1em 0; }
.alignright { float: right; margin: 0.3em 0 1em 1.5em; }
.aligncenter { display: block; margin-left: auto; margin-right: auto; }
.wp-caption { max-width: 100%; }
.wp-caption-text { font-size: 0.85rem; color: var(--graphite); margin-top: 0.5rem; }
.screen-reader-text {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.entry-content {
  max-width: var(--max-prose);
  margin: 0 auto;
  padding: 4rem 1.5rem;
  font-size: 1.05rem;
  line-height: 1.7;
}
.entry-content h1, .entry-content h2, .entry-content h3 { margin-top: 2rem; margin-bottom: 0.75rem; }
.entry-content p { margin-bottom: 1.25rem; }
.entry-title { font-size: 2rem; letter-spacing: -0.015em; margin-bottom: 1.5rem; }

/* ---------- Nav ---------- */
header.site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(244, 243, 239, 0.95);
  backdrop-filter: blur(4px);
  border-bottom: 1px solid var(--stone);
}
.nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1rem;
  padding-bottom: 1rem;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}
@media (min-width: 640px) { .nav-row { padding-left: 2rem; padding-right: 2rem; } }
@media (min-width: 1024px) { .nav-row { padding-left: 0; padding-right: 0; } }
.wordmark {
  font-size: 1.15rem;
  letter-spacing: -0.015em;
}
.wordmark .wm-serif { font-family: "Newsreader", Georgia, serif; font-weight: 600; }
.wordmark .wm-sans { font-family: "Public Sans", Helvetica, Arial, sans-serif; font-weight: 400; }
.custom-logo-link img { display: block; height: 32px; width: auto; }
nav.nav-links {
  display: none;
  align-items: center;
  gap: 2.25rem;
}
nav.nav-links a.nav-link {
  font-size: 0.95rem;
  color: var(--graphite);
  transition: color 0.2s var(--ease-studio);
}
nav.nav-links a.nav-link:hover { color: var(--ink); }
.btn-outline {
  display: inline-block;
  border: 1px solid var(--ink);
  padding: 0.6rem 1.1rem;
  font-size: 0.9rem;
  color: var(--ink);
  background: transparent;
  transition: background-color 0.2s var(--ease-studio), color 0.2s var(--ease-studio), border-color 0.2s var(--ease-studio);
  cursor: pointer;
}
.btn-outline:hover { background: var(--ink); color: var(--paper); }
.btn-solid {
  display: inline-block;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  padding: 0.75rem 1.5rem;
  font-size: 0.95rem;
  transition: background-color 0.2s var(--ease-studio), border-color 0.2s var(--ease-studio);
  cursor: pointer;
}
.btn-solid:hover { background: var(--harbour-dark); border-color: var(--harbour-dark); }
.btn-solid:disabled { opacity: 0.6; cursor: default; }

.menu-toggle {
  display: flex;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  padding: 0.5rem;
  cursor: pointer;
}
.menu-toggle span {
  display: block;
  width: 24px;
  height: 1px;
  background: var(--ink);
  transition: transform 0.3s var(--ease-studio);
}
.menu-toggle.open span:first-child { transform: translateY(3px) rotate(45deg); }
.menu-toggle.open span:last-child { transform: translateY(-3px) rotate(-45deg); }

.mobile-menu {
  display: none;
  flex-direction: column;
  border-top: 1px solid var(--stone);
  padding: 1rem 1.5rem;
}
.mobile-menu.open { display: flex; }
.mobile-menu a.nav-link { padding: 0.75rem 0; font-size: 1rem; color: var(--graphite); }
.mobile-menu .btn-outline { margin-top: 0.5rem; text-align: center; }

@media (min-width: 768px) {
  nav.nav-links { display: flex; }
  .menu-toggle { display: none; }
  .mobile-menu { display: none !important; }
}

/* ---------- Hero ---------- */
@keyframes rise-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
.hero-rise { animation: rise-in 0.8s var(--ease-studio) both; }
@media (prefers-reduced-motion: reduce) { .hero-rise { animation: none; } }

.hero-section { position: relative; overflow: hidden; }
.hero-bg { position: absolute; inset: 0; z-index: 0; }
.hero-bg img { width: 100%; height: 100%; object-fit: cover; opacity: 0.6; display: block; }
@media (max-width: 639.98px) {
  .hero-bg img { transform: scale(1.4); transform-origin: center bottom; }
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 44rem;
  margin: 0 auto;
  padding: 5rem 1.5rem 6rem;
  text-align: center;
}
@media (min-width: 640px) { .hero-content { padding: 7rem 2rem 8rem; } }
@media (min-width: 1024px) { .hero-content { max-width: 50rem; padding: 8rem 2.5rem 9rem; } }

.hero-content h1 {
  max-width: 20ch;
  margin: 0 auto;
  font-size: clamp(2.1rem, 9vw, 2.9rem);
  line-height: 1.08;
  letter-spacing: -0.015em;
  overflow-wrap: break-word;
}
.hero-content h1 em { font-style: italic; }
@media (min-width: 640px) { .hero-content h1 { font-size: 3.8rem; } }
@media (min-width: 1024px) { .hero-content h1 { font-size: 4.75rem; } }

.hero-content p {
  max-width: var(--max-prose);
  margin: 1.25rem auto 0;
  font-size: 1.125rem;
  line-height: 1.7;
  color: var(--graphite);
}
.hero-content p:first-of-type { margin-top: 1.75rem; }
@media (min-width: 640px) { .hero-content p:first-of-type { margin-top: 2.5rem; } }
@media (min-width: 640px) { .hero-content p { font-size: 1.25rem; } }

.hero-buttons {
  margin-top: 2.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}
.btn-solid .arrow { margin-left: 0.5rem; display: inline-block; transition: transform 0.2s var(--ease-studio); }
.btn-solid:hover .arrow { transform: translateX(3px); }
.text-link {
  font-size: 0.95rem;
  color: var(--ink);
  border-bottom: 1px solid var(--stone);
  padding-bottom: 2px;
  transition: border-color 0.2s var(--ease-studio);
}
.text-link:hover { border-color: var(--ink); }

/* ---------- Section spacing ---------- */
section.block { padding: 5rem 0; }
@media (min-width: 640px) { section.block { padding: 7rem 0; } }

h2.heading {
  font-size: 1.9rem;
  letter-spacing: -0.015em;
}
@media (min-width: 640px) { h2.heading { font-size: 2.25rem; } }

/* ---------- Work ---------- */
.work-list { margin-top: 4rem; display: flex; flex-direction: column; gap: 6rem; }
@media (min-width: 640px) { .work-list { margin-top: 5rem; gap: 8rem; } }

.project { display: flex; flex-direction: column; gap: 2.5rem; }
@media (min-width: 1024px) { .project { flex-direction: row; align-items: flex-start; gap: 3.5rem; } }
.project.reverse { }
@media (min-width: 1024px) { .project.reverse { flex-direction: row-reverse; } }

.project-shots { }
@media (min-width: 1024px) { .project-shots { width: 62%; } }
.project-shots .mobile-shot { margin-top: 1rem; max-width: 220px; }

.project-info { }
@media (min-width: 1024px) { .project-info { width: 38%; } }
.project-info .client { font-size: 0.9rem; color: var(--mist); }
.project-info h3 {
  margin-top: 0.75rem;
  max-width: 22ch;
  font-size: 1.5rem;
  line-height: 1.3;
  letter-spacing: -0.015em;
}
@media (min-width: 640px) { .project-info h3 { font-size: 1.7rem; } }
.project-info p.desc { margin-top: 1.25rem; max-width: var(--max-prose); font-size: 1.05rem; line-height: 1.7; color: var(--graphite); }
.project-info p.services { margin-top: 1.25rem; font-size: 0.95rem; color: var(--graphite); }
.project-info a.visit { margin-top: 1.5rem; }

.shot-frame { width: 100%; border: 1px solid var(--stone); background: #fff; border-radius: 10px; overflow: hidden; }

/* ---------- Philosophy ---------- */
.philosophy-intro { display: grid; grid-template-columns: 1fr; gap: 2.5rem; }
@media (min-width: 1024px) { .philosophy-intro { grid-template-columns: repeat(12, 1fr); gap: 3.5rem; } }
.philosophy-intro h2 { max-width: 16ch; font-size: 2.1rem; line-height: 1.2; letter-spacing: -0.015em; }
@media (min-width: 640px) { .philosophy-intro h2 { font-size: 3rem; } }
@media (min-width: 1024px) { .philosophy-intro .col-heading { grid-column: span 5 / span 5; } }
@media (min-width: 1024px) { .philosophy-intro .col-body { grid-column: span 6 / span 6; grid-column-start: 7; } }
.philosophy-intro .col-body p { max-width: var(--max-prose); font-size: 1.125rem; line-height: 1.7; color: var(--graphite); }
.philosophy-intro .col-body p + p { margin-top: 1.25rem; }

.principles {
  margin-top: 4rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem 2.5rem;
}
@media (min-width: 640px) { .principles { margin-top: 5rem; grid-template-columns: 1fr 1fr; } }
@media (min-width: 1024px) { .principles { grid-template-columns: repeat(4, 1fr); } }
.principle { border-top: 1px solid var(--ink); padding-top: 1.25rem; }
.principle h3 { font-size: 1.25rem; }
.principle p { margin-top: 0.75rem; font-size: 0.98rem; line-height: 1.6; color: var(--graphite); }

/* ---------- Process ---------- */
.steps { margin-top: 3.5rem; }
@media (min-width: 640px) { .steps { margin-top: 4rem; } }
.step { display: grid; grid-template-columns: 1fr; gap: 0.5rem; border-top: 1px solid var(--stone); padding: 2rem 0; }
@media (min-width: 640px) { .step { grid-template-columns: repeat(12, 1fr); gap: 2rem; padding: 2.5rem 0; } }
.step .num { font-family: "Newsreader", Georgia, serif; font-size: 1.5rem; color: var(--mist); }
@media (min-width: 640px) { .step .num-col { grid-column: span 2 / span 2; } }
.step h3 { font-size: 1.25rem; }
@media (min-width: 640px) { .step .title-col { grid-column: span 3 / span 3; } }
.step p { font-size: 1.02rem; line-height: 1.7; color: var(--graphite); max-width: var(--max-prose); }
@media (min-width: 640px) { .step .body-col { grid-column: span 7 / span 7; } }
.steps-end { border-top: 1px solid var(--stone); }

/* ---------- Pricing ---------- */
.pricing { background: var(--ink); color: var(--paper); }
.pricing-inner { max-width: 42rem; margin: 0 auto; text-align: center; }
.pricing h2 { font-size: 1.9rem; letter-spacing: -0.015em; }
@media (min-width: 640px) { .pricing h2 { font-size: 2.25rem; } }
.pricing-inner p { font-size: 1.125rem; line-height: 1.7; }
.pricing-inner p:first-of-type { margin-top: 2rem; color: var(--paper); }
.pricing-inner p + p { margin-top: 1.25rem; color: var(--stone); }
.pricing-inner .btn-outline-light { margin-top: 2rem; }
.btn-outline-light {
  display: inline-block;
  border: 1px solid var(--paper);
  padding: 0.75rem 1.5rem;
  font-size: 0.95rem;
  color: var(--paper);
  transition: background-color 0.2s var(--ease-studio), color 0.2s var(--ease-studio);
}
.btn-outline-light:hover { background: var(--paper); color: var(--ink); }

/* ---------- About ---------- */
.about-grid { display: grid; grid-template-columns: 1fr; gap: 2.5rem; }
@media (min-width: 1024px) { .about-grid { grid-template-columns: repeat(12, 1fr); gap: 3.5rem; } }
.about-grid h2 { max-width: 14ch; font-size: 1.9rem; letter-spacing: -0.015em; }
@media (min-width: 640px) { .about-grid h2 { font-size: 2.25rem; } }
@media (min-width: 1024px) { .about-grid .col-heading { grid-column: span 5 / span 5; } }
@media (min-width: 1024px) { .about-grid .col-body { grid-column: span 6 / span 6; grid-column-start: 7; } }
.about-grid .col-body p { max-width: var(--max-prose); font-size: 1.125rem; line-height: 1.7; color: var(--graphite); }
.about-grid .col-body p + p { margin-top: 1.25rem; }

/* ---------- Enquiry ---------- */
.enquiry-grid { display: grid; grid-template-columns: 1fr; gap: 3rem; }
@media (min-width: 1024px) { .enquiry-grid { grid-template-columns: repeat(12, 1fr); gap: 3.5rem; } }
.enquiry-grid h2 { max-width: 18ch; font-size: 1.9rem; line-height: 1.3; letter-spacing: -0.015em; }
@media (min-width: 640px) { .enquiry-grid h2 { font-size: 2.25rem; } }
@media (min-width: 1024px) { .enquiry-grid .col-heading { grid-column: span 5 / span 5; } }
@media (min-width: 1024px) { .enquiry-grid .col-form { grid-column: span 6 / span 6; grid-column-start: 7; } }
.enquiry-grid .col-heading p { margin-top: 1.5rem; max-width: var(--max-prose); font-size: 1.125rem; line-height: 1.7; color: var(--graphite); }
.enquiry-grid .col-heading p + p { margin-top: 1.25rem; }
.enquiry-email { display: inline-block; margin-top: 1.25rem; font-size: 1.125rem; color: var(--ink); text-decoration: underline; text-decoration-color: var(--stone); text-underline-offset: 4px; transition: text-decoration-color 0.2s var(--ease-studio); }
.enquiry-email:hover { text-decoration-color: var(--ink); }
.enquiry-call { margin-top: 2.5rem; border-top: 1px solid var(--stone); padding-top: 2rem; }
.enquiry-call p { font-size: 1.125rem; color: var(--graphite); margin-top: 0 !important; }
.enquiry-call .btn-solid { margin-top: 1rem; }

form.enquiry-form { display: flex; flex-direction: column; gap: 1.5rem; }
.field-row { display: grid; grid-template-columns: 1fr; gap: 1.5rem; }
@media (min-width: 640px) { .field-row { grid-template-columns: 1fr 1fr; } }
.field label { display: block; margin-bottom: 0.5rem; font-size: 0.9rem; color: var(--graphite); }
.field label .optional { color: var(--mist); }
.field input, .field select, .field textarea {
  width: 100%;
  border: 1px solid var(--stone);
  background: transparent;
  padding: 0.75rem;
  font-family: inherit;
  font-size: 1rem;
  color: var(--ink);
  transition: border-color 0.2s var(--ease-studio);
}
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible { border-color: var(--ink); }
.form-notice { margin-top: 0; margin-bottom: 0.5rem; padding: 0.9rem 1rem; font-size: 0.92rem; border: 1px solid var(--stone); }
.form-notice.is-error { border-color: var(--harbour-dark); color: var(--harbour-dark); }
.form-notice.is-success { border-color: var(--ink); color: var(--ink); }
.form-error-inline { margin-top: 0.4rem; font-size: 0.85rem; color: var(--harbour-dark); }
.enquiry-success p { margin-top: 1.25rem; max-width: var(--max-prose); font-size: 1.125rem; line-height: 1.7; color: var(--graphite); }
/* honeypot field, hidden from sighted users but reachable by bots/scripts */
.hp-field { position: absolute !important; left: -9999px !important; top: -9999px !important; }

/* ---------- Footer ---------- */
footer.site-footer { }
.footer-row {
  padding: 2.5rem 0;
  font-size: 0.9rem;
  color: var(--graphite);
  text-align: center;
}
.footer-row .sep { color: var(--stone); }
.footer-row a {
  color: var(--harbour-dark);
  text-decoration: underline;
  text-decoration-color: var(--harbour-dark);
  text-underline-offset: 4px;
  transition: opacity 0.2s var(--ease-studio);
}
.footer-row a:hover { opacity: 0.7; }
