/* ============================================
   Lofos Social House — static rebuild
   ============================================ */

:root {
  --cream: #fcf8f2;
  --cream-soft: #f5ecdb;
  --brown: #4a1d10;
  --brown-deep: #3a1610;
  --brown-light: #6e4a3a;
  --text: #4a1d10;
  --text-muted: #6e4a3a;
  --line: rgba(74, 29, 16, 0.18);
  --white: #ffffff;

  --font-serif: "Fraunces", Georgia, "Times New Roman", serif;
  --font-sans: "Space Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;

  --container: 1640px;
  --gutter: clamp(1rem, 3vw, 2.5rem);

  --header-h-full: 156px;
  --header-h-sticky: 60px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.6;
  color: var(--text);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a {
  color: inherit;
  text-decoration: none;
  transition: opacity 0.2s ease;
}

h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 0.5em;
  color: var(--text);
}

p { margin: 0 0 1em; }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ============================================
   Top Header  (full size, two rows)
   ============================================ */

.site-header {
  position: relative;
  background: var(--cream);
  padding: 1.75rem 0 1rem;
  z-index: 50;
}

.header-row-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 2rem;
  padding: 0 var(--gutter);
  max-width: var(--container);
  margin: 0 auto;
}

.brand {
  display: inline-flex;
  flex-direction: column;
  line-height: 0.95;
  font-family: var(--font-serif);
  color: var(--brown);
  font-weight: 700;
  letter-spacing: 0.01em;
  flex-shrink: 0;
}

.brand .brand-main {
  font-size: clamp(2.25rem, 4.4vw, 3.75rem);
  letter-spacing: 0.02em;
}

.brand .brand-sub {
  font-size: clamp(0.95rem, 1.5vw, 1.25rem);
  letter-spacing: 0.18em;
  margin-top: 0.1em;
  font-weight: 700;
}

.header-cta-links {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  margin-top: 0.6rem;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  color: var(--brown);
}

.header-cta-links a {
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-thickness: 1px;
}

.header-cta-links a:hover {
  opacity: 0.7;
}

.header-cta-links .sep {
  opacity: 0.5;
}

.primary-nav {
  padding: 0.35rem var(--gutter) 0;
  max-width: var(--container);
  margin: 0 auto;
}

.primary-nav ul {
  display: flex;
  flex-wrap: wrap;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 0 1.85rem;
}

.primary-nav a {
  font-family: var(--font-sans);
  font-size: 0.95rem;
  color: var(--brown);
  font-weight: 500;
  padding: 0.35rem 0;
  display: inline-block;
}

.primary-nav a:hover {
  opacity: 0.6;
}

/* ============================================
   Sticky header (appears on scroll)
   ============================================ */

.sticky-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: var(--cream);
  border-bottom: 1px solid var(--line);
  padding: 0.7rem var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  transform: translateY(-100%);
  transition: transform 0.32s cubic-bezier(0.22, 0.61, 0.36, 1);
  height: var(--header-h-sticky);
}

body.is-scrolled .sticky-header {
  transform: translateY(0);
}

.sticky-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  flex-shrink: 0;
  color: var(--brown);
}

.sticky-brand img {
  height: 32px;
  width: auto;
}

.sticky-brand-text {
  font-family: var(--font-serif);
  font-weight: 700;
  line-height: 1;
  display: flex;
  flex-direction: column;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
}

.sticky-brand-text .l1 { font-size: 1.05rem; letter-spacing: 0.04em; }
.sticky-brand-text .l2 { font-size: 0.62rem; letter-spacing: 0.18em; margin-top: 2px; }

.sticky-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 1.5rem;
}

.sticky-nav a {
  font-family: var(--font-sans);
  font-size: 0.86rem;
  color: var(--brown);
  font-weight: 500;
  padding: 0.25rem 0;
}

.sticky-nav a:hover { opacity: 0.65; }

.sticky-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  color: var(--brown);
}

