/* =========================================
   Cannon River Coworking — Stylesheet
   ========================================= */

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --river:      #335E37;
  --river-dark: #2B512F;
  --river-light:#e4ede5;
  --sand:       #f5f0e8;
  --bark:       #3d2b1f;
  --charcoal:   #222;
  --mid:        #555;
  --light:      #888;
  --white:      #fff;
  --accent:     #ffffff;
  --accent-lt:  #f0f0f0;
  --radius:     8px;
  --shadow:     0 4px 24px rgba(0,0,0,.10);
  --transition: .25s ease;
  --max-w:      1140px;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Century Gothic', 'Futura', 'Trebuchet MS', sans-serif;
  color: var(--charcoal);
  background: var(--white);
  line-height: 1.6;
}

img { display: block; max-width: 100%; }
a  { color: inherit; text-decoration: none; }

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

.section-label {
  display: inline-block;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--river);
  margin-bottom: 12px;
}

.section-title {
  font-family: 'Century Gothic', 'Futura', 'Trebuchet MS', sans-serif;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 800;
  line-height: 1.2;
  color: var(--bark);
}

.section-sub {
  margin-top: 14px;
  font-size: 1.05rem;
  color: var(--mid);
  max-width: 560px;
}

/* --- NAV --- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(255,255,255,.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(0,0,0,.07);
  transition: box-shadow var(--transition);
}
.nav.scrolled { box-shadow: 0 2px 16px rgba(0,0,0,.10); }

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.nav-logo {
  display: flex;
  align-items: center;
}
.nav-logo-img {
  height: 48px;
  width: auto;
  display: block;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
  list-style: none;
}
.nav-links a {
  padding: 6px 14px;
  border-radius: 20px;
  font-size: .9rem;
  font-weight: 500;
  color: var(--mid);
  transition: background var(--transition), color var(--transition);
}
.nav-links a:hover { background: var(--river-light); color: var(--river-dark); }

.nav-cta {
  background: var(--river) !important;
  color: var(--white) !important;
  font-weight: 600 !important;
}
.nav-cta:hover { background: var(--river-dark) !important; }

.nav-burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 6px;
  border: none;
  background: none;
}
.nav-burger span {
  display: block;
  width: 24px; height: 2px;
  background: var(--charcoal);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}
.nav-burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-burger.open span:nth-child(2) { opacity: 0; }
.nav-burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* --- HERO --- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}


.hero-overlay {
  position: relative;
  z-index: 1;
  background: rgba(255, 255, 255, 0.9);
  padding: 40px 48px;
  max-width: 45%;
  border-radius: 4px;
}

@media (max-width: 767px) {
  .hero-overlay {
    max-width: 90%;
    padding: 32px 24px;
  }
}

.hero-phone {
  margin: 0 0 8px;
  font-size: 1.1rem;
}

.hero-phone a {
  color: var(--river-dark);
  text-decoration: none;
}

.hero-title {
  font-size: clamp(2rem, 5vw, 3rem);
  color: var(--river);
  margin: 0 0 16px;
  line-height: 1.2;
}

.hero-tagline {
  font-size: 1.1rem;
  color: #1b1b1b;
  margin: 0 0 24px;
  line-height: 1.5;
}

.hero-actions {
  margin-top: 8px;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
}

/* Hero buttons */
.hero .btn-primary {
  background: var(--river);
  color: var(--white);
}
.hero .btn-primary:hover { background: var(--river-dark); }

.hero .btn-outline {
  background: transparent;
  color: var(--river-dark);
  border-color: var(--river);
}
.hero .btn-outline:hover { background: rgba(94,110,58,.08); }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 50px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
  border: 2px solid transparent;
}
.btn:hover { transform: translateY(-2px); }

.btn-primary {
  background: var(--white);
  color: var(--river-dark);
  box-shadow: 0 4px 20px rgba(0,0,0,.2);
}
.btn-primary:hover { box-shadow: 0 8px 28px rgba(0,0,0,.25); }

