/* Gwynfryn House — Coastal Welsh quiet
   Sand, slate, driftwood. Fraunces + Inter + JetBrains Mono.
*/

@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,300;0,9..144,400;0,9..144,500;0,9..144,600;1,9..144,300;1,9..144,400&family=Inter:wght@300;400;500&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --sand: #EFEAE0;
  --sand-2: #E6DFD1;
  --paper: #F7F3EB;
  --paper-2: #FBF8F2;
  --moss: #2E332B;
  --moss-2: #3A3F35;
  --slate: #4A524C;
  --lichen: #7C6A4A;
  --lichen-2: #8E7A55;
  --bone: #D9D0BD;
  --ink: #1A1C18;
  --whisper: #A89F8B;

  --serif: 'Fraunces', 'Cormorant Garamond', Georgia, serif;
  --sans: 'Inter', system-ui, -apple-system, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'SF Mono', monospace;

  --max: 1440px;
  --gutter: clamp(20px, 4vw, 64px);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { background: var(--paper); color: var(--ink); }
body {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  font-weight: 300;
  letter-spacing: 0.005em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

/* Type scale */
.serif { font-family: var(--serif); font-weight: 300; letter-spacing: -0.01em; }
.mono { font-family: var(--mono); font-weight: 400; letter-spacing: 0; font-size: 11px; text-transform: uppercase; }
.eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--slate);
  font-weight: 400;
}
.eyebrow-line {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}
.eyebrow-line::before {
  content: '';
  width: 24px;
  height: 1px;
  background: currentColor;
  opacity: 0.5;
}

h1, h2, h3, h4 { font-family: var(--serif); font-weight: 300; letter-spacing: -0.015em; line-height: 1.05; }
h1 { font-size: clamp(48px, 7vw, 104px); }
h2 { font-size: clamp(36px, 5vw, 72px); }
h3 { font-size: clamp(24px, 2.6vw, 36px); }
h4 { font-size: clamp(18px, 1.6vw, 22px); }

p { font-size: 16px; line-height: 1.65; color: var(--slate); }
.lede { font-family: var(--serif); font-style: italic; font-size: clamp(20px, 2vw, 26px); line-height: 1.45; color: var(--moss); font-weight: 300; }

/* Layout */
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
section { padding: clamp(64px, 10vw, 144px) 0; }

/* Photo placeholders — sand/slate striped with monospace caption */
.ph {
  position: relative;
  background:
    repeating-linear-gradient(
      135deg,
      rgba(0,0,0,0.025) 0 1px,
      transparent 1px 14px
    ),
    linear-gradient(180deg, var(--sand-2), var(--bone));
  color: var(--moss);
  display: grid;
  place-items: center;
  overflow: hidden;
  isolation: isolate;
}
.ph[data-tone="dark"] {
  background:
    repeating-linear-gradient(
      135deg,
      rgba(255,255,255,0.04) 0 1px,
      transparent 1px 14px
    ),
    linear-gradient(180deg, var(--moss), #1d2019);
  color: var(--sand);
}
.ph[data-tone="moss"] {
  background:
    repeating-linear-gradient(
      135deg,
      rgba(255,255,255,0.05) 0 1px,
      transparent 1px 14px
    ),
    linear-gradient(180deg, #4d5a48, #2E332B);
  color: var(--sand);
}
.ph .label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  opacity: 0.65;
  text-align: center;
  padding: 6px 14px;
  border: 1px solid currentColor;
  border-radius: 999px;
}
.ph .corner {
  position: absolute;
  top: 14px; left: 14px;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  opacity: 0.55;
}
.ph .corner.r { left: auto; right: 14px; text-align: right; }
.ph .corner.b { top: auto; bottom: 14px; }
.ph .corner.br { top: auto; bottom: 14px; left: auto; right: 14px; }

/* Image-backed placeholders — keep monospace corner captions on top of a real photo */
.ph.has-img {
  background: #1d2019;
}
.ph.has-img > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}
.ph.has-img > .corner,
.ph.has-img > .label {
  z-index: 2;
  color: var(--sand);
  text-shadow: 0 1px 8px rgba(0,0,0,0.55);
  opacity: 0.85;
}
.ph.has-img > .label {
  border-color: rgba(244,237,222,0.55);
  background: rgba(20,28,22,0.18);
  backdrop-filter: blur(2px);
}
.ph.has-img::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(0,0,0,0.18) 0%, rgba(0,0,0,0) 35%, rgba(0,0,0,0) 65%, rgba(0,0,0,0.32) 100%);
  pointer-events: none;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  border: 1px solid var(--moss);
  color: var(--moss);
  background: transparent;
  border-radius: 999px;
  transition: background .25s ease, color .25s ease, transform .25s ease;
}
.btn:hover { background: var(--moss); color: var(--sand); }
.btn.primary { background: var(--moss); color: var(--sand); }
.btn.primary:hover { background: var(--ink); }
.btn.light { border-color: var(--sand); color: var(--sand); }
.btn.light:hover { background: var(--sand); color: var(--moss); }
.btn .arrow { transition: transform .25s ease; }
.btn:hover .arrow { transform: translateX(3px); }