.sticky-cta a {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.menu-toggle {
  display: none;
  width: 40px;
  height: 40px;
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 0;
  position: relative;
  flex-shrink: 0;
}

.menu-toggle span {
  display: block;
  position: absolute;
  left: 8px;
  right: 8px;
  height: 1.5px;
  background: var(--brown);
  transition: transform 0.3s ease, opacity 0.3s ease, top 0.3s ease;
}

.menu-toggle span:nth-child(1) { top: 13px; }
.menu-toggle span:nth-child(2) { top: 19px; }
.menu-toggle span:nth-child(3) { top: 25px; }

body.menu-open .menu-toggle span:nth-child(1) { top: 19px; transform: rotate(45deg); }
body.menu-open .menu-toggle span:nth-child(2) { opacity: 0; }
body.menu-open .menu-toggle span:nth-child(3) { top: 19px; transform: rotate(-45deg); }

/* ============================================
   Mobile menu — horizontal scroll
   ============================================ */

.mobile-menu {
  position: fixed;
  top: var(--header-h-sticky);
  left: 0;
  right: 0;
  z-index: 99;
  background: var(--cream);
  border-bottom: 1px solid var(--line);
  padding: 1rem 0 1.25rem;
  transform: translateY(-120%);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.35s ease, opacity 0.25s ease;
  display: none;
}

body.menu-open .mobile-menu {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.mobile-menu-scroll {
  display: flex;
  gap: 1.5rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x proximity;
  padding: 0.4rem var(--gutter) 0.4rem;
  scrollbar-width: none;
}

.mobile-menu-scroll::-webkit-scrollbar { display: none; }

.mobile-menu-scroll a {
  flex-shrink: 0;
  scroll-snap-align: start;
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--brown);
  padding: 0.4rem 0;
  white-space: nowrap;
  border-bottom: 1px solid transparent;
}

.mobile-menu-scroll a.is-active { border-bottom-color: var(--brown); }

.mobile-cta-row {
  display: flex;
  gap: 0.5rem;
  padding: 1rem var(--gutter) 0;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  color: var(--brown);
}

.mobile-cta-row a {
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* ============================================
   Hero
   ============================================ */

.hero {
  padding: 0.5rem 0 0;
  background: var(--cream);
}

.hero-frame {
  position: relative;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.hero-image {
  position: relative;
  overflow: hidden;
}

.hero-image > img {
  width: 100%;
  height: clamp(420px, 60vh, 720px);
  object-fit: cover;
  display: block;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--white);
  padding: 2rem;
  gap: 0.5rem;
}

.hero-overlay .krikri {
  width: clamp(70px, 9vw, 130px);
  height: auto;
  filter: drop-shadow(0 2px 12px rgba(0,0,0,0.35));
  margin-bottom: 0.75rem;
}

.hero-overlay h1 {
  font-family: var(--font-serif);
  color: var(--white);
  font-weight: 500;
  font-size: clamp(2rem, 4.4vw, 3.75rem);
  margin: 0;
  letter-spacing: 0.005em;
  text-shadow: 0 2px 24px rgba(0,0,0,0.35);
}

.hero-overlay .tagline {
  font-family: var(--font-sans);
  font-size: clamp(0.95rem, 1.4vw, 1.1rem);
  color: var(--white);
  margin: 0.25rem 0 0;
  font-weight: 400;
  text-shadow: 0 1px 12px rgba(0,0,0,0.35);
  max-width: 640px;
}

/* ============================================
   Feature band (deep brown)
   ============================================ */

.feature-band {
  background: var(--brown);
  color: var(--white);
  padding: 2.4rem 0;
}

.feature-grid {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0;
}

.feature {
  text-align: center;
  padding: 0.4rem 1.25rem;
  position: relative;
}

.feature + .feature::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 1px;
  background-image: linear-gradient(to bottom, rgba(255,255,255,0.35) 50%, transparent 50%);
  background-size: 1px 6px;
  background-repeat: repeat-y;
}

.feature-label {
  font-family: var(--font-sans);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: 0.6rem;
  color: rgba(255, 255, 255, 0.85);
}

.feature-text {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  color: var(--white);
  font-weight: 400;
  line-height: 1.35;
}

/* ============================================
   Photo grid (mosaic — 2 rows of 4)
   ============================================ */

.mosaic {
  padding: 0;
  background: var(--cream);
}

.mosaic-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
  max-width: var(--container);
  margin: 0 auto 0.5rem;
  padding: 0 var(--gutter);
}

