:root {
  --color-background: #fff;
  --color-text: #111;
  --color-muted: #6e6e6e;
  --color-border: #eaeaea;
  --content-width: 960px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--color-text);
  background: var(--color-background);
  font-family: system-ui, -apple-system, Inter, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  line-height: 1.7;
}
a { color: inherit; text-decoration: none; }
a:focus-visible, button:focus-visible { outline: 3px solid #4b6a8a; outline-offset: 5px; }
section[id] { scroll-margin-top: 100px; }
.skip-link { position: fixed; top: 8px; left: 8px; z-index: 1100; padding: 10px 16px; background: #111; color: #fff; transform: translateY(-150%); }
.skip-link:focus { transform: translateY(0); }

/* Branding appears once while the large artwork is on screen. */
.site-header { position: fixed; inset: 0 0 auto; height: 80px; z-index: 1000; backdrop-filter: saturate(180%) blur(6px); background: rgba(255,255,255,.9); border-bottom: 1px solid var(--color-border); }
.site-header__inner { max-width: var(--content-width); margin: 0 auto; height: 100%; display: flex; align-items: center; justify-content: space-between; padding: 0 20px; }
.site-brand { display: flex; align-items: center; font-weight: 700; letter-spacing: .3px; }
.site-brand__mark { display: block; width: 0; height: 32px; margin-right: 0; opacity: 0; transition: width .2s ease, margin-right .2s ease, opacity .2s ease; }
.site-header.is-brand-visible .site-brand__mark { width: 32px; margin-right: 10px; opacity: 1; }
.site-nav { display: flex; gap: 24px; }
.site-nav a { font-size: 15px; }
.site-nav a:hover { opacity: .7; }

/* One opening screen contains both the artwork and existing brand copy. */
.brand-hero { min-height: 100vh; min-height: 100svh; padding: 120px 20px 64px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 28px; text-align: center; background: radial-gradient(ellipse at 50% 40%, #fafafa, #fff 70%); }
.brand-hero__artwork { position: relative; display: grid; place-items: center; isolation: isolate; }
.brand-glow { position: absolute; width: 380px; height: 340px; border-radius: 50%; background: radial-gradient(ellipse, rgba(147,163,159,.3), transparent 72%); filter: blur(20px); animation: pulse 6s ease-in-out infinite alternate; pointer-events: none; }
.brand-artwork { position: relative; width: 300px; height: 300px; background: url('../images/stannum-logo.png') center / contain no-repeat; animation: float 4.8s ease-in-out infinite alternate; }
/* Slow translucent mist sits behind the drawing, with occasional small glints. */
.brand-glow::before, .brand-glow::after {
  content: "";
  position: absolute;
  inset: 5% 12% 18% -4%;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(128, 151, 148, .55), transparent 74%);
  animation: mist-drift 10s ease-in-out infinite alternate;
}
.brand-glow::after {
  inset: 24% -4% 2% 30%;
  background: radial-gradient(ellipse, rgba(176, 161, 133, .4), transparent 74%);
  animation-duration: 13s;
  animation-delay: -7s;
  animation-direction: alternate-reverse;
}
.brand-sparkles { position: absolute; inset: 0; pointer-events: none; }
.brand-sparkle {
  position: absolute;
  width: 22px;
  height: 22px;
  left: 1%;
  top: 23%;
  opacity: 0;
  background: #7e9993;
  clip-path: polygon(50% 0, 60% 40%, 100% 50%, 60% 60%, 50% 100%, 40% 60%, 0 50%, 40% 40%);
  animation: gentle-glint 6s ease-in-out infinite;
}
.brand-sparkle:nth-child(2) { left: 92%; top: 40%; width: 18px; height: 18px; background: #a89a74; animation-delay: -2s; }
.brand-sparkle:nth-child(3) { left: 72%; top: 2%; width: 15px; height: 15px; animation-delay: -4s; }
.brand-hero__copy { max-width: 640px; }
.hero-title { font-size: clamp(28px, 4vw, 44px); font-weight: 800; line-height: 1.2; margin: 0 0 16px; letter-spacing: -.02em; }
.hero-description { color: var(--color-muted); font-size: 18px; margin: 0; }

/* Released apps share a repeatable layout, independent of their count. */
.apps-section { max-width: var(--content-width); margin: 0 auto; padding: 96px 20px 120px; }
.section-inner { max-width: 920px; margin: 0 auto; }
.section-title { margin: 0 0 32px; font-size: 28px; font-weight: 700; line-height: 1.3; text-align: left; }
.app-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; }
.app-card { min-width: 0; display: flex; flex-direction: column; border: 1px solid var(--color-border); border-radius: 24px; overflow: hidden; transition: opacity .6s ease, transform .6s ease; }
.app-artwork { display: grid; place-items: center; background: #f7f7f8; padding: 44px 24px; }
.app-icon { width: 128px; height: 128px; border-radius: 28px; object-fit: contain; background: #fff; box-shadow: 0 12px 28px rgba(0,0,0,.07); transition: transform .25s ease; }
.app-card:hover .app-icon { transform: translateY(-4px); }
.app-content { padding: 28px; display: flex; flex-direction: column; flex: 1; text-align: left; }
.badges { display: flex; flex-wrap: wrap; gap: 8px; }
.badge { font-size: 11px; font-weight: 600; padding: 4px 10px; border-radius: 6px; background: #f5f5f7; color: #66666c; }
.app-title { font-size: 28px; font-weight: 800; line-height: 1.25; margin: 16px 0 12px; letter-spacing: -.5px; }
.app-card .app-title { margin: 0 0 24px; }
.app-description { font-size: 16px; color: var(--color-muted); line-height: 1.6; margin: 0 0 24px; }
.app-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: auto; }
.button { display: inline-flex; justify-content: center; align-items: center; padding: 10px 16px; background: #111; color: #fff; border: 1px solid #111; border-radius: 999px; font-size: 13px; font-weight: 600; transition: background .2s ease; }
.button:hover { background: #333; }
.button--secondary { color: #111; background: #fff; border-color: #d0d0d0; }
.button--secondary:hover { background: #f7f7f7; }
.upcoming-app { display: flex; align-items: center; gap: 24px; margin-top: 28px; padding: 28px; border: 1px dashed #d5d5d5; border-radius: 20px; transition: opacity .6s ease, transform .6s ease; }
.upcoming-app .app-content { padding: 0; }
.upcoming-app .app-title { font-size: 22px; margin: 10px 0 8px; }
.upcoming-app .app-description { margin: 0; font-size: 15px; }
.is-reveal-pending { opacity: 0; transform: translateY(20px); }

[hidden] { display: none !important; }
.about { padding: 108px 20px; border-top: 1px solid var(--color-border); }
.about__inner { max-width: 920px; margin: 0 auto; }
.about__content {
  position: relative;
  isolation: isolate;
  padding: 52px 56px;
  border: 1px solid #ece7de;
  border-radius: 28px;
  background: radial-gradient(ellipse at 100% 0%, #f1e3d3, transparent 60%), #f6f4ef;
  color: #292b29;
  font-size: clamp(21px, 2.5vw, 27px);
  line-height: 1.65;
  letter-spacing: -.025em;
}
.about__content p { max-width: 760px; margin: 0 0 32px; }
.about__content p + p { max-width: 650px; font-size: clamp(18px, 2vw, 22px); line-height: 1.75; color: #60615c; letter-spacing: -.01em; }
.about__content p:last-child { margin-bottom: 0; }
.about__warmth { position: relative; display: inline-block; white-space: nowrap; color: var(--color-text); }
.about__underline { position: absolute; left: -2%; bottom: -5px; width: 104%; height: 12px; overflow: visible; pointer-events: none; }
.about__underline path { fill: none; stroke: #af8050; stroke-width: 3; stroke-linecap: round; }
.about.is-underline-pending .about__underline path { stroke-dasharray: 220; stroke-dashoffset: 220; }
.about.is-underline-drawn .about__underline path { animation: draw-underline 1.3s ease-out both; }
@keyframes draw-underline { from { stroke-dasharray: 220; stroke-dashoffset: 220; } to { stroke-dasharray: 220; stroke-dashoffset: 0; } }
.contact { padding: 108px 20px; border-top: 1px solid var(--color-border); }
.contact-links { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; max-width: 600px; margin: 0 auto; }
.contact-link { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 24px; border: 1px solid var(--color-border); border-radius: 16px; font: inherit; color: inherit; background: #fff; cursor: pointer; transition: background .2s ease, transform .2s ease; }
.contact-link:hover { background: #f7f7f7; transform: translateY(-2px); }
.contact-icon { width: 32px; height: 32px; object-fit: contain; }
.contact-status { min-height: 1.7em; margin: 8px 0 0; color: var(--color-muted); text-align: center; }
footer { padding: 40px 20px; text-align: center; border-top: 1px solid var(--color-border); color: var(--color-muted); font-size: 14px; }
@keyframes float { from { transform: translateY(0); } to { transform: translateY(-20px); } }
@keyframes pulse { from { opacity: .5; } to { opacity: 1; } }
@keyframes mist-drift {
  from { transform: translate(-35px, 16px) scale(.9); }
  to { transform: translate(35px, -20px) scale(1.15); }
}
@keyframes gentle-glint {
  0%, 5%, 65%, 100% { opacity: 0; transform: translateY(6px) scale(.55) rotate(-12deg); }
  28% { opacity: .95; transform: translateY(0) scale(1) rotate(0deg); }
  42% { opacity: .7; transform: translateY(-3px) scale(.8) rotate(8deg); }
}
@media (max-width: 640px) {
  .site-nav { gap: 16px; }
  .brand-hero { padding: 112px 20px 48px; gap: 24px; }
  .brand-artwork { width: min(300px, 80vw); height: min(300px, 80vw); }
  .brand-glow { width: 310px; max-width: 88vw; height: 280px; }
  .hero-description { font-size: 16px; }
  .apps-section { padding-top: 64px; padding-bottom: 72px; }
  .app-grid { grid-template-columns: 1fr; gap: 24px; }
  .app-artwork { padding: 32px 24px; }
  .app-content { padding: 24px; }
  .upcoming-app { gap: 16px; padding: 24px; align-items: flex-start; }
  .about, .contact { padding: 72px 20px; }
  .about__content { padding: 28px 24px; border-radius: 22px; }
  .about__content p { margin-bottom: 24px; }
  .contact-links { gap: 12px; }
  .contact-link { padding: 20px 8px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .is-reveal-pending { opacity: 1; transform: none; }
}

/* Product and studio context remains readable alongside the brand artwork. */
.section-description { margin: -16px 0 32px; color: var(--color-muted); font-size: 16px; }
.app-card .app-title { margin-bottom: 12px; }
.studio-intro { max-width: 760px; margin-bottom: 32px; font-size: 18px; }
.studio-intro p { margin: 0; }
.contact-email { margin: 24px 0 0; text-align: center; font-size: 15px; color: var(--color-muted); }
.contact-email a { text-decoration: none; }

/* Verifiable studio facts sit apart from the founder’s creative statement. */
.studio-intro p + p { margin-top: 16px; }
.studio-facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; margin: 0 0 32px; padding: 24px 0; border-top: 1px solid var(--color-border); border-bottom: 1px solid var(--color-border); }
.studio-facts dt { color: var(--color-muted); font-size: 13px; }
.studio-facts dd { margin: 4px 0 0; font-size: 17px; font-weight: 600; }
.studio-progress { max-width: 760px; margin-bottom: 40px; }
.studio-progress h3 { margin: 0 0 12px; font-size: 20px; }
.studio-progress p { margin: 0; }
.studio-progress .studio-progress__date { margin-top: 8px; font-size: 13px; color: var(--color-muted); }
@media (max-width: 640px) {
  .studio-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 16px; }
  .studio-intro { font-size: 16px; }
}

.upcoming-app .app-actions { margin-top: 20px; }

/* MewCanvas uses supplied studio artwork while its app icon is in progress. */
.upcoming-app__image { display: block; flex: 0 0 128px; border-radius: 28px; }
.upcoming-app__image .app-icon { display: block; }
@media (max-width: 640px) {
  .upcoming-app { flex-direction: column; }
  .upcoming-app__image { flex-basis: auto; }
}
