/*
Theme Name: Coast Path Cottages
Theme URI: https://agency.coastpathcottages.co.uk
Author: Coast Path Cottages
Description: Agent-first OTA landing page theme for Coast Path Cottages.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 8.0
License: Proprietary
Text Domain: coastpathcottages
*/

/* ── RESET & TOKENS ── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --navy: #1a2e3b;
  --navy-mid: #243545;
  --ink: #0e1c27;
  --sand: #9f7444;
  --sand-light: #ede9e3;
  --stone: #6c7884;
  --mist: #f5f7f9;
  --white: #ffffff;
  --serif: "DM Serif Display", Georgia, serif;
  --sans: "DM Sans", system-ui, sans-serif;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ── NAV ── */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 48px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(26, 46, 59, 0.08);
  transition: padding 0.3s ease;
}
.nav-logo {
  font-family: var(--serif);
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--navy);
  letter-spacing: 0.01em;
  text-decoration: none;
}
.nav-logo span {
  display: inline-block;
  width: 6px;
  height: 6px;
  background: var(--sand);
  border-radius: 50%;
  margin: 0 6px 2px;
  vertical-align: middle;
}
.nav-badge {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--sand-light);
  background: var(--navy);
  padding: 5px 14px;
  border-radius: 20px;
}

/* ── HERO ── */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 120px 24px 80px;
  position: relative;
  overflow: hidden;
  background: var(--white);
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(
      ellipse 80% 60% at 50% 0%,
      rgba(154, 112, 64, 0.18) 0%,
      transparent 70%
    ),
    radial-gradient(
      ellipse 60% 40% at 100% 100%,
      rgba(26, 46, 59, 0.06) 0%,
      transparent 60%
    );
  pointer-events: none;
}
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--stone);
  margin-bottom: 32px;
  opacity: 0;
  animation: fadeUp 0.7s 0.1s ease forwards;
}
.hero-eyebrow::before,
.hero-eyebrow::after {
  content: "";
  display: block;
  width: 32px;
  height: 1px;
  background: var(--sand);
}
.hero h1 {
  font-family: var(--serif);
  font-size: clamp(2.8rem, 6vw, 5.2rem);
  font-weight: 400;
  line-height: 1.12;
  color: var(--navy);
  max-width: 780px;
  margin-bottom: 28px;
  opacity: 0;
  animation: fadeUp 0.8s 0.25s ease forwards;
}
.hero h1 em {
  font-style: italic;
  color: var(--sand);
}
.hero-sub {
  font-size: 1.1rem;
  font-weight: 300;
  color: var(--stone);
  max-width: 480px;
  line-height: 1.7;
  margin-bottom: 52px;
  opacity: 0;
  animation: fadeUp 0.8s 0.4s ease forwards;
}
.hero-cta-wrap {
  opacity: 0;
  animation: fadeUp 0.8s 0.55s ease forwards;
}
.btn-primary {
  display: inline-block;
  background: var(--navy);
  color: var(--white);
  font-family: var(--sans);
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  padding: 16px 36px;
  border-radius: 3px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition:
    background 0.2s ease,
    transform 0.15s ease;
}
.btn-primary:hover {
  background: var(--navy-mid);
  transform: translateY(-1px);
}
.hero-scroll-hint {
  position: absolute;
  bottom: 36px;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  opacity: 0;
  animation: fadeUp 0.8s 1s ease forwards;
}
.scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--sand), transparent);
  animation: scrollPulse 2s 1.5s ease-in-out infinite;
}
.scroll-label {
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--stone);
}

/* ── SECTION BASE ── */
.site-section {
  padding: 100px 24px;
}
.section-inner {
  max-width: 1100px;
  margin: 0 auto;
}
.section-label {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--sand);
  margin-bottom: 20px;
}
.section-heading {
  font-family: var(--serif);
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 400;
  line-height: 1.2;
  color: var(--navy);
  max-width: 620px;
}
.section-heading em {
  font-style: italic;
}

