:root {
  --ink: #111111;
  --ink-soft: #333333;
  --muted: #616161;
  --line: #d1d1d1;
  --line-soft: #e1e1e1;
  --paper: #ffffff;
  --paper-2: #f3f3f3;
  --white: #ffffff;
  --card: #ffffff;
  --radius: 4px;
  --nav-h: 48px;
  --max: 1200px;
}

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

html {
  scroll-behavior: smooth;
  font-family: "Times New Roman", Times, serif;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: "Times New Roman", Times, serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
}

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

a:hover {
  text-decoration: underline;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -40px;
  background: var(--ink);
  color: var(--white);
  padding: 8px 12px;
  z-index: 100;
}

.skip-link:focus {
  top: 12px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.wrap {
  width: min(var(--max), calc(100% - 48px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  height: var(--nav-h);
  background: var(--white);
  border-bottom: 1px solid var(--line);
}

.nav {
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand,
.brand:hover {
  text-decoration: none;
  font-weight: 700;
  font-size: 16px;
}

.brand-text {
  line-height: 1;
}

.nav-links {
  display: flex;
  align-items: stretch;
  gap: 0;
  list-style: none;
  margin: 0;
  padding: 0;
  height: var(--nav-h);
}

.nav-links a {
  display: flex;
  align-items: center;
  height: 100%;
  padding: 0 16px;
  color: var(--ink-soft);
  font-size: 14px;
  border-bottom: 2px solid transparent;
  text-decoration: none;
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: var(--ink);
  border-bottom-color: var(--ink);
}

.nav-cta {
  background: var(--ink);
  color: var(--white) !important;
  border-bottom: 0 !important;
  margin: 8px 0 8px 8px;
  height: 32px !important;
  padding: 0 14px !important;
}

.nav-cta:hover {
  background: #2b2b2b;
}

.menu-toggle {
  display: none;
  border: 1px solid var(--line);
  background: var(--white);
  width: 32px;
  height: 32px;
  padding: 0;
  cursor: pointer;
}

.menu-toggle > span:first-child,
.menu-toggle > span:first-child::before,
.menu-toggle > span:first-child::after {
  display: block;
  width: 14px;
  height: 1px;
  background: var(--ink);
  position: relative;
  margin: 0 auto;
}

.menu-toggle > span:first-child::before,
.menu-toggle > span:first-child::after {
  content: "";
  position: absolute;
  left: 0;
}

.menu-toggle > span:first-child::before { top: -5px; }
.menu-toggle > span:first-child::after { top: 5px; }

.crumb {
  padding: 12px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.crumb a:hover {
  text-decoration: underline;
}

.page-hero {
  padding: 40px 0 24px;
  border-bottom: 1px solid var(--line-soft);
  background: var(--paper-2);
}

.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: 72px 0 64px;
  border-bottom: 1px solid var(--line-soft);
  background: #e8e8e8;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    radial-gradient(ellipse 70% 90% at 92% -8%, rgba(17, 17, 17, 0.1), transparent 58%),
    radial-gradient(ellipse 48% 70% at 4% 108%, rgba(17, 17, 17, 0.06), transparent 52%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.22) 0%, rgba(243, 243, 243, 0.86) 72%, #f3f3f3 100%),
    linear-gradient(rgba(17, 17, 17, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(17, 17, 17, 0.06) 1px, transparent 1px);
  background-size: auto, auto, auto, 28px 28px, 28px 28px;
}

.hero-ripple {
  position: absolute;
  width: min(160vw, 1600px);
  height: min(160vw, 1600px);
  top: clamp(6%, calc(6% + (100vw - 390px) * 0.19), 50%);
  right: clamp(-14%, calc(-14% + (100vw - 390px) / 810px * 28%), 14%);
  transform: translate(50%, -50%);
  pointer-events: none;
  z-index: 0;
}

.ripple-ring {
  position: absolute;
  left: 50%;
  top: 50%;
  border: 1px solid rgba(17, 17, 17, 0.34);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.ripple-ring:nth-child(1) { width: 1.1%; height: 1.1%; opacity: 0.64; }
.ripple-ring:nth-child(2) { width: 1.5%; height: 1.5%; opacity: 0.58; }
.ripple-ring:nth-child(3) { width: 1.9%; height: 1.9%; opacity: 0.54; }
.ripple-ring:nth-child(4) { width: 2.6%; height: 2.6%; opacity: 0.5; }
.ripple-ring:nth-child(5) { width: 3.4%; height: 3.4%; opacity: 0.46; }
.ripple-ring:nth-child(6) { width: 4.5%; height: 4.5%; opacity: 0.42; }
.ripple-ring:nth-child(7) { width: 6%; height: 6%; opacity: 0.38; }
.ripple-ring:nth-child(8) { width: 7.9%; height: 7.9%; opacity: 0.35; }
.ripple-ring:nth-child(9) { width: 10.4%; height: 10.4%; opacity: 0.32; }
.ripple-ring:nth-child(10) { width: 13.8%; height: 13.8%; opacity: 0.29; }
.ripple-ring:nth-child(11) { width: 18.3%; height: 18.3%; opacity: 0.26; }
.ripple-ring:nth-child(12) { width: 24.3%; height: 24.3%; opacity: 0.23; }
.ripple-ring:nth-child(13) { width: 32.2%; height: 32.2%; opacity: 0.21; }
.ripple-ring:nth-child(14) { width: 42.6%; height: 42.6%; opacity: 0.19; }
.ripple-ring:nth-child(15) { width: 56.5%; height: 56.5%; opacity: 0.17; }
.ripple-ring:nth-child(16) { width: 74.9%; height: 74.9%; opacity: 0.16; }
.ripple-ring:nth-child(17) { width: 100%; height: 100%; opacity: 0.14; }

.hero .wrap {
  position: relative;
  z-index: 1;
}

.kicker {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 8px;
}

h1, h2, h3 {
  margin: 0 0 12px;
  letter-spacing: 0;
  line-height: 1.2;
  font-weight: 700;
}

h1 {
  font-size: 32px;
  max-width: 22ch;
}

.hero h1,
.page-hero h1 {
  max-width: 24ch;
}

h2 {
  font-size: 22px;
}

h3 {
  font-size: 16px;
}

.lead {
  max-width: 62ch;
  color: var(--ink-soft);
  font-size: 16px;
  margin: 0;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 0 16px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  font-family: "Times New Roman", Times, serif;
  font-size: 14px;
  text-decoration: none;
}

.btn:hover {
  text-decoration: none;
}

.btn-primary {
  background: var(--ink);
  color: var(--white);
}

.btn-primary:hover {
  background: #2b2b2b;
}

.btn-secondary {
  background: var(--white);
  border-color: var(--line);
  color: var(--ink);
}

.btn-secondary:hover {
  background: var(--paper-2);
}

.section {
  padding: 32px 0;
}

.section-head {
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line-soft);
}

.work {
  padding: 56px 0;
  background: var(--paper-2);
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
}

.work-head {
  max-width: none;
  margin-bottom: 28px;
}

.work-head h2 {
  font-size: 28px;
  margin: 0;
}

.work-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.work-card {
  background: var(--white);
  padding: 28px 24px 32px;
  min-height: 220px;
}

.work-card h3 {
  margin: 16px 0 8px;
  font-size: 20px;
}

.work-card p {
  margin: 0;
  color: var(--muted);
  max-width: 32ch;
}

.work-num {
  display: block;
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 0.08em;
}

.grid-3,
.grid-2 {
  display: grid;
  gap: 12px;
}

.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: 1fr 1fr; }
.portfolio-grid { grid-template-columns: 1fr 1fr; }

.portfolio-grid .card {
  text-align: center;
}

.portfolio-grid .app-icon {
  margin-left: auto;
  margin-right: auto;
}

.portfolio-grid .hero-actions {
  justify-content: center;
}

.badge {
  display: inline-block;
  margin-bottom: 10px;
  padding: 2px 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper-2);
  color: var(--muted);
  font-size: 11px;
}

.app-mark {
  width: 64px;
  height: 64px;
  border-radius: var(--radius);
  background: var(--ink);
  color: var(--white);
  display: grid;
  place-items: center;
  font-size: 24px;
  margin-bottom: 12px;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
}

.card p,
.muted {
  color: var(--muted);
}

.product-hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: start;
}

.product-visual {
  background: var(--paper-2);
  border: 1px solid var(--line-soft);
  padding: 20px;
}

.app-icon {
  width: 64px;
  height: 64px;
  border-radius: var(--radius);
  margin-bottom: 12px;
  background: #fff;
  border: 1px solid var(--line);
  object-fit: cover;
}

.phone-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 20px;
}

.phone-frame {
  background: var(--ink);
  padding: 6px;
}

.phone-frame img {
  width: 100%;
}

.contact-layout {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 12px;
}

label {
  display: block;
  font-size: 13px;
  margin-bottom: 6px;
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--white);
  border-radius: var(--radius);
  padding: 8px 10px;
  font: inherit;
  font-family: "Times New Roman", Times, serif;
  color: var(--ink);
  margin-bottom: 12px;
}