.btn-outline {
  background: transparent;
  color: var(--white);
  border-color: rgba(255,255,255,.5);
}
.btn-outline:hover { background: rgba(255,255,255,.1); border-color: var(--white); }

.btn-accent {
  background: var(--accent);
  color: var(--river-dark);
  box-shadow: var(--shadow);
}
.btn-accent:hover { background: #e0e0e0; box-shadow: 0 8px 28px rgba(0,0,0,.2); }

/* --- STATS STRIP --- */
.stats {
  background: var(--white);
  padding: 52px 24px;
  border-bottom: 1px solid #eee;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 32px;
  text-align: center;
}
.stat-num {
  font-size: 2.5rem;
  font-weight: 900;
  color: var(--river);
  line-height: 1;
}
.stat-label {
  margin-top: 6px;
  font-size: .85rem;
  color: var(--mid);
  font-weight: 500;
}

/* --- ABOUT --- */
.about {
  padding: 96px 24px;
  background: var(--sand);
}

.about-photo-wrap {
  margin-bottom: 40px;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow);
  max-height: 420px;
}
.about-photo {
  width: 100%;
  height: 420px;
  object-fit: cover;
  object-position: center center;
  display: block;
}

.about-header {
  margin-bottom: 28px;
  text-align: center;
}

.about-features {
  margin-top: 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.about-feature {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.about-feature-icon {
  width: 36px; height: 36px;
  flex-shrink: 0;
  border-radius: 8px;
  background: var(--river-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}
.about-feature-text strong { display: block; font-size: .95rem; color: var(--bark); }
.about-feature-text span  { font-size: .85rem; color: var(--mid); }

/* --- ABOUT Q&A --- */
.about-qa {
  display: flex;
  flex-direction: column;
  gap: 28px;
  margin-top: 20px;
}
.about-qa--two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 36px 52px;
  align-items: start;
  margin-top: 0;
}
.about-qa-item { }
.about-q {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--river-dark);
  margin-bottom: 8px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.about-q::before {
  content: 'Q';
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px; height: 24px;
  background: var(--river);
  color: var(--white);
  border-radius: 50%;
  font-size: .7rem;
  font-weight: 900;
  margin-top: 1px;
}
.about-a {
  font-size: .92rem;
  color: var(--mid);
  line-height: 1.7;
  padding-left: 34px;
}

/* --- AMENITIES --- */
.amenities {
  padding: 96px 24px;
  background: var(--white);
  text-align: center;
}
.amenities .section-sub { margin-left: auto; margin-right: auto; }

.amenities-grid {
  margin-top: 56px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 28px;
}
.amenity-card {
  background: var(--sand);
  border-radius: var(--radius);
  padding: 32px 20px;
  transition: transform var(--transition), box-shadow var(--transition);
}
.amenity-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}
.amenities-grid .amenity-card:last-child {
  grid-column: 1 / -1;
  max-width: 260px;
  margin: 0 auto;
  width: 100%;
}
.amenity-icon {
  font-size: 2rem;
  margin-bottom: 14px;
}
.amenity-card h3 {
  font-size: .95rem;
  font-weight: 700;
  color: var(--bark);
  margin-bottom: 8px;
}
.amenity-card p {
  font-size: .82rem;
  color: var(--mid);
  line-height: 1.5;
}

/* --- PLANS --- */
.plans {
  padding: 96px 24px;
  background: var(--river-dark);
  text-align: center;
}
.plans .section-label { color: #90c896; }
.plans .section-title { color: var(--white); }
.plans .section-sub   { color: rgba(255,255,255,.65); margin-left: auto; margin-right: auto; }

.plans-grid {
  margin-top: 56px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  align-items: start;
}

.plan-card {
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 16px;
  padding: 36px 28px;
  text-align: left;
  transition: transform var(--transition), background var(--transition);
  position: relative;
}
.plan-card:hover { transform: translateY(-4px); background: rgba(255,255,255,.10); }

.plan-card.featured {
  background: var(--white);
  border-color: var(--white);
  transform: scale(1.03);
}
.plan-card.featured:hover { transform: scale(1.03) translateY(-4px); }

.plan-badge {
  position: absolute;
  top: -12px; left: 50%;
  transform: translateX(-50%);
  background: var(--accent);
  color: var(--river-dark);
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 4px 14px;
  border-radius: 20px;
}

.plan-name {
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: rgba(255,255,255,.55);
  margin-bottom: 8px;
}
.plan-card.featured .plan-name { color: var(--river); }

.plan-price {
  font-size: 2.6rem;
  font-weight: 900;
  color: var(--white);
  line-height: 1;
}
.plan-card.featured .plan-price { color: var(--river-dark); }

.plan-price sup { font-size: 1.2rem; font-weight: 600; vertical-align: top; margin-top: 8px; }
.plan-price sub { font-size: .9rem; font-weight: 400; color: rgba(255,255,255,.5); }
.plan-card.featured .plan-price sub { color: var(--mid); }

.plan-desc {
  margin: 12px 0 24px;
  font-size: .88rem;
  color: rgba(255,255,255,.6);
  line-height: 1.55;
}
.plan-card.featured .plan-desc { color: var(--mid); }

.plan-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 28px;
}
.plan-features li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: .88rem;
  color: rgba(255,255,255,.8);
}
.plan-card.featured .plan-features li { color: var(--charcoal); }