/* ── PROBLEM ── */
.problem {
  background: var(--navy);
  color: var(--white);
}
.problem .section-heading {
  color: var(--white);
  margin-bottom: 60px;
}
.problem .section-heading em {
  color: var(--sand);
}
.problem-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
}
.problem-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 40px 36px;
}
.problem-card:first-child {
  border-radius: 3px 0 0 3px;
}
.problem-card:last-child {
  border-radius: 0 3px 3px 0;
}
.problem-pct {
  font-family: var(--serif);
  font-size: 3.2rem;
  font-weight: 400;
  color: var(--sand);
  line-height: 1;
  margin-bottom: 12px;
}
.problem-title {
  font-size: 1rem;
  font-weight: 500;
  color: var(--white);
  margin-bottom: 10px;
}
.problem-body {
  font-size: 0.9rem;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.55);
  line-height: 1.65;
}

/* ── PILLARS ── */
.pillars {
  background: var(--mist);
}
.pillars .section-heading {
  margin-bottom: 64px;
}
.pillars-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}
.pillar {
  background: var(--white);
  border: 1px solid rgba(26, 46, 59, 0.08);
  border-radius: 4px;
  padding: 44px 36px;
  position: relative;
  overflow: hidden;
  transition:
    box-shadow 0.25s ease,
    transform 0.2s ease;
}
.pillar:hover {
  box-shadow: 0 12px 40px rgba(26, 46, 59, 0.1);
  transform: translateY(-3px);
}
.pillar::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(to right, var(--sand), var(--navy));
}
.pillar-num {
  font-family: var(--serif);
  font-size: 4rem;
  font-weight: 400;
  color: var(--sand);
  line-height: 1;
  margin-bottom: 20px;
}
.pillar-title {
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 500;
  color: var(--navy);
  margin-bottom: 14px;
  line-height: 1.3;
}
.pillar-body {
  font-size: 0.92rem;
  font-weight: 300;
  color: var(--stone);
  line-height: 1.7;
}
.pillar-highlight {
  display: inline-block;
  margin-top: 20px;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--navy);
  border-bottom: 1.5px solid var(--sand);
  padding-bottom: 2px;
}

/* ── HOW IT WORKS ── */
.how {
  background: var(--white);
}
.how .section-heading {
  margin-bottom: 64px;
}
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  position: relative;
}
.steps::before {
  content: "";
  position: absolute;
  top: 28px;
  left: calc(33.33% / 2);
  right: calc(33.33% / 2);
  height: 1px;
  background: linear-gradient(
    to right,
    var(--sand),
    var(--sand-light),
    var(--sand)
  );
}
.step {
  padding: 0 40px;
  text-align: center;
}
.step-dot {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--white);
  border: 2px solid var(--sand);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 28px;
  position: relative;
  z-index: 1;
}
.step-dot-num {
  font-family: var(--serif);
  font-size: 1.2rem;
  font-weight: 400;
  color: var(--navy);
}
.step-title {
  font-family: var(--serif);
  font-size: 1.15rem;
  font-weight: 500;
  color: var(--navy);
  margin-bottom: 12px;
}
.step-body {
  font-size: 0.88rem;
  font-weight: 300;
  color: var(--stone);
  line-height: 1.7;
}

