/* Core styles for Ystwyth Retreat static site */
:root {
  --forest: #1f3a32;
  --fern: #3f5f52;
  --sage: #6f8a78;
  --sand: #e6dfd6;
  --stone: #c3b8a8;
  --cloud: #f7f4ef;
  --text: #1b1f1d;
  --muted: #4c5650;
  --accent: #7a9c73;
  --white: #ffffff;
  --max-width: 1200px;
  --radius: 14px;
  --shadow: 0 12px 32px rgba(17, 34, 28, 0.14);
}

@media (prefers-reduced-motion: no-preference) {
  :root {
    scroll-behavior: smooth;
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "DM Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
  color: var(--text);
  background: var(--cloud);
  line-height: 1.6;
}

h1,
h2,
h3,
h4 {
  font-family: "Cormorant Garamond", "DM Serif Display", serif;
  margin: 0 0 0.4em;
  line-height: 1.2;
}

p {
  margin: 0 0 1em;
  color: var(--muted);
}

a {
  color: var(--forest);
  text-decoration: none;
}

a:hover,
a:focus-visible {
  text-decoration: underline;
}

img {
  max-width: 100%;
  display: block;
  border-radius: var(--radius);
}

header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(10px);
  background: rgba(247, 244, 239, 0.92);
  border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1rem 1.5rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--forest);
}

.logo img {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nav-links a {
  font-weight: 600;
  color: var(--text);
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
}

.nav-links a:hover,
.nav-links a:focus-visible {
  background: rgba(31, 58, 50, 0.08);
}

.nav-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.65rem 1.1rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 700;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.btn-primary {
  background: linear-gradient(120deg, var(--forest), var(--fern));
  color: var(--white);
  box-shadow: 0 10px 24px rgba(31, 58, 50, 0.24);
}

.btn-primary:hover,
.btn-primary:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 14px 30px rgba(31, 58, 50, 0.32);
}

.btn-secondary {
  background: var(--white);
  color: var(--forest);
  border: 1px solid rgba(31, 58, 50, 0.12);
}

.btn-secondary:hover,
.btn-secondary:focus-visible {
  border-color: rgba(31, 58, 50, 0.3);
}

.mobile-toggle {
  display: none;
  background: none;
  border: 1px solid rgba(31, 58, 50, 0.16);
  border-radius: 10px;
  padding: 0.4rem 0.55rem;
}

main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1rem 1.5rem 4rem;
}

.hero {
  margin-top: 1.5rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  align-items: center;
  gap: 2rem;
  padding: 2.5rem;
  border-radius: 22px;
  position: relative;
  overflow: hidden;
  background: radial-gradient(circle at 20% 20%, rgba(122, 156, 115, 0.22), transparent 35%), radial-gradient(circle at 80% 10%, rgba(31, 58, 50, 0.16), transparent 30%), linear-gradient(135deg, #f9f7f3, #e8e1d7);
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("../images/leaf-motif.svg");
  background-repeat: no-repeat;
  background-size: 420px;
  background-position: 92% -8%;
  opacity: 0.28;
  pointer-events: none;
}

.hero-copy {
  position: relative;
  z-index: 1;
}

.hero h1 {
  font-size: clamp(2.2rem, 4vw, 3rem);
}

.tagline {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  background: rgba(31, 58, 50, 0.08);
  color: var(--forest);
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.highlight-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin: 2rem 0 3rem;
}

.card {
  background: var(--white);
  padding: 1.4rem;
  border-radius: var(--radius);
  box-shadow: 0 10px 26px rgba(15, 31, 24, 0.08);
  border: 1px solid rgba(31, 58, 50, 0.08);
  transition: opacity 240ms ease, transform 240ms ease;
}

.card h3 {
  margin-bottom: 0.5rem;
}

.pill {
  display: inline-flex;
  gap: 0.35rem;
  background: rgba(31, 58, 50, 0.08);
  color: var(--forest);
  border-radius: 999px;
  padding: 0.3rem 0.7rem;
  font-size: 0.95rem;
  font-weight: 600;
}

.section {
  margin: 3.2rem 0;
}

.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.section-header p {
  max-width: 700px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.4rem;
}

.feature {
  padding: 1.2rem 1.4rem;
  background: var(--white);
  border: 1px solid rgba(31, 58, 50, 0.06);
  border-radius: var(--radius);
  transition: opacity 240ms ease, transform 240ms ease;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.75rem;
}

.testimonial {
  background: #f0ece5;
  border: 1px solid rgba(31, 58, 50, 0.08);
  border-radius: var(--radius);
  padding: 1.3rem;
  box-shadow: 0 10px 20px rgba(31, 58, 50, 0.08);
}

.test-meta {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  margin-top: 0.6rem;
  font-weight: 700;
  color: var(--forest);
}

.cta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

form {
  display: grid;
  gap: 1rem;
}

label {
  font-weight: 700;
  color: var(--text);
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid rgba(31, 58, 50, 0.2);
  border-radius: 10px;
  padding: 0.85rem 1rem;
  font-size: 1rem;
  background: var(--white);
}

input:focus,
textarea:focus,
select:focus {
  outline: 2px solid var(--fern);
  outline-offset: 2px;
}

textarea {
  min-height: 150px;
  resize: vertical;
}

.two-column {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.2rem;
}

.list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.65rem;
}

