/* The Glasshouse, Capella Taipei: events page.
   Colours and sizes follow capellahotels.com. Capella's Goudy and Calibre are licensed;
   Cormorant Garamond and Inter Tight stand in until Capella supplies the webfont files. */

@font-face {
  font-family: 'Cormorant Garamond';
  src: url('../fonts/cormorant-garamond.woff2') format('woff2');
  font-weight: 300 700;
  font-display: swap;
}
@font-face {
  font-family: 'Inter Tight';
  src: url('../fonts/inter-tight.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --ink: #242f3a;
  --text: #212322;
  --grey: #919191;
  --line: rgba(168, 168, 168, 0.5);
  --footer: #999ea3;
  --button: #f4f4f4;
  --button-hover: #8c8985;
  --blush: #f3e6dc;
  --serif: 'Cormorant Garamond', 'Times New Roman', serif;
  --sans: 'Inter Tight', Arial, sans-serif;
  --bar-h: 56px;
  --nav-h: 45px;
  --header-h: calc(var(--bar-h) + var(--nav-h));
  --hero-h: calc(100svh - var(--header-h));
  --gutter: 35px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.4;
  letter-spacing: 0.01rem;
  color: var(--text);
  background: #fff;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, p { margin: 0; font-weight: 400; }
[id] { scroll-margin-top: var(--header-h); }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* ---------- Hero: fixed image, the page scrolls up over it ---------- */
.hero {
  position: fixed;
  inset: 0;
  z-index: 0;
  background:
    linear-gradient(to bottom, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.7)),
    url('../assets/glasshouse-hero.jpg') center / cover no-repeat;
}
.hero-logo {
  position: absolute;
  left: 50%;
  top: calc(var(--hero-h) / 2);
  width: 300px;
  transform: translate(-50%, -50%);
}
.hero-space {
  position: relative;
  z-index: 1;
  height: var(--hero-h);
  min-height: 420px;
}
.hero-arrow {
  position: absolute;
  left: 50%;
  bottom: 28px;
  width: 22px;
  height: 22px;
  margin-left: -11px;
  border-right: 1px solid #fff;
  border-bottom: 1px solid #fff;
  transform: rotate(45deg);
  opacity: 0.85;
  transition: opacity 0.2s;
}
.hero-arrow:hover { opacity: 1; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: #fff;
  box-shadow: 0 3px 5px 0 rgba(168, 168, 168, 0.35);
}
.bar {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr auto 1fr 1fr;
  align-items: center;
  height: var(--bar-h);
  padding: 0 72px;
  border-bottom: 1px solid var(--line);
  font-size: 0.75rem;
  letter-spacing: 1px;
  text-transform: uppercase;
}
.bar-link { justify-self: center; color: var(--ink); }
.bar-link:hover, .hotel-nav a:hover { color: var(--grey); }
.star { justify-self: center; padding: 6px 20px; }
.star img { width: 16px; height: 27px; }
.book {
  justify-self: end;
  padding: 11px 20px;
  background: var(--button);
  color: var(--ink);
  transition: background-color 0.3s, color 0.3s;
}
.book:hover { background: var(--button-hover); color: #fff; }
.menu-toggle { display: none; }

.lang { position: relative; justify-self: start; color: var(--grey); }
.lang summary { cursor: pointer; list-style: none; }
.lang summary::-webkit-details-marker { display: none; }
.lang summary::after { content: '\25BE'; margin-left: 6px; font-size: 0.75em; }
.lang ul {
  position: absolute;
  top: calc(100% + 16px);
  left: -16px;
  min-width: 140px;
  padding: 10px 16px;
  background: #fff;
  box-shadow: 0 3px 8px rgba(168, 168, 168, 0.4);
  text-transform: none;
}
.lang li a { display: block; padding: 6px 0; color: var(--ink); }
.lang a[aria-current], .mobile-lang a[aria-current] { color: var(--grey); }

.hotel-nav { height: var(--nav-h); text-align: center; }
.hotel-nav ul { display: flex; justify-content: center; height: 100%; align-items: center; }
.hotel-nav li { padding: 0 15px; }
.hotel-nav a {
  font-size: 0.75rem;
  letter-spacing: 0.05rem;
  text-transform: uppercase;
  color: var(--ink);
}
.hotel-nav a.active, .mobile-menu a.active {
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-thickness: 1px;
}
.mobile-menu { display: none; }

/* ---------- Page content sits on white, over the fixed hero ---------- */
main, .site-footer { position: relative; z-index: 1; background: #fff; }
.container { width: 83.333%; max-width: 1366px; margin: 0 auto; }

.intro {
  padding: 110px 0 40px;
  background: linear-gradient(to bottom, var(--blush), #fff 40px);
}
.intro h1 {
  font-family: var(--serif);
  font-size: 3.25rem;
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--ink);
  margin: 0 0 70px 10%;
}
.intro-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  margin-left: 10%;
}
.intro-subtitle {
  font-family: var(--serif);
  font-size: 1.875rem;
  line-height: 1.27;
  color: var(--grey);
  max-width: 480px;
  text-wrap: balance;
}
.intro-synopsis {
  font-size: 1rem;
  font-weight: 300;
  line-height: 1.3;
  color: var(--grey);
  max-width: 360px;
}
.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  margin-top: 70px;
  font-size: 0.75rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--ink);
}
.breadcrumbs li + li::before { content: '/'; margin: 0 8px; }
.breadcrumbs a:hover { color: var(--grey); }