/* ── COMMISSION STRIP ── */
.commission-strip {
  background: var(--sand-light);
  padding: 100px 24px;
}
.commission-inner {
  max-width: 1100px;
  margin: 0 auto;
  text-align: center;
}
.commission-inner h3 {
  font-family: var(--serif);
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 400;
  color: var(--navy);
  margin-bottom: 16px;
  line-height: 1.2;
}
.commission-inner h3 em {
  font-style: italic;
  color: var(--sand);
}
.compare-sub {
  font-size: 1rem;
  font-weight: 300;
  color: var(--ink);
  max-width: 560px;
  margin: 0 auto 56px;
  line-height: 1.7;
}
.compare-table-wrap {
  background: var(--white);
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 8px 40px rgba(26, 46, 59, 0.08);
  border: 1px solid rgba(26, 46, 59, 0.08);
}
.compare-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--sans);
  text-align: left;
}
.compare-table thead th {
  padding: 28px 20px 24px;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--stone);
  border-bottom: 1px solid rgba(26, 46, 59, 0.08);
  background: rgba(245, 247, 249, 0.6);
  vertical-align: middle;
}
.compare-table thead th:first-child {
  text-align: left;
  color: var(--navy);
}
.compare-table thead th.cpc-col {
  background: var(--navy);
  color: var(--sand);
  position: relative;
  min-width: 210px;
}
.compare-table thead th.cpc-col::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--sand);
}
.compare-table thead th .col-brand {
  font-family: var(--serif);
  font-size: 1.05rem;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  color: var(--navy);
  display: block;
  margin-bottom: 2px;
}
.compare-table thead th.cpc-col .col-brand {
  color: var(--white);
}
.compare-table thead th .col-tag {
  font-size: 0.66rem;
  letter-spacing: 0.12em;
  color: var(--stone);
  font-weight: 400;
  text-transform: uppercase;
  display: block;
}
.compare-table thead th.cpc-col .col-tag {
  color: var(--sand-light);
}
.compare-table tbody td {
  padding: 22px 20px;
  font-size: 0.9rem;
  font-weight: 400;
  color: var(--ink);
  border-bottom: 1px solid rgba(26, 46, 59, 0.06);
  vertical-align: middle;
  min-width: 200px;
}
.compare-table tbody tr:last-child td {
  border-bottom: none;
}
.compare-table tbody td:first-child {
  font-weight: 500;
  color: var(--navy);
  font-size: 0.92rem;
}
.compare-table tbody td.cpc-col {
  background: rgba(212, 184, 150, 0.1);
  font-weight: 500;
  color: var(--navy);
  position: relative;
}
.compare-table tbody tr:last-child td.cpc-col {
  box-shadow: inset 0 -3px 0 var(--sand);
}
.compare-table tbody td.other-col {
  color: var(--stone);
}
.check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--navy);
  color: var(--sand-light);
  font-size: 0.7rem;
  font-weight: 700;
  margin-right: 8px;
  vertical-align: middle;
  flex-shrink: 0;
}
.cross {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(138, 154, 170, 0.18);
  color: var(--stone);
  font-size: 1.2rem;
  font-weight: 500;
  margin-right: 8px;
  vertical-align: middle;
  flex-shrink: 0;
}
.compare-row-content {
  display: inline-flex;
  align-items: center;
}
.compare-footnote {
  font-size: 0.78rem;
  color: var(--stone);
  font-weight: 300;
  margin-top: 24px;
  line-height: 1.6;
}
.compare-table-outer {
  position: relative;
}
.compare-scroll-hint {
  display: none;
}
@media (max-width: 880px) {
  .compare-table-outer::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 100px;
    background: linear-gradient(
      to left,
      var(--sand-light) 0%,
      transparent 100%
    );
    border-radius: 0 6px 6px 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
    z-index: 2;
  }
  .compare-table-outer.scrolled::after {
    opacity: 0;
  }
  .compare-scroll-hint {
    display: flex;
    align-items: center;
    gap: 6px;
    position: absolute;
    bottom: 14px;
    right: 10px;
    background: var(--navy);
    color: var(--white);
    font-size: 0.65rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 6px 12px;
    border-radius: 20px;
    pointer-events: none;
    transition: opacity 0.4s ease;
    z-index: 3;
  }
  .compare-table-outer.scrolled .compare-scroll-hint {
    opacity: 0;
  }
}

/* ── SIGNUP ── */
.signup {
  background: var(--white);
  padding: 100px 24px 120px;
}
.signup-inner {
  max-width: 560px;
  margin: 0 auto;
  text-align: center;
}
.signup-inner .section-label {
  justify-content: center;
  display: flex;
}
.signup-inner .section-heading {
  margin: 0 auto 16px;
  text-align: center;
}
.signup-sub {
  font-size: 1rem;
  font-weight: 300;
  color: var(--stone);
  margin-bottom: 48px;
  line-height: 1.7;
}
.form-card {
  background: var(--mist);
  border: 1px solid rgba(26, 46, 59, 0.08);
  border-radius: 6px;
  padding: 48px 44px;
  text-align: left;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 20px;
}
.form-group label {
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--navy);
}
.form-group input {
  width: 100%;
  padding: 14px 16px;
  border: 1.5px solid rgba(26, 46, 59, 0.14);
  border-radius: 3px;
  background: var(--white);
  font-family: var(--sans);
  font-size: 0.95rem;
  font-weight: 300;
  color: var(--ink);
  outline: none;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}