.list li {
  display: flex;
  gap: 0.55rem;
  align-items: flex-start;
}

.list strong {
  color: var(--forest);
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 8px;
  background: rgba(31, 58, 50, 0.1);
  color: var(--forest);
  font-weight: 800;
}

.footnote {
  font-size: 0.95rem;
  color: var(--muted);
}

.newsletter {
  background: linear-gradient(135deg, rgba(31, 58, 50, 0.06), rgba(122, 156, 115, 0.1));
  padding: 1.5rem;
  border-radius: var(--radius);
  border: 1px solid rgba(31, 58, 50, 0.08);
}

footer {
  background: var(--forest);
  color: var(--sand);
  padding: 2.5rem 1.5rem;
  margin-top: 3rem;
}

.footer-content {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.2rem;
}

.footer-content a {
  color: #dfe7dd;
}

.footer-brand img {
  width: 44px;
  height: 44px;
}

.footer-nav {
  display: grid;
  gap: 0.35rem;
}

.footer-bottom {
  margin-top: 1.5rem;
  color: #d9d5c8;
  font-size: 0.95rem;
}

.sticky-enquire {
  display: none;
  position: fixed;
  bottom: 16px;
  right: 16px;
  z-index: 30;
}

.motif {
  background-image: url("../images/leaf-motif.svg");
  background-repeat: no-repeat;
  background-position: right top;
  background-size: 180px;
}

blockquote {
  margin: 0;
  padding-left: 1rem;
  border-left: 3px solid var(--forest);
  color: var(--muted);
}

.table {
  width: 100%;
  border-collapse: collapse;
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 8px 16px rgba(31, 58, 50, 0.08);
}

.table th,
.table td {
  padding: 0.9rem 1rem;
  border-bottom: 1px solid rgba(31, 58, 50, 0.08);
  text-align: left;
}

.table th {
  background: rgba(31, 58, 50, 0.08);
}

.table tr:last-child td {
  border-bottom: none;
}

.subtle {
  color: var(--muted);
  font-size: 0.96rem;
}

.hero-image {
  position: relative;
  z-index: 1;
}

.hero-image img {
  box-shadow: 0 18px 36px rgba(31, 58, 50, 0.22);
}

.icon-inline {
  width: 22px;
  height: 22px;
}

.timeline {
  display: grid;
  gap: 1rem;
}

.timeline-item {
  background: var(--white);
  border: 1px solid rgba(31, 58, 50, 0.08);
  border-radius: var(--radius);
  padding: 1rem 1.2rem;
  display: grid;
  gap: 0.4rem;
}

.highlight {
  color: var(--forest);
  font-weight: 700;
}

.contact-card {
  background: var(--white);
  padding: 1.4rem;
  border-radius: var(--radius);
  border: 1px solid rgba(31, 58, 50, 0.08);
  box-shadow: 0 10px 18px rgba(31, 58, 50, 0.1);
}

.legal {
  background: var(--white);
  padding: 1.5rem;
  border-radius: var(--radius);
  border: 1px solid rgba(31, 58, 50, 0.08);
}

.hero-badge {
  position: absolute;
  top: 16px;
  right: 16px;
  background: rgba(31, 58, 50, 0.84);
  color: var(--sand);
  padding: 0.6rem 0.9rem;
  border-radius: 10px;
  font-weight: 700;
  box-shadow: 0 10px 20px rgba(31, 58, 50, 0.28);
}

.banner {
  background: linear-gradient(90deg, rgba(31, 58, 50, 0.9), rgba(122, 156, 115, 0.85));
  color: var(--sand);
  padding: 1rem 1.5rem;
  border-radius: 12px;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
}

.cards-compact {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.9rem;
}

.cards-compact .card {
  padding: 1rem 1.1rem;
}

.reveal {
  opacity: 0;
  transform: translateY(10px);
}

.visible {
  opacity: 1 !important;
  transform: translateY(0) !important;
}

.small {
  font-size: 0.92rem;
}

@media (max-width: 960px) {
  .nav-links {
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background: rgba(247, 244, 239, 0.98);
    flex-direction: column;
    padding: 1rem 1.5rem 1.5rem;
    border-bottom: 1px solid rgba(31, 58, 50, 0.06);
    transform-origin: top;
    transform: scaleY(0);
    opacity: 0;
    transition: transform 180ms ease, opacity 180ms ease;
  }

  .nav-links.open {
    transform: scaleY(1);
    opacity: 1;
  }

  .mobile-toggle {
    display: inline-flex;
  }

  .nav-actions {
    display: none;
  }

  .sticky-enquire {
    display: inline-flex;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0s !important;
    transition-duration: 0s !important;
    scroll-behavior: auto;
  }
}
