:root {
  color-scheme: light;
  --bg: #fafaf9;
  --bg-visual: #f5f5f4;
  --text: #18181b;
  --text-muted: #71717a;
  --text-dim: #a1a1aa;
  --border: #e4e4e7;
  --border-subtle: #f0f0f0;
  --accent: #10b981;
  --accent-subtle: #d1fae5;
  --accent-surface: #a7f3d0;
  --accent-border: rgba(16, 185, 129, 0.2);
  --shadow-color: rgba(24, 24, 27, 0.22);
  --shadow-color-strong: rgba(24, 24, 27, 0.34);
  --font: "Geist", system-ui, -apple-system, sans-serif;
  --header-h: 64px;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --smooth: cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

body {
  min-height: 100dvh;
  background: var(--bg);
  font-family: var(--font);
  font-size: 15px;
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  -webkit-tap-highlight-color: transparent;
}

::selection {
  background: var(--accent);
  color: #fff;
}

.page-loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  transition:
    opacity 0.5s var(--smooth),
    visibility 0.5s var(--smooth);
}

.page-loader.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loader-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.loader-logo {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: loader-spin 1.2s linear infinite;
}

.loader-logo svg {
  width: 24px;
  height: 24px;
  color: var(--text);
}

@keyframes loader-spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.loader-bar {
  width: 100px;
  height: 2px;
  background: var(--border);
  border-radius: 1px;
  overflow: hidden;
}

.loader-bar-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 1px;
  animation: loader-fill 1.5s var(--smooth) infinite;
}

@keyframes loader-fill {
  0% {
    width: 0%;
    transform: translateX(0);
  }
  50% {
    width: 70%;
  }
  100% {
    width: 0%;
    transform: translateX(100px);
  }
}

.grain {
  position: fixed;
  inset: 0;
  z-index: 1000;
  pointer-events: none;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 256px 256px;
}

.page {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
}

.page.loading .main,
.page.loading .header,
.page.loading .footer {
  opacity: 0;
}

.main,
.header,
.footer {
  transition: opacity 0.4s var(--smooth);
}

.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-h);
  z-index: 100;
  background: rgba(250, 250, 249, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(228, 228, 231, 0.5);
}

.header a {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  gap: 10px;
}

.logo-icon {
  color: var(--text);
  transition: transform 0.5s var(--spring);
}

.logo:hover .logo-icon {
  transform: rotate(90deg);
}

.logo-text {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--text);
}

.theme-toggle {
  position: absolute;
  top: 50%;
  right: 14px;
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transform: translateY(-50%);
  border-radius: 999px;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg-visual) 100%);
  color: var(--text);
  box-shadow: 0 14px 28px -18px var(--shadow-color);
  transition:
    transform 0.35s var(--spring),
    border-color 0.25s ease,
    box-shadow 0.35s var(--smooth),
    background 0.25s ease,
    color 0.25s ease;
  overflow: hidden;
}

.theme-toggle::before {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.24) 0%, transparent 68%);
  pointer-events: none;
}

.theme-toggle:focus-visible {
  outline: none;
  border-color: var(--accent);
  box-shadow:
    0 0 0 4px var(--accent-subtle),
    0 18px 32px -18px var(--shadow-color-strong);
}

.theme-toggle-icon {
  position: absolute;
  z-index: 1;
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition:
    transform 0.4s var(--spring),
    opacity 0.25s ease;
}

.theme-toggle-icon svg {
  width: 100%;
  height: 100%;
}

.theme-toggle-icon-sun {
  opacity: 1;
  transform: scale(1) rotate(0deg);
}

.theme-toggle-icon-moon {
  opacity: 0;
  transform: scale(0.6) rotate(-18deg);
}

:root[data-theme="dark"] .theme-toggle-icon-sun {
  opacity: 0;
  transform: scale(0.6) rotate(18deg);
}

:root[data-theme="dark"] .theme-toggle-icon-moon {
  opacity: 1;
  transform: scale(1) rotate(0deg);
}