.mosaic-row img {
  width: 100%;
  height: clamp(180px, 22vw, 320px);
  object-fit: cover;
}

.mosaic-row.offset {
  transform: translateX(6%);
}

/* ============================================
   Story sections (text + image)
   ============================================ */

.story {
  padding: clamp(4rem, 8vw, 7rem) 0;
  background: var(--cream);
  position: relative;
}

.story.dark {
  background: var(--brown);
  color: var(--white);
}

.story.dark h2,
.story.dark p,
.story.dark .link-arrow {
  color: var(--white);
}

.story.dark .link-arrow {
  border-color: var(--white);
}

.story-decor {
  display: block;
  width: clamp(36px, 4vw, 56px);
  height: auto;
  margin: 0 auto clamp(2rem, 4vw, 3rem);
}

.story-grid {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}

.story.reverse .story-grid {
  direction: rtl;
}

.story.reverse .story-text,
.story.reverse .story-image {
  direction: ltr;
}

.story-text {
  max-width: 520px;
}

.story-text h2 {
  font-size: clamp(1.6rem, 2.6vw, 2.15rem);
  font-weight: 600;
  margin-bottom: 1rem;
  line-height: 1.2;
}

.story-text p {
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--text);
  margin-bottom: 1.75rem;
}

.story.dark .story-text p {
  color: rgba(255, 255, 255, 0.88);
}

.story-image img {
  width: 100%;
  height: clamp(380px, 50vw, 580px);
  object-fit: cover;
}

/* Outlined small caps button (Learn More) */
.link-arrow {
  display: inline-block;
  padding: 0.85rem 1.6rem;
  border: 1px solid var(--brown);
  color: var(--brown);
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  transition: background 0.2s ease, color 0.2s ease;
}

.link-arrow:hover {
  background: var(--brown);
  color: var(--cream);
  opacity: 1;
}

.story.dark .link-arrow:hover {
  background: var(--white);
  color: var(--brown);
}

/* ============================================
   Newsletter
   ============================================ */

.community {
  background: var(--cream);
  padding: clamp(3rem, 6vw, 5rem) 0 clamp(4rem, 8vw, 6rem);
  text-align: center;
}

.community-hero {
  max-width: 1400px;
  margin: 0 auto clamp(2rem, 4vw, 3.5rem);
  padding: 0 var(--gutter);
}

.community-hero img {
  width: 100%;
  height: clamp(280px, 36vw, 460px);
  object-fit: cover;
}

.community-inner {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.community h2 {
  font-size: clamp(1.75rem, 3vw, 2.4rem);
  font-weight: 600;
  margin-bottom: 1rem;
}

.community > .community-inner > p {
  color: var(--text);
  margin-bottom: 2.5rem;
  font-size: 0.95rem;
  line-height: 1.7;
}

.newsletter-card {
  background: var(--brown);
  color: var(--white);
  padding: clamp(2.5rem, 5vw, 4rem) clamp(1.25rem, 4vw, 3rem);
  max-width: 880px;
  margin: 0 auto;
  text-align: center;
}

.newsletter-card h3 {
  font-family: var(--font-serif);
  font-size: clamp(1.75rem, 3vw, 2.4rem);
  font-weight: 500;
  color: var(--white);
  margin: 0 0 1.75rem;
}

.newsletter-form {
  max-width: 540px;
  margin: 0 auto 1.75rem;
}

.newsletter-form input {
  width: 100%;
  padding: 1rem 1.25rem;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: var(--white);
  outline: none;
  margin-bottom: 1rem;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.newsletter-form input::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

.newsletter-form input:focus {
  border-color: rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.12);
}

.newsletter-form .btn-register {
  background: transparent;
  color: var(--white);
  border: 1px solid var(--white);
  padding: 0.7rem 1.4rem;
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  float: right;
  transition: all 0.2s ease;
}

.newsletter-form .btn-register:hover {
  background: var(--white);
  color: var(--brown);
}

.newsletter-form::after {
  content: "";
  display: block;
  clear: both;
}

.newsletter-card hr {
  border: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.25);
  margin: 2.5rem 0 1.75rem;
  max-width: 540px;
}