/* Nav */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  display: grid; grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 20px var(--gutter);
  transition: background .35s ease, color .35s ease, padding .25s ease;
  color: var(--ink);
  mix-blend-mode: normal;
}
.nav.over-hero { color: var(--paper); }
.nav.scrolled {
  background: rgba(247, 243, 235, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  color: var(--ink);
  padding: 14px var(--gutter);
  border-bottom: 1px solid rgba(0,0,0,0.06);
}
.nav-left, .nav-right {
  display: flex; gap: 28px; align-items: center;
}
.nav-right { justify-content: flex-end; }
.nav a {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  position: relative;
}
.nav a:hover::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -6px; height: 1px; background: currentColor;
}
.nav .brand {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 400;
  letter-spacing: -0.01em;
  text-transform: none;
}
.nav .brand .sub { font-family: var(--mono); font-size: 9px; letter-spacing: 0.22em; display: block; text-align: center; margin-top: 2px; opacity: 0.7; text-transform: uppercase; }

/* Footer */
.footer {
  background: var(--moss);
  color: var(--sand);
  padding: 96px var(--gutter) 32px;
}
.footer-grid {
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 64px;
  border-bottom: 1px solid rgba(239, 234, 224, 0.18);
}
.footer h4 { color: var(--sand); font-family: var(--mono); font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; margin-bottom: 18px; opacity: 0.7; }
.footer .brand-lg { font-family: var(--serif); font-size: clamp(40px, 5vw, 64px); line-height: 1; margin-bottom: 18px; }
.footer ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer ul a { font-size: 14px; opacity: 0.85; }
.footer ul a:hover { opacity: 1; text-decoration: underline; text-underline-offset: 4px; }
.footer-bottom {
  max-width: var(--max);
  margin: 28px auto 0;
  display: flex; justify-content: space-between;
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase;
  opacity: 0.6;
}

/* Sticky booking pill */
.book-pill {
  position: fixed;
  bottom: 24px; left: 50%;
  transform: translateX(-50%) translateY(120%);
  z-index: 40;
  background: var(--moss);
  color: var(--sand);
  padding: 10px 12px 10px 22px;
  border-radius: 999px;
  display: grid;
  grid-template-columns: auto auto auto auto;
  align-items: center;
  gap: 18px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.18);
  transition: transform .5s cubic-bezier(.22,.9,.3,1), opacity .3s;
  opacity: 0;
  pointer-events: none;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.book-pill.visible { transform: translateX(-50%) translateY(0); opacity: 1; pointer-events: auto; }
.book-pill .field {
  display: flex; flex-direction: column; gap: 2px;
  padding: 0 6px;
}
.book-pill .field .lbl { font-size: 9px; opacity: 0.6; letter-spacing: 0.18em; }
.book-pill .field .val { font-family: var(--serif); font-size: 14px; text-transform: none; letter-spacing: 0; color: var(--sand); }
.book-pill .divider { width: 1px; height: 24px; background: rgba(239,234,224,0.2); }
.book-pill .cta {
  background: var(--sand); color: var(--moss);
  padding: 12px 20px;
  border-radius: 999px;
  font-family: var(--mono); font-size: 10px;
  letter-spacing: 0.18em;
  transition: background .2s;
}
.book-pill .cta:hover { background: var(--paper); }

/* Utilities */
.divider-line { height: 1px; background: rgba(0,0,0,0.08); margin: 0; }
.num {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--whisper);
  text-transform: uppercase;
}
.fade-in { opacity: 0; transform: translateY(12px); transition: opacity .9s ease, transform .9s ease; }
.fade-in.visible { opacity: 1; transform: none; }

/* Responsive */
.nav-toggle { display: none; }
.nav-spacer { display: none; }
.mobile-menu { display: none; }
@media (max-width: 900px) {
  .nav-left, .nav-right { display: none; }
  .nav {
    grid-template-columns: auto 1fr auto;
    justify-items: stretch;
    align-items: center;
  }
  .nav .brand { justify-self: center; }
  .nav-toggle {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 44px; height: 44px;
    justify-self: start;
    background: none; border: 0; cursor: pointer;
    padding: 10px;
    z-index: 60;
  }
  .nav-toggle span {
    display: block; height: 1.5px; width: 100%;
    background: currentColor;
    transition: transform .3s ease, opacity .2s ease;
  }
  .nav-toggle.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
  .nav-toggle.open span:nth-child(2) { opacity: 0; }
  .nav-toggle.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }
  .nav-spacer { width: 44px; justify-self: end; display: block; }

  .mobile-menu {
    position: fixed;
    inset: 0;
    z-index: 55;
    background: var(--moss);
    color: var(--sand);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transform: translateY(-100%);
    transition: transform .4s cubic-bezier(.22,.9,.3,1);
    pointer-events: none;
  }
  .mobile-menu.open { transform: translateY(0); pointer-events: auto; }
  .mobile-menu a {
    font-family: var(--serif);
    font-size: 28px;
    color: var(--sand);
    padding: 10px 0;
    letter-spacing: -0.01em;
  }
  .mobile-menu a.enquire {
    margin-top: 16px;
    font-family: var(--mono);
    font-size: 13px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    border: 1px solid var(--sand);
    border-radius: 999px;
    padding: 14px 28px;
  }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .book-pill { grid-template-columns: 1fr auto; gap: 10px; }
  .book-pill .field, .book-pill .divider { display: none; }
  .book-pill .field.always { display: flex; }
}

@media (max-width: 600px) {
  .footer { padding: 64px var(--gutter) 32px; }
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 40px;
    padding-bottom: 40px;
  }
  .footer-grid ul a, .footer-grid li { overflow-wrap: anywhere; word-break: break-word; }
  .footer-bottom { flex-direction: column; gap: 8px; }
}