.main {
  flex: 1;
  padding-top: var(--header-h);
  max-width: 100%;
  width: 100%;
  padding-left: 20px;
  padding-right: 20px;
}

.hero {
  display: flex;
  flex-direction: column;
  padding: 40px 0 48px;
  min-height: calc(100dvh - var(--header-h) - 60px);
  justify-content: center;
}

.hero-visual {
  width: 100%;
  height: 200px;
  margin-bottom: 32px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
}

.visual-grid {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  gap: 8px;
}

.grid-cell {
  border-radius: calc(var(--radius-lg) * 0.6);
  transition: transform 0.4s var(--spring);
}

.cell-1 {
  grid-column: 1 / 3;
  grid-row: 1 / 2;
  background: var(--bg-visual);
  border: 1px solid var(--border);
}

.cell-2 {
  grid-column: 3 / 4;
  grid-row: 1 / 3;
  background: linear-gradient(135deg, var(--accent-subtle) 0%, var(--accent-surface) 100%);
  border: 1px solid var(--accent-border);
}

.cell-3 {
  grid-column: 1 / 2;
  grid-row: 2 / 4;
  background: var(--bg-visual);
  border: 1px solid var(--border);
}

.cell-4 {
  grid-column: 2 / 4;
  grid-row: 2 / 3;
  background: var(--bg-visual);
  border: 1px solid var(--border);
}

.cell-5 {
  grid-column: 2 / 3;
  grid-row: 3 / 4;
  background: var(--text);
  border: 1px solid var(--text);
}

.cell-6 {
  grid-column: 3 / 4;
  grid-row: 3 / 4;
  background: var(--bg-visual);
  border: 1px solid var(--border);
}

.visual-grid:hover .cell-1 {
  transform: translate(3px, -3px);
}
.visual-grid:hover .cell-2 {
  transform: translate(-3px, 3px);
}
.visual-grid:hover .cell-3 {
  transform: translate(3px, 3px);
}
.visual-grid:hover .cell-4 {
  transform: translate(-3px, -3px);
}

.visual-orb {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 80px;
  height: 80px;
  background: radial-gradient(circle, var(--accent) 0%, transparent 70%);
  border-radius: 50%;
  opacity: 0.15;
  animation:
    breathe 4s ease-in-out infinite,
    float 6s ease-in-out infinite;
  pointer-events: none;
}

@keyframes breathe {
  0%,
  100% {
    opacity: 0.12;
    transform: translate(-50%, -50%) scale(1);
  }
  50% {
    opacity: 0.2;
    transform: translate(-50%, -50%) scale(1.15);
  }
}

@keyframes float {
  0%,
  100% {
    transform: translate(-50%, -50%);
  }
  50% {
    transform: translate(-50%, -55%);
  }
}

.hero-content {
  text-align: center;
  max-width: 620px;
  margin: 0 auto;
}

.hero-photo-wrap {
  position: relative;
  display: flex;
  justify-content: center;
  width: min(84vw, 320px);
  margin: 0 auto 34px;
  padding: 18px 0 0 18px;
  isolation: isolate;
  transition: transform 0.45s var(--spring);
}

.hero-photo-wrap::before,
.hero-photo-wrap::after {
  content: "";
  position: absolute;
  pointer-events: none;
  transition:
    transform 0.45s var(--spring),
    box-shadow 0.45s var(--smooth);
}

.hero-photo-wrap::before {
  inset: 42px 0 0 34px;
  border-radius: 32px;
  background: linear-gradient(
    135deg,
    rgba(16, 185, 129, 0.2) 0%,
    rgba(16, 185, 129, 0.05) 34%,
    rgba(255, 255, 255, 0.9) 100%
  );
  border: 1px solid var(--accent-border);
  box-shadow: 0 26px 50px -40px rgba(16, 185, 129, 0.45);
  z-index: -2;
}