input:focus,
textarea:focus {
  outline: 1px solid var(--ink);
  border-color: var(--ink);
}

textarea {
  min-height: 120px;
  resize: vertical;
}

.form-status {
  min-height: 20px;
  font-size: 13px;
  color: var(--ink-soft);
}

.site-footer {
  padding: 28px 0 16px;
  border-top: 1px solid var(--line);
  background: var(--paper-2);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 24px;
}

.socials {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.socials a {
  width: 32px;
  height: 32px;
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  background: var(--white);
  text-decoration: none;
  font-size: 12px;
}

.legal {
  margin-top: 20px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

@media (max-width: 880px) {
  .hero {
    padding: 48px 0 40px;
  }

  .hero-ripple {
    opacity: 0.85;
  }

  .menu-toggle { display: grid; place-items: center; }

  .nav-links {
    display: none;
    position: absolute;
    top: var(--nav-h);
    left: 0;
    right: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    align-items: stretch;
    height: auto;
    padding: 8px 0;
  }

  .nav-links a {
    height: 40px;
  }

  .nav-cta {
    margin: 8px 16px;
    width: calc(100% - 32px);
    justify-content: center;
  }

  .nav-links.is-open { display: flex; }

  .grid-3,
  .grid-2,
  .portfolio-grid,
  .product-hero,
  .contact-layout,
  .footer-grid,
  .phone-row,
  .work-grid {
    grid-template-columns: 1fr;
  }

  .work {
    padding: 40px 0;
  }

  .work-card {
    min-height: 0;
  }
}
