/* Overrides for the existing S3 export. Original shared styles remain intact. */
:root {
  --background: #f7f8fa;
  --foreground: #20252a;
  --card: #ffffff;
  --primary: #20252a;
  --primary-foreground: #ffffff;
  --muted-foreground: #58636d;
  --border: #d8dde2;
  --accent: #3c6957;
  --ring: #3c6957;
  --grid-line: #20252a0a;
  --horizon-glow: #7f97b03d;
  --horizon-edge: #aebecb;
}
.dark {
  --background: #101317;
  --foreground: #edf0f4;
  --card: #181d23;
  --primary: #edf0f4;
  --primary-foreground: #171b20;
  --muted-foreground: #a3adb8;
  --border: #303840;
  --accent: #a8c7b4;
  --ring: #a8c7b4;
  --grid-line: #d8e5f00a;
  --horizon-glow: #b9d0ed38;
  --horizon-edge: #cfdfec;
}
body { -webkit-font-smoothing: antialiased; }
[hidden] { display: none !important; }
:where(a, button, input, select, textarea):focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: 5px;
}
section, main { scroll-margin-top: 28px; }
.skip-link {
  position: fixed;
  top: 12px;
  left: 16px;
  padding: 12px 20px;
  background: var(--primary);
  color: var(--primary-foreground);
  z-index: 30;
  transform: translateY(-160%);
}
.skip-link:focus { transform: translateY(0); }
.section-shell, .site-header, .site-footer { width: min(1160px, calc(100% - 64px)); }
.site-header { height: 88px; gap: 28px; }
.brand { min-height: 44px; font-weight: 600; }
.brand-mark { width: 34px; height: 34px; font-size: 11px; }
.brand-dot { color: var(--accent); }
.nav-links { gap: 28px; margin-left: auto; }
.nav-links a { min-height: 44px; display: flex; align-items: center; }
.header-actions { display: flex; align-items: center; gap: 8px; }
.theme-toggle {
  position: static;
  border: 0;
  border-radius: 6px;
  padding: 0 8px;
  min-height: 44px;
  background: transparent;
  box-shadow: none;
  font-size: 12px;
  font-weight: 400;
  color: var(--muted-foreground);
}
.theme-toggle svg { color: currentColor; width: 17px; height: 17px; }
.theme-toggle .lucide-sun, .dark .theme-toggle .lucide-moon { display: none; }
.dark .theme-toggle .lucide-sun { display: block; }
.menu-button { min-width: 44px; min-height: 44px; cursor: pointer; }
.hero {
  position: relative;
  isolation: isolate;
  display: block;
  width: 100%;
  min-height: 0;
  padding: 94px 0 170px;
  overflow: hidden;
  text-align: center;
}
.hero-grid {
  position: absolute;
  z-index: -2;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(to right, var(--grid-line) 1px, transparent 1px), linear-gradient(to bottom, var(--grid-line) 1px, transparent 1px);
  background-size: 80px 80px;
  mask-image: radial-gradient(ellipse 65% 85% at 50% 12%, black 12%, transparent 90%);
}
.hero-horizon {
  position: absolute;
  z-index: -1;
  pointer-events: none;
  left: 50%;
  top: calc(100% - 74px);
  width: max(145%, 800px);
  height: 540px;
  transform: translateX(-50%);
  border-radius: 50%;
  border-top: 1px solid var(--horizon-edge);
  background: var(--background);
  box-shadow: 0 -2px 5px var(--horizon-glow), 0 -22px 62px var(--horizon-glow), 0 -48px 120px var(--horizon-glow);
}
.hero-copy { max-width: 1160px; position: relative; }
.eyebrow { text-transform: none; letter-spacing: .02em; font-size: 12px; font-weight: 500; }
.hero .eyebrow { justify-content: center; margin-bottom: 30px; color: var(--accent); font-size: 13px; }
.hero h1 {
  max-width: 1120px;
  margin: 0 auto 28px;
  font-size: clamp(44px, 5.7vw, 82px);
  font-weight: 500;
  letter-spacing: -.061em;
  line-height: 1.055;
  text-wrap: balance;
}
.hero h1 span { display: block; }
.hero-subtitle {
  max-width: 630px;
  margin: 0 auto 30px;
  color: var(--muted-foreground);
  font-size: 16px;
  line-height: 1.75;
  text-wrap: pretty;
}
.hero-actions { justify-content: center; gap: 12px; }
.button { min-height: 48px; border-radius: 6px; padding-inline: 22px; font-weight: 500; font-size: 13px; }
.button-secondary { border-color: var(--border); background: var(--background); color: var(--foreground); }
.button-secondary:hover { border-color: var(--muted-foreground); }
.hero-socials { display: flex; flex-wrap: wrap; justify-content: center; gap: 22px; margin-top: 23px; }
.hero-socials a { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; color: var(--muted-foreground); font-size: 12px; }
.hero-socials svg { width: 16px; height: 16px; }
.hero-socials a:hover { color: var(--foreground); }
.work { border-top: 0; padding-block: 28px 88px; }
.section-heading { align-items: start; gap: 24px; margin-bottom: 32px; }
.section-heading .eyebrow { margin-bottom: 12px; }
h2 { font-weight: 500; font-size: clamp(32px, 4vw, 46px); line-height: 1.1; letter-spacing: -.045em; }
.project-visual { min-height: 380px; border-radius: 8px; }
.project-info { padding-top: 22px; }
.project-type { text-transform: none; letter-spacing: .015em; font-size: 12px; }
.project-info h3 { font-size: 24px; font-weight: 500; }
.visit-link { font-weight: 500; }
.services, .contact { padding-block: 80px; }
.services .section-heading { flex-direction: column; gap: 0; }
.service-grid { gap: 36px; }
.service-card { border: 0; border-radius: 0; min-height: 205px; background: none; padding: 8px 0 0; }
.card-top { margin-bottom: 28px; }
.card-top svg { color: var(--accent); }
.card-top span { display: none; }
.service-card h3 { margin-top: 0; font-size: 22px; font-weight: 500; line-height: 1.2; }
.service-card p { font-size: 14px; line-height: 1.75; max-width: 300px; }
.contact { gap: 90px; }
.contact-intro h2 { font-size: clamp(38px, 4.4vw, 58px); }
.contact-intro > p:last-of-type { max-width: 360px; line-height: 1.75; }
.socials { column-gap: 20px; row-gap: 2px; margin-top: 24px; }
.socials a, .socials button { padding: 0; min-height: 44px; border: 0; color: var(--muted-foreground); }
.socials a:hover, .socials button:hover { color: var(--foreground); }
.socials svg { color: currentColor; }
.contact-form { align-self: start; gap: 22px; min-width: 0; }
.about { display: grid; grid-template-columns: 1fr 1.5fr; gap: 48px; padding-block: 72px; border-top: 1px solid var(--border); }
.about-copy { max-width: 660px; color: var(--muted-foreground); font-size: 15px; line-height: 1.8; }
.about-copy p { margin: 0; }
.about-copy p + p { margin-top: 20px; }
.about-copy p:first-child { color: var(--foreground); font-size: 18px; }
.about-copy p:last-child { color: var(--accent); }
.contact-form select { width: 100%; min-width: 0; min-height: 48px; margin-top: 8px; padding: 12px 4px; background: var(--background); color: var(--foreground); border: 0; border-bottom: 1px solid var(--muted-foreground); border-radius: 0; font: inherit; font-size: 16px; }
.contact-form input, .contact-form textarea { width: 100%; min-width: 0; min-height: 48px; }
.contact-form textarea { resize: vertical; }
.form-submit:disabled { cursor: not-allowed; opacity: .65; }
.contact-form [aria-invalid="true"] { outline: 2px solid var(--ring); outline-offset: 4px; }
#contact-status:focus { outline: 2px solid var(--ring); outline-offset: 5px; }
.copy-status { margin-top: 8px; }
.contact-form label { font-size: 13px; text-transform: none; letter-spacing: 0; font-weight: 400; }
.contact-form input, .contact-form textarea { font-size: 16px; padding-block: 12px; border-bottom-color: var(--muted-foreground); }
.contact-form input::placeholder, .contact-form textarea::placeholder { opacity: 1; }
.contact-form input:focus-visible, .contact-form textarea:focus-visible { outline: 2px solid var(--ring); outline-offset: 4px; }
.form-note, .form-status { margin: -6px 0 0; font-size: 12px; color: var(--muted-foreground); line-height: 1.7; overflow-wrap: anywhere; }
.form-note a { text-decoration: underline; text-underline-offset: 3px; }
.form-status:empty { display: none; }
.site-footer { border-top: 1px solid var(--border); align-items: center; font-size: 12px; }
.site-footer a { min-height: 44px; display: inline-flex; align-items: center; }
@media (prefers-reduced-motion: no-preference) {
  .hero-copy { animation: hero-enter 600ms ease-out both; }
  .button { transition: border-color 160ms ease, opacity 160ms ease; }
}
@keyframes hero-enter { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
@media (max-width: 1000px) {
  .hero { padding-top: 76px; padding-bottom: 140px; }
  .hero h1 span { display: inline; }
  .hero h1 { max-width: 800px; }
  .contact { gap: 44px; }
}
@media (max-width: 700px) {
  .about { grid-template-columns: minmax(0, 1fr); gap: 24px; padding-block: 58px; }
  .section-shell, .site-header, .site-footer { width: calc(100% - 40px); }
  .site-header { height: auto; min-height: 76px; flex-wrap: wrap; gap: 0; padding-block: 12px; }
  .brand { gap: 8px; font-size: 13px; }
  .brand-mark { width: 30px; height: 30px; font-size: 10px; }
  .header-actions { margin-left: auto; gap: 0; }
  .theme-toggle { padding-inline: 10px; }
  .theme-toggle span { display: none; }
  .nav-links { position: static; width: 100%; display: flex; flex-direction: row; flex-wrap: wrap; border: 0; gap: 0 20px; background: var(--background); box-shadow: none; order: 3; }
  .nav-links a { border: 0; padding: 6px 0; }
  .js-navigation .nav-links { display: none; position: absolute; top: 100%; left: 0; right: 0; padding: 12px 20px; border: 1px solid var(--border); border-radius: 6px; box-shadow: 0 16px 28px #00000018; flex-direction: column; gap: 2px; }
  .js-navigation .nav-links.is-open { display: flex; }
  .hero { display: block; padding: 52px 0 115px; }
  .hero .eyebrow { font-size: 11px; margin-bottom: 25px; }
  .hero h1 { font-size: clamp(39px, 8.6vw, 59px); line-height: 1.075; letter-spacing: -.055em; margin-bottom: 24px; }
  .hero-subtitle { font-size: 15px; line-height: 1.75; max-width: 440px; margin-bottom: 25px; }
  .hero-socials { column-gap: 22px; margin-top: 18px; }
  .hero-horizon { top: calc(100% - 40px); height: 340px; width: 900px; }
  .hero-grid { background-size: 56px 56px; }
  .work { padding-block: 24px 58px; }
  .section-heading { margin-bottom: 25px; }
  .project-visual { min-height: 260px; }
  .project-badge { top: 20px; left: 20px; width: 34px; height: 34px; font-size: 20px; }
  .project-arrow { width: 40px; height: 40px; right: 20px; bottom: 20px; }
  .project-info { flex-direction: row; align-items: end; gap: 14px; }
  .project-info h3 { font-size: 20px; }
  .visit-link { font-size: 11px; }
  .services, .contact { padding-block: 58px; }
  .service-grid { gap: 28px; }
  .service-card { min-height: 0; padding-bottom: 28px; border-bottom: 1px solid var(--border); }
  .service-card:last-child { border-bottom: 0; padding-bottom: 0; }
  .card-top { margin-bottom: 16px; }
  .service-card h3, .service-card p { max-width: 440px; }
  .contact { gap: 38px; }
  .site-footer { align-items: start; gap: 5px; padding: 24px 0; }
  .site-footer span:nth-child(2) { display: block; }
}
@media (max-width: 359px) {
  .section-shell, .site-header, .site-footer { width: calc(100% - 32px); }
  .hero { padding-top: 42px; }
  .hero h1 { font-size: 37px; }
  .hero-actions { gap: 10px; }
  .hero-actions .button { padding-inline: 15px; font-size: 12px; }
  .project-info { flex-direction: column; align-items: start; }
}
.project-list { display: grid; gap: 48px; }
.project-list .project-card { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; align-items: center; }
.project-list .project-visual, .revolt-visual { min-height: 360px; border-radius: 8px; }
.project-list .project-info { display: flex; flex-direction: column; align-items: start; gap: 18px; padding: 0; min-width: 0; }
.project-description { margin: 0; max-width: 490px; color: var(--muted-foreground); font-size: 15px; line-height: 1.75; }
.project-tags { display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 0; list-style: none; }
.project-tags li { padding: 5px 9px; border: 1px solid var(--border); border-radius: 4px; color: var(--muted-foreground); font-size: 11px; line-height: 1.5; }
.project-scope { padding-left: 18px; margin: 0; color: var(--muted-foreground); font-size: 13px; line-height: 1.75; }
.project-scope li + li { margin-top: 4px; }
.project-mika .visit-link { display: inline-flex; align-items: center; min-height: 44px; }
.revolt-visual { display: flex; flex-direction: column; justify-content: space-between; align-self: stretch; gap: 28px; padding: 28px; background: var(--card); border: 1px solid var(--border); }
.revolt-kicker { margin: 0; color: var(--muted-foreground); font-size: 12px; }
.revolt-wordmark { margin: 0; color: var(--foreground); font-size: clamp(48px, 6vw, 76px); font-weight: 500; line-height: .95; letter-spacing: -.06em; }
.revolt-wordmark span { display: block; color: var(--accent); }
.revolt-architecture { display: grid; grid-template-columns: 1fr 1fr 1.2fr; gap: 12px; margin: 0; padding: 20px 0 0; border-top: 1px solid var(--border); list-style: none; }
.revolt-architecture span { display: block; margin-bottom: 6px; color: var(--muted-foreground); font-size: 10px; }
.revolt-architecture strong { display: block; color: var(--foreground); font-size: 12px; font-weight: 500; line-height: 1.5; }
/* Content is visible by default. Only a delivered observer callback starts
   a finite animation, so a missing or failed script cannot hide sections. */
@media (prefers-reduced-motion: no-preference) {
  .is-revealing { animation: section-reveal 480ms cubic-bezier(.2, .65, .3, 1); }
  .is-revealing:focus-within { animation: none; }
}
@keyframes section-reveal {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}
@media (max-width: 900px) {
  .project-list .project-card { gap: 28px; }
  .revolt-visual { padding: 24px; }
  .revolt-architecture { grid-template-columns: 1fr; gap: 10px; }
  .revolt-architecture li { display: flex; justify-content: space-between; gap: 12px; }
  .revolt-architecture span { margin: 0; }
}
@media (max-width: 700px) {
  .project-list { gap: 44px; }
  .project-list .project-card { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .project-list .project-visual { min-height: 260px; }
  .revolt-visual { min-height: 330px; }
  .project-list .project-info { gap: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1; transform: none; }
  *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
}