.hero-photo-wrap::after {
  inset: 8px 18px 18px 0;
  border-radius: 32px;
  background: linear-gradient(
    160deg,
    rgba(255, 255, 255, 0.96) 0%,
    rgba(245, 245, 244, 0.88) 100%
  );
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 26px 60px -42px rgba(24, 24, 27, 0.34);
  z-index: -1;
}

.hero-photo-ring {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 4;
  padding: 10px;
  border-radius: 30px;
  background: linear-gradient(145deg, #ffffff 0%, rgba(250, 250, 249, 0.9) 100%);
  border: 1px solid rgba(24, 24, 27, 0.08);
  box-shadow:
    0 34px 60px -44px rgba(24, 24, 27, 0.5),
    0 16px 28px -24px rgba(24, 24, 27, 0.18);
  overflow: hidden;
  transition:
    transform 0.45s var(--spring),
    box-shadow 0.45s var(--smooth);
}

.hero-photo-ring::before {
  content: "";
  position: absolute;
  inset: 10px;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.42);
  pointer-events: none;
  z-index: 1;
}

.hero-photo {
  width: 100%;
  height: 100%;
  border-radius: 22px;
  object-fit: cover;
  object-position: center 18%;
  border: 0;
  display: block;
  background: var(--bg-visual);
  filter: saturate(0.92) contrast(1.05) brightness(0.98);
  transform: scale(1.015);
  transition: transform 0.55s var(--smooth);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 24px;
}

.eyebrow-line {
  width: 24px;
  height: 1px;
  background: var(--text);
}

.eyebrow-text {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.title {
  font-size: clamp(32px, 8vw, 48px);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: var(--text);
  margin-bottom: 16px;
}

.title-accent {
  position: relative;
  color: var(--accent);
  display: inline-block;
}

.title-accent::after {
  content: "";
  position: absolute;
  bottom: 2px;
  left: 0;
  right: 0;
  height: 8px;
  background: var(--accent-subtle);
  z-index: -1;
  transform: skewX(-6deg);
}

.lead {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 32px;
  max-width: 320px;
  margin-left: auto;
  margin-right: auto;
}

.countdown {
  max-width: 520px;
  margin: 0 auto 30px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, #fff 0%, var(--bg) 100%);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.03);
}

.countdown-label {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.countdown-label time {
  color: var(--text);
  font-weight: 600;
  letter-spacing: 0.04em;
}

.countdown-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.countdown-item {
  border: 1px solid var(--border);
  background: #fff;
  border-radius: var(--radius);
  padding: 12px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.countdown-value {
  font-size: clamp(26px, 5vw, 34px);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1;
  color: var(--text);
}

.countdown-unit {
  margin-top: 6px;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.countdown-status {
  margin-top: 12px;
  font-size: 13px;
  color: var(--text-muted);
}

.countdown.is-live {
  border-color: rgba(16, 185, 129, 0.45);
  background: linear-gradient(180deg, #fff 0%, #f0fdf4 100%);
}

.countdown.is-live .countdown-item {
  border-color: rgba(16, 185, 129, 0.3);
}

.countdown.is-live .countdown-status {
  color: var(--accent);
  font-weight: 500;
}

.actions {
  display: flex;
  justify-content: center;
}

.btn-primary {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  background: var(--text);
  color: var(--bg);
  font-size: 14px;
  font-weight: 500;
  border-radius: var(--radius);
  letter-spacing: -0.01em;
  transition:
    transform 0.3s var(--spring),
    box-shadow 0.3s var(--smooth);
  overflow: hidden;
  isolation: isolate;
  -webkit-user-select: none;
  user-select: none;
}

.btn-primary::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.08) 0%,
    transparent 50%
  );
  opacity: 0;
  transition: opacity 0.3s ease;
}

.btn-primary:hover::before {
  opacity: 1;
}

.btn-primary .ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
  transform: scale(0);
  animation: ripple 0.5s ease-out forwards;
  pointer-events: none;
}

@keyframes ripple {
  to {
    transform: scale(4);
    opacity: 0;
  }
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(24, 24, 27, 0.12);
}

.btn-primary:active {
  transform: scale(0.97);
}

.btn-icon {
  transition: transform 0.3s var(--spring);
  position: relative;
  z-index: 1;
}

.btn-primary:hover .btn-icon {
  transform: translateX(3px);
}

.work {
  padding: 80px 0 100px;
  margin-top: 40px;
}

.work-header {
  margin-bottom: 24px;
}

.work-label {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 12px;
}

.work-label::before {
  content: "";
  width: 32px;
  height: 2px;
  background: var(--accent);
  border-radius: 1px;
}

.work-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 20px;
  padding: 28px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: all 0.3s var(--spring);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.02);
  position: relative;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
}