/* ---------- Events: one Turneo element per section ---------- */
.events { padding: 70px var(--gutter) 30px; }
.events + .events { border-top: 1px solid var(--line); margin: 50px auto 0; max-width: 1310px; padding-top: 90px; }
.events-head { text-align: center; margin-bottom: 40px; }
.events-head h2 {
  font-family: var(--serif);
  font-size: 2rem;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--ink);
}
.events-head p {
  margin-top: 12px;
  text-wrap: balance;
  font-size: 1.0625rem;
  font-weight: 300;
  color: var(--grey);
}
.events-body { max-width: 1240px; margin: 0 auto; }
/* Custom elements are inline by default; as blocks they can be measured (see app.js) */
.events-body turneo-element { display: block; }
/* Outlines of the element's experience cards, shown until the element renders */
.element-placeholder {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 44px 24px;
}
.element-placeholder[hidden] { display: none !important; }
.sk-img {
  aspect-ratio: 1;
  margin-bottom: 20px;
  border: 1px solid #e3e3e3;
  border-radius: 14px;
  background: #f7f7f7;
}
.sk-line { height: 10px; margin-top: 10px; border-radius: 5px; background: #ededed; }
.sk-title { width: 72%; height: 14px; margin: 0 0 16px; background: #e2e2e2; }
.sk-card:nth-child(4n+2) .sk-title { width: 56%; }
.sk-card:nth-child(4n+3) .sk-title { width: 84%; }
.sk-card:nth-child(4n) .sk-title { width: 63%; }
.sk-short { width: 78%; }
.sk-meta { width: 40%; margin-top: 20px; }
.sk-price { width: 26%; height: 12px; margin-top: 14px; background: #e2e2e2; }

/* Overlay style: text over a 3:4 image that fades to black, like Turneo's overlay cards */
.element-placeholder[data-style='overlay'] { gap: 24px; }
.sk-overlay {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 14px;
  background: #141414;
}
.sk-overlay::before {
  content: '';
  position: absolute;
  inset: 0;
  background: #d9d4cd;
  -webkit-mask-image: linear-gradient(to top, transparent 0%, #000 81%);
  mask-image: linear-gradient(to top, transparent 0%, #000 81%);
}
.sk-text { position: absolute; left: 0; right: 0; bottom: 0; padding: 22px; }
.sk-overlay .sk-line { background: rgba(255, 255, 255, 0.3); }
.sk-overlay .sk-title, .sk-overlay .sk-price { background: rgba(255, 255, 255, 0.85); }

/* ---------- Contact ---------- */
.contact {
  display: grid;
  grid-template-columns: 16.666% 1fr;
  margin-top: 100px;
  padding: 30px 30px 80px;
  border-top: 1px solid var(--line);
}
.contact-label {
  font-size: 0.8125rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text);
}
.contact-blocks {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  max-width: 1150px;
}
.contact h3 {
  font-family: var(--serif);
  font-size: 1.75rem;
  margin-bottom: 30px;
  color: var(--text);
}
.contact p {
  font-family: var(--serif);
  font-variant-numeric: lining-nums;
  font-size: 1.5rem;
  line-height: 1.3;
  padding-right: 20px;
  color: var(--text);
}
.contact p a:hover { color: var(--grey); }
.text-button {
  display: inline-block;
  margin-top: 26px;
  font-size: 0.8125rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--grey);
  border-bottom: 1px solid var(--grey);
}
.text-button:hover { color: var(--ink); border-color: var(--ink); }

/* ---------- Footer ---------- */
.site-footer {
  padding: 35px 30px 45px;
  background: var(--footer);
  color: #fff;
  font-weight: 300;
}
.site-footer ul {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px 30px;
  max-width: 1150px;
  margin-left: 16.666%;
}
.site-footer a { font-size: 0.9375rem; }
.site-footer a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Medium screens: Capella's 85.375em breakpoint ---------- */
@media (max-width: 1366px) {
  .contact h3 { font-size: 1.375rem; }
  .contact p { font-size: 1.125rem; }
}

/* ---------- Tablet and mobile: Capella's 63.75em breakpoint, menu instead of the nav row ---------- */
@media (max-width: 1020px) {
  :root { --bar-h: 45px; --nav-h: 0px; --gutter: 20px; }
  .bar { grid-template-columns: 1fr auto 1fr; padding: 0 20px; border-bottom: 2px solid var(--grey); }
  .lang, .bar-link, .hotel-nav { display: none; }
  .menu-toggle {
    display: block;
    justify-self: start;
    padding: 8px 0;
    border: 0;
    background: none;
    font: inherit;
    letter-spacing: inherit;
    text-transform: inherit;
    color: var(--ink);
    cursor: pointer;
  }
  .menu-toggle[aria-expanded='true']::after { content: ' \00D7'; }
  .star { padding: 4px 20px; }
  .book { padding: 7px 14px; }
  .book span { display: none; }

  /* Menu panel: white top list, then the grey hotel menu under its title */
  .mobile-menu:not([hidden]) {
    display: block;
    max-height: calc(100dvh - var(--bar-h));
    overflow-y: auto;
    background: #efefef;
    box-shadow: 0 3px 5px 0 rgba(168, 168, 168, 0.5);
  }
  .mobile-menu-top {
    padding: 15px 35px;
    background: #fff;
    box-shadow: 0 3px 5px 0 rgba(168, 168, 168, 0.5);
  }
  .mobile-menu-top > li { margin: 10px 0; }
  .mobile-menu-top > li > a, .mobile-lang summary {
    display: block;
    font-size: 0.875rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--ink);
    cursor: pointer;
  }
  .mobile-lang summary { list-style: none; }
  .mobile-lang summary::-webkit-details-marker { display: none; }
  .mobile-lang summary::after { content: '\25BE'; margin-left: 6px; font-size: 0.75em; }
  .mobile-lang ul { padding: 6px 0 0 16px; }
  .mobile-lang li a { display: block; padding: 7px 0; font-size: 0.9375rem; color: var(--ink); }
  .mobile-menu-hotel { position: relative; border-top: 1px solid var(--grey); }
  .mobile-menu-title {
    display: block;
    padding: 20px 35px;
    background: #fff;
    font-family: var(--serif);
    font-size: 1.25rem;
    line-height: 1;
    text-transform: uppercase;
    color: var(--grey);
    box-shadow: 0 3px 5px 0 rgba(168, 168, 168, 0.5);
  }
  .mobile-menu-hotel ul { padding: 30px 0; }
  .mobile-menu-hotel li { margin: 15px 0; padding: 0 35px; }
  .mobile-menu-hotel a { font-size: 1rem; text-transform: uppercase; color: var(--ink); }

  .hero-logo { width: 240px; }
  .hero-space { min-height: 360px; }
  .intro { padding-top: 70px; }
  .intro h1, .intro-cols { margin-left: 0; }

  .element-placeholder { grid-template-columns: repeat(2, 1fr); }
  /* Overlay row swipes, like Turneo's carousel: 3 per view on tablet */
  .element-placeholder[data-style='overlay'] {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
  }
  .element-placeholder[data-style='overlay']::-webkit-scrollbar { display: none; }
  .element-placeholder[data-style='overlay'] .sk-card { flex: 0 0 calc((100% - 48px) / 3); scroll-snap-align: start; }

  .contact { grid-template-columns: 1fr; gap: 24px; padding: 30px 20px 60px; }
  .contact-blocks { grid-template-columns: 1fr 1fr; gap: 20px 30px; }
  .site-footer ul { margin-left: 0; }
}

/* ---------- Mobile: Capella's 47.938em breakpoint ---------- */
@media (max-width: 767px) {
  .container { width: auto; margin: 0 20px; }
  .hero-logo { width: 210px; }
  .intro h1 { font-size: 2.375rem; margin-bottom: 25px; }
  .intro-cols { grid-template-columns: 1fr; gap: 0; }
  .intro-subtitle { font-size: 1.375rem; padding-right: 35px; margin-bottom: 35px; }
  .intro-synopsis { max-width: none; padding: 0 35px 0 70px; }
  .breadcrumbs { margin-top: 44px; }
  .events { padding-top: 50px; }
  .events + .events { margin-top: 30px; padding-top: 60px; }
  .events-head { margin-bottom: 28px; }
  .events-head h2 { font-size: 1.625rem; letter-spacing: 3px; }
  .events-head p { font-size: 1rem; }
  .element-placeholder { grid-template-columns: 1fr; }
  /* One overlay card with the next one peeking in */
  .element-placeholder[data-style='overlay'] { gap: 12px; }
  .element-placeholder[data-style='overlay'] .sk-card { flex-basis: 85%; scroll-snap-align: center; }
  .contact { margin-top: 60px; }
  .contact-blocks { grid-template-columns: 1fr; gap: 30px; margin-top: 6px; }
  .contact h3 { margin-bottom: 10px; font-weight: 600; }
  .text-button { margin-top: 14px; }
  .site-footer ul { grid-template-columns: 1fr 1fr; }
}