.community-social {
  display: flex;
  justify-content: center;
  gap: 2rem;
  font-family: var(--font-serif);
  font-size: 1rem;
  font-weight: 500;
  color: var(--white);
}

.community-social a:hover { opacity: 0.75; }

/* ============================================
   Footer
   ============================================ */

.site-footer {
  background: var(--cream);
  padding: clamp(2.5rem, 5vw, 4rem) 0 2rem;
  border-top: 1px solid var(--line);
}

.footer-grid {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: grid;
  grid-template-columns: 1fr 1fr 1fr auto;
  gap: clamp(1.5rem, 4vw, 4rem);
  align-items: start;
}

.footer-grid ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  font-family: var(--font-sans);
  font-size: 0.88rem;
  color: var(--brown);
}

.footer-grid a:hover { opacity: 0.65; }

.footer-brand {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.5rem;
  color: var(--brown);
  text-align: right;
}

.footer-brand img {
  width: clamp(48px, 5vw, 72px);
  height: auto;
}

.footer-brand .lofos-text {
  font-family: var(--font-serif);
  font-weight: 700;
  line-height: 0.95;
  color: var(--brown);
}

.footer-brand .lofos-text .l1 {
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  letter-spacing: 0.04em;
  display: block;
}

.footer-brand .lofos-text .l2 {
  font-size: clamp(0.75rem, 1vw, 0.95rem);
  letter-spacing: 0.18em;
  display: block;
  margin-top: 0.15rem;
}

/* ============================================
   Responsive
   ============================================ */

@media (max-width: 1024px) {
  .primary-nav ul { gap: 0 1.35rem; }
  .primary-nav a { font-size: 0.88rem; }
  .feature-grid { grid-template-columns: repeat(3, 1fr); row-gap: 1.6rem; }
  .feature:nth-child(4)::before,
  .feature:nth-child(2)::before { background-image: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 800px) {
  .header-row-top { flex-direction: column; align-items: flex-start; gap: 0.5rem; }
  .header-cta-links { font-size: 0.88rem; }
  .primary-nav { display: none; }
  .menu-toggle { display: block; }
  .mobile-menu { display: block; }
  body.is-scrolled .sticky-nav { display: none; }
  .sticky-cta { display: none; }
  body.is-scrolled .menu-toggle { display: block; }

  .story-grid { grid-template-columns: 1fr; gap: 2rem; }
  .story.reverse .story-grid { direction: ltr; }

  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .feature:nth-child(3)::before,
  .feature:nth-child(5)::before { background-image: none; }

  .mosaic-row { grid-template-columns: repeat(2, 1fr); }
  .mosaic-row.offset { transform: none; }

  .footer-grid { grid-template-columns: 1fr; text-align: left; }
  .footer-brand { align-items: flex-start; text-align: left; }
}

@media (max-width: 540px) {
  .brand .brand-main { font-size: 2rem; }
  .brand .brand-sub { font-size: 0.85rem; }
  .hero-image > img { height: 56vh; min-height: 380px; }
  .feature-grid { grid-template-columns: 1fr 1fr; gap: 1.25rem; }
  .feature::before { background-image: none !important; }
}

:focus-visible {
  outline: 2px solid var(--brown-light);
  outline-offset: 3px;
}