.work-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--accent);
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform 0.3s var(--spring);
}

.work-item:hover {
  border-color: var(--text);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.04);
}

.work-item:active {
  transform: scale(0.99);
}

.work-item:hover::before {
  transform: scaleY(1);
}

.work-icon {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-muted);
  transition: all 0.3s var(--spring);
  flex-shrink: 0;
}

.work-item:hover .work-icon {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.work-content {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.work-name {
  font-size: 18px;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.work-meta {
  font-size: 14px;
  color: var(--text-muted);
}

.work-arrow {
  color: var(--text-dim);
  transition: transform 0.3s var(--spring);
  flex-shrink: 0;
}

.work-item:hover .work-arrow {
  transform: translateX(3px);
  color: var(--accent);
}

.blog {
  padding: 0 0 100px;
  margin-top: 12px;
}

.blog-description {
  margin-top: 12px;
  max-width: 42ch;
  font-size: 14px;
  color: var(--text-muted);
}

.blog-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.blog-card {
  position: relative;
  overflow: hidden;
  padding: 24px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.02);
  display: flex;
  flex-direction: column;
  transition:
    transform 0.3s var(--spring),
    box-shadow 0.3s var(--smooth),
    border-color 0.3s var(--smooth);
}

.blog-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--accent);
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform 0.3s var(--spring);
}

.blog-card:hover {
  transform: translateY(-2px);
  border-color: var(--text);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.04);
}

.blog-card:hover::before {
  transform: scaleY(1);
}

.blog-meta {
  display: inline-flex;
  margin-bottom: 14px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

.blog-card h3 {
  margin-bottom: 10px;
  font-size: 18px;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--text);
}

.blog-card p {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
}

.blog-readmore {
  margin-top: auto;
  padding-top: 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.blog-actions {
  margin-top: 18px;
  display: flex;
  justify-content: flex-start;
}

.blog-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  transition: transform 0.25s var(--spring), border-color 0.25s ease, box-shadow 0.25s ease;
}

.blog-link:hover {
  transform: translateY(-1px);
  border-color: var(--text);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.04);
}

.blog-empty {
  padding: 24px;
  border: 1px dashed var(--border);
  border-radius: var(--radius-lg);
  color: var(--text-muted);
  background: var(--bg);
}

.footer {
  padding: 32px 0;
  text-align: center;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.footer-social {
  display: flex;
  gap: 16px;
}

.social-link {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  color: var(--text-muted);
  background: var(--bg);
  border: 1px solid var(--border);
  transition: all 0.25s var(--spring);
}

.social-link:hover {
  color: var(--bg);
  background: var(--text);
  border-color: var(--text);
  transform: translateY(-2px);
}

.social-link:active {
  transform: scale(0.95);
}

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
  background: rgba(24, 24, 27, 0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s var(--smooth);
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal {
  width: 100%;
  max-width: 100%;
  background: #fff;
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.15);
  transform: translateY(100%);
  transition: transform 0.4s var(--spring);
  max-height: 90vh;
  overflow-y: auto;
}

.modal-overlay.active .modal {
  transform: translateY(0);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-subtle);
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 1;
}

.modal-header h2 {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.modal-close {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  border-radius: var(--radius);
  transition: background 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}

.modal-close:active {
  background: var(--bg);
}

.form {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 24px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
}

.form input,
.form textarea {
  width: 100%;
  padding: 14px 16px;
  font-family: inherit;
  font-size: 16px;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
  -webkit-appearance: none;
  appearance: none;
}

.form input:focus,
.form textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-subtle);
}