.plan-features li::before {
  content: '✓';
  flex-shrink: 0;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: rgba(255,255,255,.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .7rem;
  font-weight: 700;
  color: #90c896;
}
.plan-card.featured .plan-features li::before {
  background: var(--river-light);
  color: var(--river);
}

.plan-btn {
  display: block;
  width: 100%;
  padding: 13px;
  border-radius: 50px;
  text-align: center;
  font-size: .95rem;
  font-weight: 700;
  background: rgba(255,255,255,.12);
  color: var(--white);
  transition: background var(--transition);
  border: none;
  cursor: pointer;
}
.plan-btn:hover { background: rgba(255,255,255,.2); }
.plan-card.featured .plan-btn {
  background: var(--river);
  color: var(--white);
}
.plan-card.featured .plan-btn:hover { background: var(--river-dark); }

/* --- CALENDAR PREVIEW --- */
.cal-preview-section {
  padding: 88px 24px;
  background: var(--sand);
}
/* --- CALENDAR ON HOMEPAGE --- */
.cal-home-section {
  padding: 88px 24px 96px;
  background: var(--sand);
}
.cal-home-section .container {
  max-width: 1600px;
  padding-left: 185px;
  padding-right: 185px;
}
@media (max-width: 1150px) {
  /* Plants hidden below this breakpoint, revert to normal padding */
  .cal-home-section .container {
    padding-left: 24px;
    padding-right: 24px;
  }
}
.cal-home-header {
  text-align: center;
  margin-bottom: 48px;
}
.cal-home-header .section-sub { margin: 0 auto; }
.cal-preview-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
}
.cal-preview-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.cal-preview-item {
  background: var(--white);
  border-radius: 12px;
  padding: 16px 18px;
  border-left: 4px solid var(--river);
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition);
  text-decoration: none;
  display: block;
  color: inherit;
}
.cal-preview-item:hover { transform: translateY(-2px); box-shadow: 0 6px 28px rgba(0,0,0,.13); }
.cal-preview-item--bookable { border-left-color: #3a9e5f; }
.cal-preview-item--booked   { border-left-color: #ccc; opacity: .7; }
.cal-preview-date {
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--light);
  margin-bottom: 3px;
}
.cal-preview-name {
  font-size: .97rem;
  font-weight: 700;
  color: var(--bark);
  margin-bottom: 2px;
}
.cal-preview-time { font-size: .82rem; color: var(--mid); }
.cal-preview-more {
  text-align: center;
  margin-top: 4px;
}
.cal-preview-more a {
  font-size: .88rem;
  font-weight: 600;
  color: var(--river-dark);
  text-decoration: underline;
}
@media (max-width: 768px) {
  .cal-preview-inner { grid-template-columns: 1fr; gap: 36px; }
}

/* --- LOCATION --- */
.location {
  padding: 96px 24px;
  background: var(--sand);
}
.location-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
}
.map-embed-wrap {
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow);
  aspect-ratio: 4/3;
}
.map-embed-wrap iframe {
  width: 100%;
  height: 100%;
  display: block;
  border: 0;
}

