/* Open Book Hospitality - shared stylesheet
   Palette: terracotta, sage, cream, deep ink */

:root {
  --cream: #F5EFE6;
  --cream-warm: #EFE7D8;
  --terracotta: #C97B5A;
  --terracotta-deep: #A85D3F;
  --sage: #8FA088;
  --sage-deep: #5F7259;
  --ink: #2A2622;
  --ink-soft: #4A433C;
  --rule: #D8CFBE;
  --shadow: 0 1px 2px rgba(42, 38, 34, 0.06), 0 8px 24px rgba(42, 38, 34, 0.06);

  --serif: "Cormorant Garamond", "Playfair Display", Georgia, "Times New Roman", serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
}

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500;1,600;1,700&family=Inter:wght@300;400;500;600&display=swap');

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img { max-width: 100%; display: block; }

a {
  color: var(--terracotta-deep);
  text-decoration: none;
  border-bottom: 1px solid rgba(168, 93, 63, 0.3);
  transition: border-color 0.2s ease, color 0.2s ease;
}
a:hover { border-bottom-color: var(--terracotta-deep); color: var(--ink); }

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 500;
  color: var(--ink);
  letter-spacing: -0.01em;
  margin: 0 0 0.4em;
}

h1 { font-size: clamp(2.4rem, 5vw, 4rem); line-height: 1.05; font-weight: 500; }
h2 { font-size: clamp(1.8rem, 3vw, 2.6rem); line-height: 1.15; }
h3 { font-size: 1.4rem; line-height: 1.25; }
h4 { font-size: 1.05rem; font-family: var(--sans); font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-soft); margin-bottom: 0.6em; }

p { margin: 0 0 1.1em; color: var(--ink-soft); max-width: 62ch; }
p.lead { font-size: 1.2rem; color: var(--ink); max-width: 56ch; }

.eyebrow {
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--terracotta-deep);
  margin-bottom: 1.2rem;
  display: inline-block;
}

/* Layout */
.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 2rem;
}

.container-narrow {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 2rem;
}

section { padding: 2.75rem 0; }
section.tight { padding: 1.5rem 0; }

/* Header / Nav */
.site-header {
  border-bottom: 1px solid var(--rule);
  background: var(--cream);
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(6px);
  background: rgba(245, 239, 230, 0.92);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 2rem;
  max-width: 1120px;
  margin: 0 auto;
}

.brand {
  font-family: var(--serif);
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--ink);
  border: none;
  letter-spacing: -0.01em;
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
}
.brand:hover { color: var(--terracotta-deep); }
.brand .mark { color: var(--terracotta); font-style: italic; font-weight: 600; }
.brand-mark {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
}
.brand-text { display: inline-block; line-height: 1; }

/* Inline brand name — for body-copy mentions of "Open Book Hospitality" */
.brand-name {
  font-family: var(--serif);
  color: var(--ink);
  font-weight: 600;
}
.brand-name em {
  color: var(--terracotta);
  font-style: italic;
  font-weight: 600;
}

.nav-links {
  display: flex;
  gap: 2.2rem;
  list-style: none;
  margin: 0;
  padding: 0;
  align-items: center;
}
.nav-links a {
  font-size: 0.95rem;
  color: var(--ink-soft);
  border: none;
  padding-bottom: 2px;
}
.nav-links a:hover, .nav-links a.active {
  color: var(--ink);
  border-bottom: 1px solid var(--terracotta);
}

/* Language toggle */
.lang-toggle {
  border-left: 1px solid var(--rule);
  padding-left: 1.4rem;
  margin-left: 0.4rem;
}
.lang-toggle a {
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--terracotta-deep);
}
.lang-toggle a:hover {
  color: var(--ink);
  border-bottom: 1px solid var(--terracotta);
}