.form input::placeholder,
.form textarea::placeholder {
  color: var(--text-dim);
}

.form textarea {
  resize: none;
  min-height: 120px;
  line-height: 1.6;
}

.turnstile-wrap {
  display: flex;
  justify-content: center;
  padding: 4px 0;
  min-height: 65px;
}

.btn-submit {
  width: 100%;
  padding: 16px;
  font-size: 15px;
  font-weight: 500;
  color: var(--bg);
  background: var(--text);
  border-radius: var(--radius);
  letter-spacing: -0.01em;
  transition:
    transform 0.3s var(--spring),
    box-shadow 0.3s var(--smooth);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  -webkit-tap-highlight-color: transparent;
  -webkit-user-select: none;
  user-select: none;
}

.btn-submit:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(24, 24, 27, 0.15);
}

.btn-submit:active:not(:disabled) {
  transform: scale(0.98);
}

.btn-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-submit.loading .btn-text {
  opacity: 0;
}
.btn-submit.loading .btn-loader {
  opacity: 1;
}

.btn-submit.success {
  background: var(--accent);
}

.btn-submit.success .btn-text {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-submit.success .btn-text::before {
  content: "";
  width: 16px;
  height: 16px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 8l3 3 7-7'/%3E%3C/svg%3E");
  background-size: contain;
}

.btn-loader {
  position: absolute;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  opacity: 0;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.modal-alt {
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
  padding: 0 24px 28px;
}

.modal-alt a {
  color: var(--text);
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.fade-up {
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity 0.6s var(--smooth),
    transform 0.6s var(--smooth);
}

.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* External Link Modal */
.external-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
  background: rgba(24, 24, 27, 0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s var(--smooth);
}

.external-modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.external-modal {
  width: 100%;
  max-width: 100%;
  background: #fff;
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.15);
  transform: translateY(100%);
  transition: transform 0.4s var(--spring);
  max-height: 90vh;
  overflow-y: auto;
}

.external-modal-overlay.active .external-modal {
  transform: translateY(0);
}

.external-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-subtle);
}

.external-modal-header h2 {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 10px;
}

.external-modal-header h2 svg {
  color: var(--accent);
}

.external-modal-close {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  border-radius: var(--radius);
  transition: background 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}

.external-modal-close:active {
  background: var(--bg);
}

.external-modal-content {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.external-modal-icon {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--accent-subtle) 0%, var(--accent-surface) 100%);
  border: 1px solid var(--accent-border);
  border-radius: var(--radius);
  margin: 0 auto 4px;
}

.external-modal-icon svg {
  color: var(--accent);
}

.external-modal-title {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.02em;
  text-align: center;
  color: var(--text);
}

.external-modal-desc {
  font-size: 14px;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.6;
}

.external-modal-url {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.external-modal-url svg {
  color: var(--text-muted);
  flex-shrink: 0;
}

.external-modal-url span {
  font-size: 13px;
  color: var(--text);
  word-break: break-all;
  line-height: 1.5;
}

.external-modal-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-top: 8px;
}

.btn-external-continue {
  width: 100%;
  padding: 16px;
  font-size: 15px;
  font-weight: 500;
  color: #fff;
  background: var(--accent);
  border-radius: var(--radius);
  letter-spacing: -0.01em;
  transition:
    transform 0.3s var(--spring),
    box-shadow 0.3s var(--smooth);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  -webkit-tap-highlight-color: transparent;
  -webkit-user-select: none;
  user-select: none;
}

.btn-external-continue:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(16, 185, 129, 0.25);
}

.btn-external-continue:active {
  transform: scale(0.98);
}

.btn-external-cancel {
  width: 100%;
  padding: 14px;
  font-size: 15px;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  letter-spacing: -0.01em;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  -webkit-tap-highlight-color: transparent;
}

.btn-external-cancel:hover {
  color: var(--text);
  border-color: var(--text);
  background: #fff;
}