.location-content .section-sub { max-width: 100%; }

.info-list {
  margin-top: 28px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.info-item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.info-icon {
  width: 40px; height: 40px;
  flex-shrink: 0;
  border-radius: 10px;
  background: var(--river-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}
.info-item strong { display: block; font-size: .9rem; color: var(--bark); margin-bottom: 2px; }
.info-item span   { font-size: .85rem; color: var(--mid); line-height: 1.5; }

/* --- CONTACT --- */
.contact {
  padding: 96px 24px;
  background: var(--white);
}
.contact-inner {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 64px;
  align-items: start;
}
.contact-form {
  background: var(--sand);
  border-radius: 16px;
  padding: 40px;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.form-group {
  margin-bottom: 18px;
}
.form-group label {
  display: block;
  font-size: .82rem;
  font-weight: 600;
  color: var(--bark);
  margin-bottom: 6px;
  letter-spacing: .03em;
}
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid #ddd;
  border-radius: var(--radius);
  font-size: .9rem;
  font-family: inherit;
  color: var(--charcoal);
  background: var(--white);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--river);
  box-shadow: 0 0 0 3px rgba(94,110,58,.12);
}
.form-group textarea { resize: vertical; min-height: 110px; }

/* --- FOOTER --- */
.footer {
  background: var(--bark);
  color: rgba(255,255,255,.7);
  padding: 56px 24px 28px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255,255,255,.1);
}
.footer-logo-img {
  height: 52px;
  width: auto;
  display: block;
  filter: brightness(0) invert(1);
  opacity: .85;
}
.footer-brand p {
  font-size: .85rem;
  line-height: 1.65;
  max-width: 280px;
}
.footer-col h4 {
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--white);
  margin-bottom: 14px;
}
.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.footer-col a {
  font-size: .85rem;
  transition: color var(--transition);
}
.footer-col a:hover { color: var(--white); }

.footer-bottom {
  padding-top: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: .8rem;
}
.footer-bottom a { color: rgba(255,255,255,.5); transition: color var(--transition); }
.footer-bottom a:hover { color: var(--white); }

/* --- MOBILE NAV --- */
@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: fixed;
    top: 68px; left: 0; right: 0;
    background: var(--white);
    flex-direction: column;
    padding: 16px;
    box-shadow: 0 8px 24px rgba(0,0,0,.12);
    gap: 4px;
  }
  .nav-links.open { display: flex; }
  .nav-links a { width: 100%; text-align: center; padding: 12px; border-radius: var(--radius); }
  .nav-burger { display: flex; }

  .location-grid,
  .contact-inner { grid-template-columns: 1fr; gap: 40px; }
  .about-qa--two-col { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .footer-bottom { flex-direction: column; gap: 8px; text-align: center; }
  .form-row { grid-template-columns: 1fr; }
  .plan-card.featured { transform: none; }
  .mem-blurb-inner { grid-template-columns: 1fr; gap: 40px; }
  .mem-blurb-options { grid-template-columns: 1fr 1fr; }
  .mem-blurb-actions { flex-direction: column; }
  .mem-blurb-actions .btn { justify-content: center; }
}

/* --- MEMBERSHIP BLURB --- */
.mem-blurb {
  padding: 96px 24px;
  background: var(--river-dark);
}
.mem-blurb-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}
.mem-blurb .section-label { color: #90c896; }
.mem-blurb .section-title { color: var(--white); }
.mem-blurb .section-sub   { color: rgba(255,255,255,.7); max-width: 100%; }

.mem-blurb-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 28px;
}
.mem-blurb-pill {
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 10px;
  padding: 14px 16px;
  transition: background var(--transition);
}
.mem-blurb-pill:hover { background: rgba(255,255,255,.14); }
.pill-name {
  display: block;
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: rgba(255,255,255,.55);
  margin-bottom: 4px;
}
.pill-price {
  display: block;
  font-size: 1rem;
  font-weight: 700;
  color: var(--white);
}
.mem-blurb-actions {
  margin-top: 32px;
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}
.btn-outline-dark {
  background: transparent;
  color: var(--white);
  border: 2px solid rgba(255,255,255,.4);
}
.btn-outline-dark:hover { border-color: var(--white); background: rgba(255,255,255,.08); }