/* Hero */
.hero {
  padding: 1.25rem 0 2.5rem;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  top: -10%;
  right: -10%;
  width: 480px;
  height: 480px;
  background: radial-gradient(circle, rgba(168, 93, 63, 0.10), transparent 70%);
  pointer-events: none;
}
.hero::after {
  content: "";
  position: absolute;
  bottom: -20%;
  left: -10%;
  width: 380px;
  height: 380px;
  background: radial-gradient(circle, rgba(201, 123, 90, 0.14), transparent 70%);
  pointer-events: none;
}
.hero .container { position: relative; z-index: 1; }
.hero p.lead { margin-top: 1.2rem; }

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.85rem 1.7rem;
  font-family: var(--sans);
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  border-radius: 2px;
  border: 1px solid var(--terracotta-deep);
  background: var(--terracotta-deep);
  color: var(--cream);
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, transform 0.1s ease;
  text-decoration: none;
}
.btn:hover {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--cream);
}
.btn-secondary {
  background: transparent;
  color: var(--ink);
  border-color: var(--ink);
}
.btn-secondary:hover { background: var(--ink); color: var(--cream); }

.btn-row { display: flex; gap: 1rem; flex-wrap: wrap; margin-top: 1.25rem; }

/* Cards / panels */
.panel {
  background: #FBF8F1;
  border: 1px solid var(--rule);
  border-radius: 4px;
  padding: 1.6rem 1.75rem;
  box-shadow: var(--shadow);
}

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

/* Service phase blocks */
.phase {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 2rem;
  padding: 2.2rem 0;
  border-top: 1px solid var(--rule);
  align-items: start;
}
.phase:last-child { border-bottom: 1px solid var(--rule); }
.phase-number {
  font-family: var(--serif);
  font-size: 3rem;
  color: var(--terracotta);
  line-height: 1;
  font-weight: 500;
}
.phase h3 { margin-top: -4px; }
.phase ul {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
}
.phase ul li {
  padding-left: 1.4rem;
  position: relative;
  margin-bottom: 0.5rem;
  color: var(--ink-soft);
}
.phase ul li::before {
  content: "·";
  color: var(--terracotta);
  position: absolute;
  left: 0;
}

/* Feature list */
.feature-list {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0;
}
.feature-list li {
  padding: 0.7rem 0;
  border-top: 1px solid var(--rule);
  display: grid;
  grid-template-columns: 30px 1fr;
  gap: 1rem;
  align-items: baseline;
}
.feature-list li:last-child { border-bottom: 1px solid var(--rule); }
.feature-list li::before {
  content: "✦";
  color: var(--terracotta);
  font-size: 1rem;
}

/* Pull quote / divider */
.divider {
  border: none;
  border-top: 1px solid var(--rule);
  margin: 1.75rem 0;
}

.pull {
  font-family: var(--serif);
  font-size: clamp(1.5rem, 2.6vw, 2rem);
  line-height: 1.35;
  color: var(--ink);
  font-style: italic;
  border-left: 3px solid var(--terracotta);
  padding-left: 1.6rem;
  margin: 1.5rem 0;
  max-width: 32em;
}

/* Stats */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
  margin: 2.5rem 0;
}
/* Tighter section variant for the stats band */
.stats-band { padding: 1.5rem 0; }
.stats-band .stats { margin: 0; }
.stat {
  border-top: 1px solid var(--rule);
  padding-top: 1.2rem;
}
.stat .num {
  font-family: var(--serif);
  font-size: 2.6rem;
  color: var(--terracotta-deep);
  line-height: 1;
  font-weight: 500;
}
.stat .label {
  font-size: 0.85rem;
  color: var(--ink-soft);
  margin-top: 0.5rem;
  letter-spacing: 0.04em;
}

/* Form */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2rem;
  margin: 2rem 0;
}
.field { display: flex; flex-direction: column; }
.field.full { grid-column: 1 / -1; }
.field label {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 0.5rem;
}
.field input, .field select, .field textarea {
  font-family: var(--sans);
  font-size: 1rem;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--rule);
  background: #FBF8F1;
  color: var(--ink);
  border-radius: 2px;
  transition: border-color 0.2s ease;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--terracotta);
}
.field textarea { min-height: 140px; resize: vertical; font-family: var(--sans); }