.btn-external-cancel:active {
  transform: scale(0.98);
}

@media (max-width: 420px) {
  .hero-photo-wrap {
    width: min(86vw, 280px);
    padding-top: 14px;
    padding-left: 14px;
  }

  .hero-photo-wrap::before {
    inset: 34px 0 0 26px;
    border-radius: 28px;
  }

  .hero-photo-wrap::after {
    inset: 6px 12px 12px 0;
    border-radius: 28px;
  }

  .hero-photo-ring {
    padding: 8px;
    border-radius: 26px;
  }

  .hero-photo-ring::before {
    inset: 8px;
    border-radius: 20px;
  }

  .hero-photo {
    border-radius: 18px;
  }

  .countdown-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .countdown-item {
    padding: 14px 10px;
  }
}

@media (min-width: 640px) {
  .theme-toggle {
    right: 18px;
  }

  .main {
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 32px;
    padding-right: 32px;
  }

  .hero {
    padding: 60px 0;
    min-height: auto;
  }

  .hero-photo-wrap {
    width: min(52vw, 340px);
    padding-top: 20px;
    padding-left: 20px;
    margin-bottom: 38px;
  }

  .hero-photo-wrap::before {
    inset: 48px 0 0 40px;
  }

  .hero-photo-wrap::after {
    inset: 10px 20px 20px 0;
  }

  .hero-photo-ring {
    padding: 12px;
    border-radius: 32px;
  }

  .hero-photo-ring::before {
    inset: 12px;
    border-radius: 24px;
  }

  .hero-photo {
    border-radius: 24px;
  }

  .hero-visual {
    height: 280px;
    border-radius: var(--radius-xl);
  }

  .visual-grid {
    gap: 12px;
  }

  .grid-cell {
    border-radius: var(--radius-lg);
  }

  .visual-orb {
    width: 100px;
    height: 100px;
  }

  .title {
    font-size: 40px;
  }

  .lead {
    font-size: 16px;
    max-width: 400px;
  }

  .countdown {
    padding: 20px;
  }

  .countdown-status {
    font-size: 14px;
  }

  .work {
    padding: 48px 0 80px;
  }

  .work-item {
    padding: 24px;
    gap: 20px;
  }

  .work-icon {
    width: 48px;
    height: 48px;
  }

  .modal-overlay {
    align-items: center;
    padding: 24px;
  }

  .modal {
    max-width: 440px;
    border-radius: var(--radius-xl);
    max-height: 85vh;
  }

  .modal-header {
    padding: 24px 28px;
  }

  .form {
    padding: 28px;
  }

  /* External Modal Responsive */
  .external-modal-overlay {
    align-items: center;
    padding: 24px;
  }

  .external-modal {
    max-width: 420px;
    border-radius: var(--radius-xl);
    max-height: 85vh;
  }

  .external-modal-header {
    padding: 24px 28px;
  }

  .external-modal-content {
    padding: 28px;
  }
}

@media (min-width: 1024px) {
  .main {
    max-width: 900px;
  }

  .hero {
    padding: 0;
    min-height: calc(100dvh - var(--header-h));
  }

  .hero-content {
    max-width: none;
    width: 100%;
    display: grid;
    grid-template-columns: minmax(300px, 360px) minmax(0, 1fr);
    align-items: center;
    gap: 0 68px;
    text-align: left;
  }

  .hero-content > :not(.hero-photo-wrap) {
    grid-column: 2;
  }

  .hero-photo-wrap {
    grid-column: 1;
    grid-row: 1 / span 5;
    justify-self: start;
    width: min(100%, 360px);
    margin: 0;
  }

  .eyebrow {
    justify-content: flex-start;
  }

  .lead {
    margin-left: 0;
    margin-right: 0;
  }

  .countdown {
    margin: 0 0 30px;
  }

  .actions {
    justify-content: flex-start;
  }

  .title {
    font-size: 48px;
  }

  .title-accent::after {
    height: 10px;
    bottom: 4px;
  }
}