.blurb-card {
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 16px;
  overflow: hidden;
}
.blurb-card-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 22px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  font-size: .9rem;
  color: rgba(255,255,255,.75);
}
.blurb-card-row strong { color: #90c896; font-size: 1rem; }
.blurb-card-footer {
  padding: 14px 22px;
  background: rgba(255,255,255,.04);
  text-align: center;
}
.blurb-card-footer a {
  font-size: .85rem;
  font-weight: 600;
  color: #90c896;
  transition: color var(--transition);
}
.blurb-card-footer a:hover { color: var(--white); }

/* --- PHOTO MARQUEE --- */
.slideshow-section {
  background: var(--charcoal);
  overflow: hidden;
  padding: 0;
}
.photo-marquee-wrap {
  overflow: hidden;
  position: relative;
}
.photo-marquee-wrap::before,
.photo-marquee-wrap::after {
  content: '';
  position: absolute;
  top: 0; bottom: 0;
  width: 80px;
  z-index: 2;
  pointer-events: none;
}
.photo-marquee-wrap::before {
  left: 0;
  background: linear-gradient(to right, var(--charcoal), transparent);
}
.photo-marquee-wrap::after {
  right: 0;
  background: linear-gradient(to left, var(--charcoal), transparent);
}
.photo-marquee {
  display: flex;
  gap: 10px;
  width: max-content;
  animation: marquee 80s linear infinite;
  padding: 10px 0;
}
.photo-marquee:hover { animation-play-state: paused; }
.photo-marquee img {
  height: 280px;
  width: auto;
  display: block;
  border-radius: 8px;
  object-fit: contain;
  flex-shrink: 0;
}
@keyframes marquee {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* --- SOCIAL MEDIA --- */
.social-links {
  display: flex;
  gap: 12px;
  margin-top: 16px;
}
.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px; height: 38px;
  border-radius: 50%;
  background: rgba(255,255,255,.10);
  color: rgba(255,255,255,.75);
  font-size: .85rem;
  font-weight: 700;
  transition: background var(--transition), color var(--transition);
  text-decoration: none;
}
.social-link:hover { background: rgba(255,255,255,.22); color: var(--white); }
.social-link svg { width: 18px; height: 18px; fill: currentColor; }

/* --- SCROLL FADE IN --- */
.fade-in {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .6s ease, transform .6s ease;
}
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== SIDE PLANTS ===== */
.plant-side {
  position: fixed;
  top: 0;
  width: 165px;
  height: 100vh;
  pointer-events: none;
  z-index: 2;
  overflow: visible;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 5%, black 95%, transparent 100%);
  mask-image: linear-gradient(to bottom, transparent 0%, black 5%, black 95%, transparent 100%);
}
.plant-side--l { left: 0; }
.plant-side--r { right: 0; }
.plant-side svg { width: 100%; height: 100%; display: block; overflow: visible; }
@media (max-width: 1150px) { .plant-side { display: none; } }

/* ===== TYPEWRITER SECTION ===== */
.typewriter-section {
  padding: 96px 24px;
  background: var(--white);
  text-align: center;
}
.typewriter-section .section-sub { margin-left: auto; margin-right: auto; }

/* Machine wrapper — cast a deep ground shadow */
.tw-machine {
  max-width: 760px;
  margin: 52px auto 0;
  filter:
    drop-shadow(0 28px 48px rgba(0,0,0,.32))
    drop-shadow(0 8px 16px rgba(0,0,0,.20));
}