.form-group input::placeholder {
  color: rgba(138, 154, 170, 0.7);
}
.form-group input:focus {
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(26, 46, 59, 0.07);
}
.form-group input.has-error,
.form-group select.has-error {
  border-color: #c0392b;
}
.form-group select {
  width: 100%;
  padding: 14px 40px 14px 16px;
  border: 1.5px solid rgba(26, 46, 59, 0.14);
  border-radius: 3px;
  background: var(--white);
  font-family: var(--sans);
  font-size: 0.95rem;
  font-weight: 300;
  color: var(--ink);
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%238a9aaa' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  cursor: pointer;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}
.form-group select:focus {
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(26, 46, 59, 0.07);
}
.form-group select option[value=""] {
  color: rgba(138, 154, 170, 0.7);
}
.form-field-error {
  font-size: 0.78rem;
  color: #c0392b;
  margin-top: 2px;
  display: none;
}
.form-field-error.visible {
  display: block;
}
.form-submit {
  width: 100%;
  background: var(--navy);
  color: var(--white);
  font-family: var(--sans);
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  padding: 16px;
  border: none;
  border-radius: 3px;
  cursor: pointer;
  margin-top: 8px;
  transition:
    background 0.2s ease,
    transform 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.form-submit:hover {
  background: var(--navy-mid);
  transform: translateY(-1px);
}
.form-submit:active {
  transform: translateY(0);
}
.form-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}
.form-legal {
  font-size: 0.75rem;
  color: var(--stone);
  font-weight: 300;
  text-align: center;
  margin-top: 16px;
  line-height: 1.6;
}
.form-general-error {
  font-size: 0.85rem;
  color: #c0392b;
  text-align: center;
  margin-top: 12px;
  display: none;
}
.form-general-error.visible {
  display: block;
}

/* SUCCESS STATE */
.success-state {
  text-align: center;
  padding: 20px 0;
  display: none;
}
.success-state.visible {
  display: block;
}
.signup-form-wrap.submitted {
  display: none;
}
.success-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--sand-light), var(--sand));
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
  font-size: 1.6rem;
}
.success-title {
  font-family: var(--serif);
  font-size: 1.6rem;
  font-weight: 400;
  color: var(--navy);
  margin-bottom: 12px;
}
.success-body {
  font-size: 0.9rem;
  font-weight: 300;
  color: var(--stone);
  line-height: 1.7;
}

/* Spinner */
.spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: none;
}
.form-submit.loading .spinner {
  display: block;
}
.form-submit.loading .btn-label::after {
  content: "…";
}

/* ── FOOTER ── */
.site-footer {
  background: var(--navy);
  padding: 40px 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.footer-logo {
  font-family: var(--serif);
  font-size: 1rem;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.7);
}
.footer-note {
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.35);
  font-weight: 300;
}

/* ── ANIMATIONS ── */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes scrollPulse {
  0%,
  100% {
    opacity: 0.4;
    transform: scaleY(1);
  }
  50% {
    opacity: 1;
    transform: scaleY(1.1);
  }
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity 0.65s ease,
    transform 0.65s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal-delay-1 {
  transition-delay: 0.1s;
}
.reveal-delay-2 {
  transition-delay: 0.2s;
}
.reveal-delay-3 {
  transition-delay: 0.3s;
}
.reveal-delay-4 {
  transition-delay: 0.4s;
}

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  .site-header {
    padding: 16px 24px;
  }
  .problem-grid,
  .pillars-grid,
  .steps {
    grid-template-columns: 1fr;
  }
  .steps::before {
    display: none;
  }
  .step {
    padding: 0 0 40px;
    text-align: left;
    display: flex;
    gap: 20px;
    align-items: flex-start;
  }
  .step-dot {
    margin: 0;
    flex-shrink: 0;
  }
  .compare-table-wrap {
    overflow-x: auto;
    scrollbar-width: none;
  }
  .compare-table {
    min-width: 720px;
  }
  .form-card {
    padding: 32px 24px;
  }
  .form-row {
    grid-template-columns: 1fr;
  }
  .site-footer {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }
  .problem-card:first-child,
  .problem-card:last-child {
    border-radius: 3px;
  }
}