@media (min-width: 1200px) {
  .main {
    max-width: 1100px;
  }

  .hero-content {
    grid-template-columns: minmax(320px, 390px) minmax(0, 1fr);
    gap: 0 84px;
  }

  .hero-photo-wrap {
    width: min(100%, 390px);
  }

  .hero-visual {
    height: 480px;
  }

  .title {
    font-size: 56px;
  }

  .visual-grid {
    gap: 16px;
  }

  .visual-orb {
    width: 120px;
    height: 120px;
  }
}

@media (hover: hover) and (pointer: fine) {
  .theme-toggle:hover {
    transform: translateY(-50%) scale(1.04);
    border-color: var(--accent-border);
    box-shadow: 0 18px 34px -18px var(--shadow-color-strong);
  }

  .theme-toggle:hover .theme-toggle-icon {
    transform: scale(1.08);
  }

  .hero-photo-wrap:hover {
    transform: translateY(-4px);
  }

  .hero-photo-wrap:hover::before {
    transform: translate(10px, 10px) rotate(4deg);
    box-shadow: 0 32px 60px -40px rgba(16, 185, 129, 0.36);
  }

  .hero-photo-wrap:hover .hero-photo-ring {
    transform: rotate(-1.5deg);
    box-shadow:
      0 42px 70px -48px rgba(24, 24, 27, 0.58),
      0 24px 36px -28px rgba(24, 24, 27, 0.24);
  }

  .hero-photo-wrap:hover .hero-photo {
    transform: scale(1.04);
  }
}

@media (hover: none) and (pointer: coarse) {
  .theme-toggle:hover {
    transform: translateY(-50%);
    border-color: var(--border);
    box-shadow: 0 14px 28px -18px var(--shadow-color);
  }

  .theme-toggle:active {
    transform: translateY(-50%) scale(0.96);
  }

  .btn-primary:hover {
    transform: none;
    box-shadow: none;
  }

  .btn-primary:hover::before {
    opacity: 0;
  }

  .btn-primary:hover .btn-icon {
    transform: none;
  }

  .work-item:hover {
    border-color: var(--border);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.02);
  }

  .work-item:hover::before {
    transform: scaleY(0);
  }

  .work-item:hover .work-icon {
    background: var(--bg);
    border-color: var(--border);
    color: var(--text-muted);
  }

  .work-item:hover .work-arrow {
    transform: none;
    color: var(--text-dim);
  }

  .work-item:active {
    border-color: var(--text);
    transform: scale(0.99);
  }

  .work-item:active::before {
    transform: scaleY(1);
  }

  .logo:hover .logo-icon {
    transform: none;
  }
}

:root[data-theme="dark"] ::selection {
  color: #04120c;
}

:root[data-theme="dark"] .grain {
  opacity: 0.045;
}

:root[data-theme="dark"] .header {
  background: rgba(11, 11, 16, 0.82);
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

:root[data-theme="dark"] .hero-photo-wrap::before {
  background: linear-gradient(
    135deg,
    rgba(52, 211, 153, 0.22) 0%,
    rgba(52, 211, 153, 0.06) 34%,
    rgba(20, 20, 27, 0.95) 100%
  );
  box-shadow: 0 26px 50px -40px rgba(0, 0, 0, 0.48);
}

:root[data-theme="dark"] .hero-photo-wrap::after {
  background: linear-gradient(
    160deg,
    rgba(24, 24, 32, 0.96) 0%,
    rgba(12, 12, 18, 0.92) 100%
  );
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: 0 26px 60px -42px rgba(0, 0, 0, 0.6);
}

:root[data-theme="dark"] .hero-photo-ring {
  background: linear-gradient(145deg, rgba(30, 30, 40, 0.94) 0%, rgba(14, 14, 20, 0.94) 100%);
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow:
    0 34px 60px -44px rgba(0, 0, 0, 0.78),
    0 16px 28px -24px rgba(0, 0, 0, 0.5);
}

:root[data-theme="dark"] .hero-photo-ring::before {
  border-color: rgba(255, 255, 255, 0.06);
}

:root[data-theme="dark"] .hero-photo {
  filter: saturate(0.98) contrast(1.08) brightness(0.92);
}

:root[data-theme="dark"] .countdown {
  background: linear-gradient(180deg, rgba(23, 23, 30, 0.96) 0%, rgba(11, 11, 16, 0.98) 100%);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.26);
}