/* Platen (roller housing) — cylindrical gradient: dark edges, bright center band */
.tw-platen {
  background: linear-gradient(180deg,
    #122812 0%,
    #1e4820 18%,
    #2d5e30 32%,
    #265028 52%,
    #1a3e1c 72%,
    #122812 100%);
  border-radius: 14px 14px 0 0;
  padding: 14px 40px 0;
  display: flex;
  justify-content: center;
  box-shadow:
    inset 0 3px 6px rgba(255,255,255,.10),
    inset 0 -4px 10px rgba(0,0,0,.45);
}

/* Paper roll channel */
.tw-paper-roll {
  background: linear-gradient(180deg, #3d7040 0%, #2d5e30 50%, #1e4e28 100%);
  border-radius: 8px 8px 0 0;
  padding: 8px 24px 0;
  width: 90%;
  display: flex;
  justify-content: center;
  box-shadow:
    inset 4px 0 8px rgba(0,0,0,.18),
    inset -4px 0 8px rgba(0,0,0,.18),
    inset 0 3px 6px rgba(0,0,0,.25);
}

/* Paper — recessed slot look */
.tw-paper {
  background: #fdfaf3;
  width: 100%;
  min-height: 220px;
  max-height: 220px;
  overflow-y: auto;
  padding: 18px 28px 16px;
  border-radius: 2px 2px 0 0;
  box-shadow:
    inset 0 0 0 1px rgba(0,0,0,.08),
    inset 5px 0 14px rgba(0,0,0,.07),
    inset -5px 0 14px rgba(0,0,0,.07),
    inset 0 8px 18px rgba(0,0,0,.08);
  background-image: repeating-linear-gradient(transparent 0px, transparent 27px, #e2dace 27px, #e2dace 28px);
  background-position: 0 10px;
}
.tw-paper-text {
  font-family: 'Courier Prime', 'Courier New', monospace;
  font-size: .92rem;
  color: #14100a;
  line-height: 28px;
  min-height: 28px;
  text-align: left;
  white-space: pre-wrap;
  word-break: break-word;
}
.tw-cursor {
  display: inline-block;
  color: #14100a;
  font-family: 'Courier Prime', 'Courier New', monospace;
  animation: cursor-blink .75s step-end infinite;
}

@keyframes cursor-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* Machine body — curved-surface gradient + thick bottom ledge */
.tw-body {
  background: linear-gradient(170deg,
    #5a9060 0%,
    #4a7c50 16%,
    #3a6a42 40%,
    #2e5a35 65%,
    #244e2a 85%,
    #1e4224 100%);
  border-radius: 0;
  padding: 20px 32px 36px;
  position: relative;
  box-shadow:
    inset 0 4px 0 rgba(255,255,255,.24),
    inset 8px 0 20px rgba(0,0,0,.12),
    inset -8px 0 20px rgba(0,0,0,.12),
    inset 0 -6px 14px rgba(0,0,0,.22);
}
/* Thick physical base/foot — gives the machine mass */
.tw-body::before {
  content: '';
  position: absolute;
  bottom: -14px;
  left: 6px; right: 6px;
  height: 14px;
  background: linear-gradient(180deg, #1a3e1c 0%, #122812 100%);
  border-radius: 0;
  box-shadow: 0 10px 24px rgba(0,0,0,.40), 0 4px 8px rgba(0,0,0,.25);
}

/* Keyboard — recessed into the body */
.tw-keyboard {
  display: flex;
  flex-direction: column;
  gap: 7px;
  align-items: center;
  background: rgba(0,0,0,.14);
  border-radius: 10px;
  padding: 14px 14px 12px;
  box-shadow:
    inset 0 3px 10px rgba(0,0,0,.30),
    inset 0 1px 3px rgba(0,0,0,.20),
    inset 0 -1px 0 rgba(255,255,255,.07);
}
.tw-row {
  display: flex;
  gap: 5px;
  justify-content: center;
  flex-wrap: nowrap;
}

/* Keys — concave dished face, tall 3D base */
.tw-key {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 42px;
  padding: 0 5px;
  border-radius: 6px;
  /* Radial gradient = concave/dished key cap */
  background: radial-gradient(ellipse at 44% 36%, #fdf6e0 0%, #eee3c2 52%, #d8cfa8 100%);
  color: #1a1209;
  font-family: 'Courier Prime', 'Courier New', monospace;
  font-size: .72rem;
  font-weight: 700;
  cursor: pointer;
  user-select: none;
  border: none;
  outline: none;
  box-shadow:
    0 6px 0 #18120a,           /* tall solid base — the key stem */
    0 7px 12px rgba(0,0,0,.38), /* ambient shadow below stem */
    inset 0 1px 0 rgba(255,255,255,.85), /* top highlight edge */
    inset 0 -2px 3px rgba(0,0,0,.14),   /* bottom inner shadow (concave) */
    inset 3px 0 6px rgba(0,0,0,.06),    /* left concave shadow */
    inset -3px 0 6px rgba(0,0,0,.06);   /* right concave shadow */
  transition: transform .07s ease, box-shadow .07s ease;
}
.tw-key:hover {
  background: radial-gradient(ellipse at 44% 36%, #fff9ea 0%, #f4eacc 52%, #e0d7b0 100%);
}
.tw-key:active,
.tw-key.pressed {
  transform: translateY(5px);
  box-shadow:
    0 1px 0 #18120a,
    0 1px 4px rgba(0,0,0,.22),
    inset 0 1px 0 rgba(255,255,255,.55),
    inset 0 4px 10px rgba(0,0,0,.22);  /* deep inset when bottomed out */
}

.tw-key--wide   { min-width: 72px; }
.tw-key--space  { min-width: 256px; font-size: .63rem; letter-spacing: .12em; }
.tw-key--return { min-width: 100px; font-size: .63rem; letter-spacing: .04em; }

/* Accent key (Return) */
.tw-key--accent {
  background: radial-gradient(ellipse at 44% 36%, #ffffff 0%, #f0f0f0 52%, #e0e0e0 100%);
  color: #1a1209;
  box-shadow:
    0 6px 0 #999999,
    0 7px 12px rgba(0,0,0,.38),
    inset 0 1px 0 rgba(255,255,255,.85),
    inset 0 -2px 3px rgba(0,0,0,.14),
    inset 3px 0 6px rgba(0,0,0,.06),
    inset -3px 0 6px rgba(0,0,0,.06);
}
.tw-key--accent:hover {
  background: radial-gradient(ellipse at 44% 36%, #ffffff 0%, #f8f8f8 52%, #e8e8e8 100%);
}
.tw-key--accent:active,
.tw-key--accent.pressed {
  box-shadow:
    0 1px 0 #888888,
    0 1px 4px rgba(0,0,0,.22),
    inset 0 1px 0 rgba(255,255,255,.55),
    inset 0 4px 10px rgba(0,0,0,.22);
}

/* Typewriter mobile */
@media (max-width: 600px) {
  .tw-key {
    min-width: 27px; height: 34px; font-size: .56rem; padding: 0 2px;
    box-shadow: 0 4px 0 #18120a, 0 5px 8px rgba(0,0,0,.32), inset 0 1px 0 rgba(255,255,255,.8), inset 0 -2px 3px rgba(0,0,0,.12);
  }
  .tw-key:active, .tw-key.pressed {
    transform: translateY(3px);
    box-shadow: 0 1px 0 #18120a, 0 1px 3px rgba(0,0,0,.18), inset 0 1px 0 rgba(255,255,255,.5), inset 0 3px 7px rgba(0,0,0,.18);
  }
  .tw-key--wide   { min-width: 46px; }
  .tw-key--space  { min-width: 150px; }
  .tw-key--return { min-width: 70px; }
  .tw-platen { padding: 10px 16px 0; }
  .tw-paper-roll { padding: 6px 12px 0; width: 96%; }
  .tw-paper { padding: 14px 14px 14px; min-height: 112px; }
  .tw-paper-text { font-size: .8rem; }
  .tw-body { padding: 14px 10px 28px; }
  .tw-keyboard { gap: 5px; padding: 10px 8px 10px; }
  .tw-row { gap: 3px; }
}