/* Footer */
.site-footer {
  border-top: 1px solid var(--rule);
  background: var(--cream-warm);
  padding: 2rem 0 1.5rem;
  margin-top: 1.75rem;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 2rem;
}
.footer-inner p, .footer-inner small {
  color: var(--ink-soft);
  font-size: 0.88rem;
  margin: 0;
}
.footer-tagline {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.1rem;
  color: var(--ink);
  max-width: 28em;
}

/* Page intro band - used on inner pages */
.page-intro {
  padding: 2.5rem 0 1.5rem;
  border-bottom: 1px solid var(--rule);
  background: linear-gradient(180deg, var(--cream-warm) 0%, var(--cream) 100%);
}

/* ============================================ */
/* Hero ribbon: bookshelf with flipping pages */
/* ============================================ */
.hero-ribbon {
  position: relative;
  height: 220px;
  margin: 0 0 1.25rem;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  overflow: hidden;
}

.bookshelf {
  display: flex;
  align-items: flex-end;
  gap: 5px;
  padding-bottom: 6px;
  border-bottom: 2px solid var(--ink-soft);
  position: relative;
}
.bookshelf::after {
  content: "";
  position: absolute;
  left: -20px;
  right: -20px;
  bottom: -4px;
  height: 4px;
  background: var(--ink-soft);
  opacity: 0.6;
  border-radius: 2px;
}