:root[data-theme="dark"] .countdown-item {
  background: #14141b;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

:root[data-theme="dark"] .countdown.is-live {
  background: linear-gradient(180deg, rgba(18, 32, 28, 0.96) 0%, rgba(8, 16, 14, 0.98) 100%);
}

:root[data-theme="dark"] .work-item {
  background: #14141b;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
}

:root[data-theme="dark"] .work-item:hover {
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.26);
}

:root[data-theme="dark"] .blog-card {
  background: #14141b;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
}

:root[data-theme="dark"] .blog-card:hover {
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.26);
}

:root[data-theme="dark"] .social-link:hover {
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.24);
}

:root[data-theme="dark"] .modal-overlay,
:root[data-theme="dark"] .external-modal-overlay {
  background: rgba(2, 4, 8, 0.72);
}

:root[data-theme="dark"] .modal,
:root[data-theme="dark"] .modal-header,
:root[data-theme="dark"] .external-modal,
:root[data-theme="dark"] .external-modal-header {
  background: #101015;
}

:root[data-theme="dark"] .modal,
:root[data-theme="dark"] .external-modal {
  box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.45);
}

:root[data-theme="dark"] .form input,
:root[data-theme="dark"] .form textarea,
:root[data-theme="dark"] .external-modal-url,
:root[data-theme="dark"] .btn-external-cancel {
  background: #14141b;
}

:root[data-theme="dark"] .form input,
:root[data-theme="dark"] .form textarea {
  color: var(--text);
}

:root[data-theme="dark"] .btn-primary:hover,
:root[data-theme="dark"] .btn-submit:hover:not(:disabled) {
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.34);
}

:root[data-theme="dark"] .btn-external-cancel:hover {
  background: #1a1a22;
}

@media (hover: hover) and (pointer: fine) {
  :root[data-theme="dark"] .hero-photo-wrap:hover::before {
    box-shadow: 0 32px 60px -40px rgba(16, 185, 129, 0.24);
  }

  :root[data-theme="dark"] .hero-photo-wrap:hover .hero-photo-ring {
    box-shadow:
      0 42px 70px -48px rgba(0, 0, 0, 0.84),
      0 24px 36px -28px rgba(0, 0, 0, 0.52);
  }
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #fafaf9;
  --bg-visual: #f5f5f4;
  --text: #18181b;
  --text-muted: #71717a;
  --text-dim: #a1a1aa;
  --border: #e4e4e7;
  --border-subtle: #f0f0f0;
  --accent: #10b981;
  --accent-subtle: #d1fae5;
  --accent-surface: #a7f3d0;
  --accent-border: rgba(16, 185, 129, 0.2);
  --shadow-color: rgba(24, 24, 27, 0.22);
  --shadow-color-strong: rgba(24, 24, 27, 0.34);
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0b0b10;
  --bg-visual: #15151c;
  --text: #f5f5f5;
  --text-muted: #a1a1aa;
  --text-dim: #71717a;
  --border: #27272f;
  --border-subtle: #1b1b22;
  --accent: #34d399;
  --accent-subtle: rgba(52, 211, 153, 0.16);
  --accent-surface: rgba(52, 211, 153, 0.28);
  --accent-border: rgba(52, 211, 153, 0.24);
  --shadow-color: rgba(0, 0, 0, 0.46);
  --shadow-color-strong: rgba(0, 0, 0, 0.62);
}

@supports (padding: env(safe-area-inset-bottom)) {
  .modal {
    padding-bottom: env(safe-area-inset-bottom);
  }

  .footer {
    padding-bottom: calc(32px + env(safe-area-inset-bottom));
  }
}
