@font-face {
  font-family:"Uncial Antiqua"; src:url("fonts/uncial-antiqua.woff2") format("woff2");
  font-style:normal; font-weight:400; font-display:swap;
}
@font-face {
  font-family:"Tenor Sans"; src:url("fonts/tenor-sans.woff2") format("woff2");
  font-style:normal; font-weight:400; font-display:swap;
}
:root { scroll-behavior:smooth; }
* { box-sizing:border-box; }
body { margin:0; font:15px/1.48 system-ui,sans-serif; }
h1,h2,p { margin:0; }
a { color:inherit; text-decoration:none; }
.shell {
  --canvas:#f3ede0; --surface:#fcf6eb; --ink:#251f1a; --secondary:#61564b;
  --border:#d8cbbb; --accent:#a83218; --accent-ink:#fff6e5; --hero:#12404a; --frame:#e4dfd5;
  --manuscript:"Uncial Antiqua",Georgia,serif;
  color:var(--ink); background:var(--canvas); min-height:100dvh;
}
#theme-night:checked ~ .shell {
  --canvas:#141b20; --surface:#1d262c; --ink:#f5ead6; --secondary:#c6b9a8;
  --border:#354048; --accent:#f8a05f; --accent-ink:#22160f; --hero:#141f2d; --frame:#39434a;
  color-scheme:dark;
}
.sr-only,.state {
  position:absolute; width:1px; height:1px; padding:0; overflow:hidden;
  clip-path:inset(50%); white-space:nowrap; border:0;
}
.limit { width:min(1240px,calc(100% - 100px)); margin-inline:auto; }
.topbar { min-height:70px; display:flex; align-items:center; justify-content:space-between; gap:14px; }
.brand { display:inline-flex; align-items:center; gap:12px; font:400 22px/1.2 var(--manuscript); }
.brand-mark {
  width:25px; height:21px; background:var(--accent); display:inline-block; flex-shrink:0;
  clip-path:polygon(50% 0,58% 24%,65% 12%,82% 37%,94% 41%,100% 100%,0 100%,6% 55%,28% 40%);
}
.top-actions { display:flex; align-items:center; gap:24px; }
.browse { font-weight:650; }
.theme-icon,.control {
  display:grid; place-items:center; width:44px; height:44px; cursor:pointer; touch-action:manipulation;
  border-radius:50%; line-height:1; user-select:none;
}
.theme-icon { border:1px solid var(--border); background:var(--surface); font-size:23px; }
.theme-icon .sun { display:none; }
#theme-night:checked ~ .shell .theme-icon .sun { display:block; }
#theme-night:checked ~ .shell .theme-icon .moon { display:none; }
.hero {
  --scene-anchor:center 28%;
  --fire-position:80% 60%;
  min-height:400px; background-color:var(--hero); color:#fff8e8;
  position:relative; isolation:isolate; overflow:hidden; display:grid; align-items:end;
}
.hero-scene,.hero-fire,.hero-tint,.hero-shade { position:absolute; inset:0; pointer-events:none; }
.hero-scene,.hero-fire { background:url("lemnos-mythic-master.png") var(--scene-anchor)/cover no-repeat; }
.hero-scene { z-index:-5; }
.hero-tint { z-index:-4; opacity:0; background:#425a99; mix-blend-mode:color; }
.hero-fire { z-index:-3; opacity:0; mask-image:radial-gradient(ellipse 24% 52% at var(--fire-position),#000 7%,#000e 26%,#000a 45%,transparent 76%); }
.hero-shade {
  z-index:-1;
  background:linear-gradient(90deg,#1115178c,transparent 70%),linear-gradient(0deg,#16171484,transparent 57%);
}
#theme-night:checked ~ .shell .hero-scene { filter:brightness(.43) contrast(1.10) saturate(.53); }
#theme-night:checked ~ .shell .hero-tint { opacity:.54; }
#theme-night:checked ~ .shell .hero-fire { opacity:1; filter:brightness(.88) saturate(1.20); }
#theme-night:checked ~ .shell .hero-shade { background:linear-gradient(90deg,#08102062,transparent 67%),linear-gradient(0deg,#11182473,transparent 48%); }
.hero-moon {
  display:none; z-index:-2; position:absolute; top:15%; left:44%; width:31px; height:33px;
  border-radius:50%; box-shadow:6px 5px 0 0 #fff0c2,10px 10px 25px #ffedb965;
  transform:rotate(24deg);
}
#theme-night:checked ~ .shell .hero-moon { display:block; }
.hero-content { padding-bottom:38px; }

.hero-content p {
  color:#ffe6be; font-size:12px; letter-spacing:.16em; text-transform:uppercase; font-weight:670;
}
.hero h1 {
  font:400 clamp(39px,5.7vw,79px)/1.08 var(--manuscript);
  margin:.12em 0 0; text-shadow:0 3px 12px #0008;
}
.gallery { padding:26px 0 30px; }
.deck { position:relative; display:grid; grid-template-columns:minmax(0,1fr); }
.slide { grid-area:1/1; min-width:0; visibility:hidden; opacity:0; pointer-events:none; }
.app-heading { min-height:51px; display:flex; align-items:center; justify-content:space-between; gap:15px; }
.app-heading h2 {
  font:400 clamp(26px,3.1vw,44px)/1.15 "Tenor Sans",Optima,system-ui,sans-serif;
  letter-spacing:-.035em;
}
.carousel-actions { display:flex; align-items:center; justify-content:end; gap:7px; }
.control { border:1px solid var(--border); background:var(--surface); font-size:20px; }
.control:hover,.theme-icon:hover { box-shadow:inset 0 0 0 1px var(--accent); }
.control.play,.control.pause { font-size:15px; }
.control.pause { display:none; }
.stage {
  display:grid; grid-template-columns:1fr 1.72fr 1fr; align-items:center;
  gap:20px; padding:19px 11px 37px; perspective:1250px;
}
.cover { position:relative; display:block; min-width:0; border-radius:8px; }
.cover.active { z-index:1; }
.cover.neighbor { cursor:pointer; }
.cover.neighbor span {
  position:absolute; inset:auto 0 -24px; text-align:center; color:var(--secondary); font-size:12px; font-weight:650;
}
.screen {
  display:block; width:100%; aspect-ratio:1216/778; object-fit:cover;
  border:1px solid var(--frame); border-radius:8px; background:var(--surface); box-shadow:0 14px 28px #10121b25;
}
.neighbor .screen { filter:saturate(.65) brightness(.92); }
.neighbor.left { transform:rotateY(29deg) scale(.91); transform-origin:right center; }
.neighbor.right { transform:rotateY(-29deg) scale(.91); transform-origin:left center; }
.reflection {
  position:absolute; inset:calc(100% + 5px) 0 auto; height:40px; overflow:hidden;
  pointer-events:none; mask-image:linear-gradient(0deg,transparent,#000 94%);
}
.reflection img { display:block; width:100%; transform:scaleY(-1); opacity:.28; filter:blur(1px); }
#theme-night:checked ~ .shell .reflection img { opacity:.36; }
.dots { display:flex; flex-wrap:wrap; justify-content:center; margin-bottom:12px; }
.dot { display:grid; place-items:center; min-width:40px; height:35px; cursor:pointer; }
.dot::before { content:""; width:15px; height:3px; background:var(--border); border-radius:99px; }
.dot.selected::before { width:24px; background:var(--accent); }
.detail {
  display:grid; grid-template-columns:1fr auto; align-items:center; gap:16px;
  padding:18px 22px; border:1px solid var(--border); border-radius:12px; background:var(--surface);
}
.detail p { color:var(--secondary); }
.links { display:flex; flex-wrap:wrap; align-items:center; justify-content:flex-end; gap:8px; }
.links a {
  display:inline-flex; align-items:center; justify-content:center; gap:6px; min-height:45px; padding:8px 14px;
  border:1px solid var(--border); border-radius:8px; font-weight:660;
}
.links a:hover { text-decoration:underline; }
.links .primary { color:var(--accent-ink); background:var(--accent); border-color:var(--accent); }
.links-anchor { position:absolute; bottom:0; left:0; }
.bottom-nav { display:none; }
#app-rigpa:checked ~ .shell .slide-rigpa,
#app-packers:checked ~ .shell .slide-packers,
#app-salon:checked ~ .shell .slide-salon,
#app-tuition:checked ~ .shell .slide-tuition,
#app-garden:checked ~ .shell .slide-garden,
#app-crm:checked ~ .shell .slide-crm,
#app-portfolio:checked ~ .shell .slide-portfolio {
  opacity:1; visibility:visible; pointer-events:auto;
}
#theme-night:focus-visible ~ .shell label[for="theme-night"],
#app-auto:focus-visible ~ .shell label[for="app-auto"],
#app-rigpa:focus-visible ~ .shell label[for="app-rigpa"],
#app-packers:focus-visible ~ .shell label[for="app-packers"],
#app-salon:focus-visible ~ .shell label[for="app-salon"],
#app-tuition:focus-visible ~ .shell label[for="app-tuition"],
#app-garden:focus-visible ~ .shell label[for="app-garden"],
#app-crm:focus-visible ~ .shell label[for="app-crm"],
#app-portfolio:focus-visible ~ .shell label[for="app-portfolio"],
a:focus-visible { outline:2px solid var(--accent); outline-offset:3px; }
#app-auto:checked ~ .shell .slide-rigpa { opacity:1; visibility:visible; pointer-events:auto; }
@media (prefers-reduced-motion:no-preference) {
  #app-auto:checked ~ .shell .slide { animation:cycle 43.75s steps(1, end) var(--phase) infinite; }
  #app-auto:checked ~ .shell .slide .active { animation:arrive 43.75s var(--phase) infinite; }
  #app-auto:checked ~ .shell .pause { display:grid; }
  #app-auto:checked ~ .shell .play { display:none; }
  @media (hover:hover) {
    #app-auto:checked ~ .shell .deck:hover .slide,
    #app-auto:checked ~ .shell .deck:hover .active { animation-play-state:paused; }
  }
  #app-auto:checked ~ .shell .deck:focus-within .slide,
  #app-auto:checked ~ .shell .deck:focus-within .active { animation-play-state:paused; }
  @keyframes cycle {
    0% { opacity:1; visibility:visible; pointer-events:auto; }
    14.285714%,100% { opacity:0; visibility:hidden; pointer-events:none; }
  }
  @keyframes arrive {
    0% { opacity:.45; transform:translateX(16%) rotateY(-24deg) scale(.91); }
    1%,100% { opacity:1; transform:none; }
  }
}
.slide-rigpa { --phase:0s; }
.slide-packers { --phase:-37.5s; }
.slide-salon { --phase:-31.25s; }
.slide-tuition { --phase:-25s; }
.slide-garden { --phase:-18.75s; }
.slide-crm { --phase:-12.50s; }
.slide-portfolio { --phase:-6.25s; }
@media (prefers-reduced-motion:reduce) {
  :root { scroll-behavior:auto; }
  .control.play { display:none; }
}
@media (max-width:850px) {
  .detail { grid-template-columns:1fr; }
  .links { justify-content:flex-start; }
}
@media (max-width:620px) {
  .shell { padding-bottom:calc(78px + env(safe-area-inset-bottom)); }
  .limit { width:calc(100% - 36px); }
  .topbar { min-height:67px; padding-top:env(safe-area-inset-top); }
  .brand { font-size:clamp(17px,4.9vw,22px); gap:8px; }
  .brand-mark { width:21px; height:17px; }
  .browse { display:none; }
  .hero { min-height:247px; --scene-anchor:82% center; --fire-position:80% 48%; }
  .hero-moon { left:23%; top:10%; width:16px; height:18px; box-shadow:4px 2px 0 #fff0c2,6px 8px 18px #ffedb965; }
  .hero-content { padding-bottom:19px; }
  .hero h1 { max-width:304px; font-size:clamp(35px,10vw,46px); }
  .hero-content p { font-size:10px; }
  .gallery { padding-top:16px; padding-bottom:18px; }
  .app-heading { min-height:55px; gap:7px; }
  .app-heading h2 { font-size:clamp(21px,6vw,29px); max-width:10em; }
  .carousel-actions { gap:4px; }
  .control { width:44px; height:44px; }
  .stage {
    margin-inline:-18px; grid-template-columns:30px minmax(0,1fr) 30px; gap:10px;
    padding:14px 0 22px; overflow:hidden;
  }
  .neighbor { width:152px; }
  .neighbor.left { justify-self:end; }
  .neighbor.right { justify-self:start; }
  .cover.neighbor span { display:none; }
  .reflection { height:23px; top:calc(100% + 4px); }
  .dots { margin-bottom:6px; }
  .dot { min-width:44px; height:44px; }
  .detail { padding:14px; gap:10px; }
  .detail p { font-size:14px; }
  .links { display:grid; grid-template-columns:1fr 1fr; gap:7px; }
  .links:has(a:nth-child(4)):not(:has(a:nth-child(5))) { grid-template-columns:repeat(3,minmax(0,1fr)); }
  .links a { min-height:52px; padding:6px; text-align:center; font-size:14px; }
  .links .primary { grid-column:1/-1; min-height:55px; }
  .bottom-nav {
    position:fixed; inset:auto 0 0; z-index:5; display:grid; grid-template-columns:repeat(3,1fr);
    padding:5px max(8px,env(safe-area-inset-right)) calc(6px + env(safe-area-inset-bottom)) max(8px,env(safe-area-inset-left));
    border-top:1px solid var(--border); background:var(--surface);
  }
  .bottom-nav a {
    min-width:0; min-height:52px; display:grid; place-content:center; justify-items:center;
    gap:1px; text-align:center; font-size:12px; font-weight:650; line-height:1.15;
  }
  .nav-icon { display:grid; place-items:center; width:59px; height:27px; font-size:23px; font-weight:400; }
  .nav-icon.launch { font-size:19px; }
  .nav-apps .nav-icon { border-radius:99px; background:color-mix(in srgb,var(--accent) 14%,transparent); color:var(--accent); }
  @supports (-webkit-touch-callout:none) {
    .bottom-nav { background:color-mix(in srgb,var(--surface) 84%,transparent); backdrop-filter:blur(20px); }
    .bottom-nav a { font-size:11px; font-weight:550; }
    .nav-apps { color:var(--accent); }
    .nav-apps .nav-icon { background:none; }
  }
}