.book.spine {
  width: var(--book-width, 28px);
  height: var(--book-height, 160px);
  border-radius: 1px;
  position: relative;
  background-image:
    /* Head and tail caps, dark bands at top and bottom of spine */
    linear-gradient(180deg,
      rgba(0,0,0,0.48) 0%,
      rgba(0,0,0,0.48) 2.5%,
      transparent 2.5%,
      transparent 97.5%,
      rgba(0,0,0,0.48) 97.5%,
      rgba(0,0,0,0.48) 100%),
    /* Edge shadows, darker along left/right spine edges, brighter center */
    linear-gradient(90deg,
      rgba(0,0,0,0.22) 0%,
      rgba(0,0,0,0.06) 14%,
      transparent 30%,
      transparent 70%,
      rgba(0,0,0,0.08) 86%,
      rgba(0,0,0,0.26) 100%),
    /* Vertical leather grain */
    repeating-linear-gradient(90deg,
      rgba(0,0,0,0.05) 0px,
      rgba(0,0,0,0.05) 1px,
      transparent 1px,
      transparent 5px),
    /* Base leather color, light at top, deeper at bottom */
    linear-gradient(180deg,
      var(--leather-top, #5F7259) 0%,
      var(--leather-bottom, #4A5944) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.14),
    inset 0 -1px 0 rgba(0,0,0,0.45),
    1px 0 0 rgba(0,0,0,0.18);
}

/* Title panel, a "leather label" inset on the spine, gilt-stamped title text */
.book.spine::before {
  content: "";
  position: absolute;
  left: 14%;
  right: 14%;
  top: 30%;
  height: 19%;
  background-color: rgba(15, 10, 5, 0.42);
  /* Three gilt bands of varying width suggesting embossed title text */
  background-image:
    linear-gradient(rgba(212, 175, 55, 0.65), rgba(212, 175, 55, 0.65)),
    linear-gradient(rgba(212, 175, 55, 0.5), rgba(212, 175, 55, 0.5)),
    linear-gradient(rgba(212, 175, 55, 0.55), rgba(212, 175, 55, 0.55));
  background-size: 72% 2px, 46% 2px, 60% 2px;
  background-position: center 22%, center 50%, center 78%;
  background-repeat: no-repeat;
  border-top: 1px solid rgba(212, 175, 55, 0.55);
  border-bottom: 1px solid rgba(212, 175, 55, 0.55);
  box-shadow:
    inset 0 0 0 1px rgba(212, 175, 55, 0.15),
    inset 0 2px 3px rgba(0,0,0,0.25);
}

/* Imprint panel, smaller decorative band lower on the spine, single line of "text" */
.book.spine::after {
  content: "";
  position: absolute;
  left: 20%;
  right: 20%;
  top: 72%;
  height: 10%;
  background-color: rgba(15, 10, 5, 0.32);
  background-image:
    linear-gradient(rgba(212, 175, 55, 0.55), rgba(212, 175, 55, 0.55));
  background-size: 65% 1.5px;
  background-position: center;
  background-repeat: no-repeat;
  border-top: 1px solid rgba(212, 175, 55, 0.42);
  border-bottom: 1px solid rgba(212, 175, 55, 0.42);
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.2);
}

/* Per-book leather color and size */
.book.s1  { --leather-top: #6B7E63; --leather-bottom: #4A5944; --book-height: 168px; }
.book.s2  { --leather-top: #D4886A; --leather-bottom: #A85D3F; --book-height: 152px; --book-width: 34px; }
.book.s3  { --leather-top: #6A4D38; --leather-bottom: #3F2C1E; --book-height: 172px; --book-width: 26px; }
.book.s4  { --leather-top: #B36A4A; --leather-bottom: #7E4128; --book-height: 162px; --book-width: 30px; }
.book.s5  { --leather-top: #4A3528; --leather-bottom: #2E1F14; --book-height: 156px; }
.book.s6  { --leather-top: #C97B5A; --leather-bottom: #7E4128; --book-height: 174px; --book-width: 32px; }
.book.s7  { --leather-top: #D4C9A8; --leather-bottom: #A89875; --book-height: 165px; --book-width: 30px; }
.book.s8  { --leather-top: #7E3A2A; --leather-bottom: #4D1F14; --book-height: 158px; --book-width: 28px; }
.book.s9  { --leather-top: #6B3422; --leather-bottom: #3F1A10; --book-height: 170px; --book-width: 26px; }
.book.s10 { --leather-top: #BAA482; --leather-bottom: #8B7560; --book-height: 162px; --book-width: 32px; }

/* Fork and knife glyph used in the final wordmark sub-line */
.fork-knife {
  display: inline-block;
  vertical-align: -1px;
  height: 7px;
  width: auto;
  margin: 0 0.4em;
  color: var(--terracotta-deep);
}

/* Open book in the center */
.open-book {
  position: relative;
  width: 300px;
  height: 180px;
  margin: 0 10px;
  display: flex;
  align-items: stretch;
}
.open-book .page-base {
  flex: 1;
  background: linear-gradient(180deg, #FBF8F1 0%, #F0EAD9 100%);
  border: 1px solid var(--rule);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.4);
}
.open-book .page-base.left { border-right: none; box-shadow: inset 6px 0 8px rgba(42, 38, 34, 0.06); }
.open-book .page-base.right { border-left: none; box-shadow: inset -6px 0 8px rgba(42, 38, 34, 0.06); }
.open-book::before {
  content: "";
  position: absolute;
  left: 50%; top: 0; bottom: 0;
  width: 1px;
  background: var(--rule);
  transform: translateX(-50%);
  z-index: 1;
}

.flip-stage {
  position: absolute;
  inset: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: 2;
}

.flip-stage .word,
.flip-stage .final-mark {
  position: absolute;
  font-family: var(--serif);
  color: var(--ink);
  opacity: 0;
  letter-spacing: 0.05em;
  text-align: center;
  white-space: nowrap;
}
.flip-stage .word {
  font-size: 1.7rem;
  font-weight: 500;
}
.flip-stage .final-mark {
  font-family: var(--serif);
  font-size: 1.15rem;
  font-weight: 600;
  line-height: 1.08;
  max-width: 92%;
}
.flip-stage .final-mark em {
  color: var(--terracotta);
  font-style: italic;
  font-weight: 600;
}
.flip-stage .final-mark .small {
  display: block;
  font-size: 0.52rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 700;
  margin-top: 0.3rem;
}
.flip-stage .final-mark em {
  color: var(--terracotta);
  font-style: italic;
}

@keyframes flipReveal {
  0%   { opacity: 0; transform: perspective(400px) rotateY(-80deg); }
  18%  { opacity: 1; transform: perspective(400px) rotateY(0deg); }
  78%  { opacity: 1; transform: perspective(400px) rotateY(0deg); }
  100% { opacity: 0; transform: perspective(400px) rotateY(80deg); }
}

@keyframes finalReveal {
  0%   { opacity: 0; transform: scale(0.94); }
  100% { opacity: 1; transform: scale(1); }
}

/* Word sequence: OPEN -> BOOK -> HOSPITALITY -> wordmark */
.flip-stage .w1 { animation: flipReveal 1.3s ease both 0.5s; }
.flip-stage .w2 { animation: flipReveal 1.3s ease both 1.8s; }
.flip-stage .w3 { animation: flipReveal 1.3s ease both 3.1s; }
.flip-stage .final-mark { animation: finalReveal 1.0s ease both 4.5s; }

/* Page-turn shimmer overlay */
.open-book .page-shimmer {
  position: absolute;
  top: 6px; bottom: 6px;
  left: 50%;
  width: 50%;
  background: linear-gradient(90deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.7) 50%, rgba(255,255,255,0) 100%);
  transform-origin: left center;
  pointer-events: none;
  z-index: 3;
  opacity: 0;
}
@keyframes pageTurn {
  0%   { opacity: 0; transform: rotateY(0deg); }
  15%  { opacity: 0.8; }
  50%  { opacity: 0.8; transform: rotateY(-160deg); }
  85%  { opacity: 0; }
  100% { opacity: 0; transform: rotateY(-180deg); }
}
.open-book .page-shimmer.t1 { animation: pageTurn 1.0s ease both 1.4s; }
.open-book .page-shimmer.t2 { animation: pageTurn 1.0s ease both 2.7s; }
.open-book .page-shimmer.t3 { animation: pageTurn 1.0s ease both 4.0s; }

@media (prefers-reduced-motion: reduce) {
  .flip-stage .word { display: none; }
  .flip-stage .final-mark { opacity: 1; animation: none; }
  .open-book .page-shimmer { display: none; }
}

/* ============================================ */
/* Who we serve - imagery band                  */
/* ============================================ */
.serve-band {
  background: var(--cream-warm);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.serve-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin-top: 2rem;
}
.serve-tile {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: 4px;
  overflow: hidden;
  background: var(--cream);
  border: 1px solid var(--rule);
  box-shadow: var(--shadow);
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
}
.serve-tile .tile-img {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-color: var(--cream-warm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-soft);
  font-family: var(--sans);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-align: center;
  padding: 1rem;
}
.serve-tile .tile-img.placeholder {
  background: repeating-linear-gradient(
    45deg,
    rgba(168, 93, 63, 0.04),
    rgba(168, 93, 63, 0.04) 12px,
    rgba(168, 93, 63, 0.08) 12px,
    rgba(168, 93, 63, 0.08) 24px
  );
}
.serve-tile .tile-label {
  position: relative;
  z-index: 1;
  background: linear-gradient(180deg, rgba(42, 38, 34, 0) 0%, rgba(42, 38, 34, 0.72) 80%);
  color: var(--cream);
  padding: 2rem 1rem 1rem;
  width: 100%;
  font-family: var(--serif);
  font-size: 1.1rem;
  letter-spacing: 0.01em;
}

/* Responsive */
@media (max-width: 720px) {
  section { padding: 1.75rem 0; }
  .nav-links { gap: 1.2rem; }
  .nav-links a { font-size: 0.88rem; }
  .form-grid { grid-template-columns: 1fr; }
  .phase { grid-template-columns: 1fr; gap: 0.5rem; }
  .phase-number { font-size: 2.2rem; }
  .footer-inner { flex-direction: column; }
  .hero-ribbon { height: 180px; }
  .open-book { width: 220px; height: 140px; }
  .book.spine { height: 130px !important; }
  .book.spine.s1, .book.spine.s3, .book.spine.s6 { height: 140px !important; }
  .flip-stage .word { font-size: 1.2rem; }
  .flip-stage .final-mark { font-size: 0.88rem; max-width: 94%; }
  .flip-stage .final-mark .small { font-size: 0.44rem; letter-spacing: 0.04em; }
  .fork-knife { height: 6px; margin: 0 0.3em; }
  .lang-toggle { padding-left: 0.8rem; }
  .brand-mark { width: 30px; height: 30px; }
}
