:root {
  --ink: #202124;
  --muted: #3c4043;
  --purple: #6255aa;
  --purple-dark: #51458f;
  --blue: #4285f4;
  --green: #34a853;
  --red: #ea4335;
  --line: #e8eaed;
  --max-width: 1490px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: #fbfbfc;
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
.shell { width: min(calc(100% - 72px), var(--max-width)); margin-inline: auto; }
.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 99;
  transform: translateY(-150%);
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--ink);
  color: #fff;
}
.skip-link:focus { transform: translateY(0); }

.site-header {
  position: relative;
  background: rgba(255,255,255,.96);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  height: 104px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.brand {
  display: inline-flex;
  text-decoration: none;
  transition: transform .2s ease;
}
.brand:hover { transform: scale(1.025); }
.brand img {
  width: 170px;
  height: auto;
  display: block;
}

.projects {
  display: flex;
  align-items: center;
  padding-block: 24px 14px;
}
.project-grid {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 26px;
}
.project-card {
  position: relative;
  height: clamp(630px, calc(100vh - 160px), 704px);
  min-height: 630px;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 10px;
  padding: clamp(30px, 2.6vw, 42px);
  border: 1px solid rgba(var(--theme-rgb), .12);
  border-radius: 32px;
  box-shadow: 0 18px 46px rgba(32,33,36,.04);
  overflow: hidden;
  cursor: pointer;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.project-card::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(255,255,255,.34), transparent 46%);
}
.project-card:hover,
.project-card:focus-within,
.project-card:focus-visible {
  transform: translateY(-5px);
  border-color: rgba(var(--theme-rgb), .28);
  box-shadow: 0 24px 54px rgba(var(--theme-rgb), .14);
}
.project-card:focus-visible {
  outline: 3px solid rgba(var(--theme-rgb), .32);
  outline-offset: 4px;
}
.house-card {
  --theme: var(--blue);
  --theme-dark: #2f6fd8;
  --theme-rgb: 66, 133, 244;
  --theme-soft: #f4f8ff;
  --theme-soft-2: #eaf2ff;
  background: linear-gradient(145deg, var(--theme-soft), var(--theme-soft-2));
}
.capital-card {
  --theme: var(--green);
  --theme-dark: #278a43;
  --theme-rgb: 52, 168, 83;
  --theme-soft: #f2fbf4;
  --theme-soft-2: #e8f7ec;
  background: linear-gradient(145deg, var(--theme-soft), var(--theme-soft-2));
}
.online-card {
  --theme: var(--red);
  --theme-dark: #c93429;
  --theme-rgb: 234, 67, 53;
  --theme-soft: #fff5f3;
  --theme-soft-2: #feeae7;
  background: linear-gradient(145deg, var(--theme-soft), var(--theme-soft-2));
}

.project-copy,
.project-visual,
.card-action { position: relative; z-index: 1; }
h1, h2 {
  margin: 0 0 20px;
  color: var(--theme);
  font-size: clamp(24px, 1.7vw, 27px);
  line-height: 1.05;
  letter-spacing: -.04em;
  font-weight: 700;
}
.description {
  max-width: 410px;
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.58;
  letter-spacing: .002em;
}

.project-visual {
  min-height: 132px;
  display: grid;
  place-items: center;
  align-self: center;
  transition: transform .25s ease;
}
.project-card:hover .project-visual { transform: translateY(-3px) scale(1.012); }
.visual-window,
.browser-card,
.capital-panel {
  width: 90%;
  height: 150px;
  padding: 11px 14px;
  border: 1px solid rgba(var(--theme-rgb), .08);
  border-radius: 23px;
  background: rgba(255,255,255,.76);
  box-shadow: 0 22px 38px rgba(var(--theme-rgb), .12);
}
.visual-window { transform: rotate(.5deg); }
.window-dots {
  display: flex;
  gap: 5px;
  margin-bottom: 8px;
}
.window-dots span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(var(--theme-rgb), .42);
}
.visual-grid {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 8px;
  height: 108px;
}
.icon-tile {
  display: grid;
  min-height: 0;
  place-items: center;
  border-radius: 12px;
  background: #dceaff;
  color: #3678d3;
}
.icon-tile:nth-child(2) { background: #e8f1ff; color: #4285f4; }
.icon-tile:nth-child(3) { background: #cfe2ff; color: #2f6fd8; }
.icon-tile:nth-child(4) { background: #edf4ff; color: #5b8fdb; }
.icon-tile:nth-child(5) { background: #d8e8ff; color: #3f7dcc; }
.icon-tile:nth-child(6) { background: #e5efff; color: #4285f4; }
.icon-tile svg {
  width: 45%;
  height: 45%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.ai-icon svg { fill: currentColor; stroke: none; }

.capital-panel {
  width: 90%;
  height: 150px;
  padding: 2px 10px;
  background: rgba(255,255,255,.58);
  box-shadow: 0 22px 38px rgba(52,168,83,.12);
}
.capital-panel svg {
  width: 100%;
  height: 144px;
  display: block;
  filter: drop-shadow(0 10px 14px rgba(52,168,83,.10));
}

.browser-card {
  width: 90%;
  height: 150px;
  padding: 11px 14px;
}
.address {
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0 14px;
  border-radius: 999px;
  background: #fdecea;
  color: #c93429;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -.01em;
}
.address svg {
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  fill: none;
  stroke: #ea4335;
  stroke-width: 2.2;
  stroke-linecap: round;
}
.service-icons {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 12px;
  align-items: center;
  margin-top: 10px;
}
.service-icons span {
  min-height: 46px;
  display: grid;
  place-items: center;
  border-radius: 15px;
  background: rgba(255,255,255,.64);
  color: #ea4335;
}
.service-icons span:nth-child(2) { color: #d83a2f; }
.service-icons span:nth-child(3) { color: #c93429; }
.service-icons svg {
  width: 27px;
  height: 27px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.card-action {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 10px;
}
.project-url {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.2;
  letter-spacing: .02em;
  text-decoration: none;
  overflow-wrap: anywhere;
  transition: color .2s ease, text-decoration-color .2s ease;
}
.project-url:hover {
  color: var(--theme-dark);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.project-url:focus-visible {
  outline: 3px solid rgba(var(--theme-rgb), .3);
  outline-offset: 4px;
  border-radius: 4px;
}
.button {
  min-height: 54px;
  min-width: min(100%, 260px);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 14px 24px;
  border-radius: 999px;
  background: var(--theme);
  color: #fff;
  font-size: 15px;
  font-weight: 400;
  letter-spacing: .08em;
  text-decoration: none;
  box-shadow: 0 10px 22px rgba(var(--theme-rgb), .24);
  transition: transform .2s ease, box-shadow .2s ease, background-color .2s ease;
}
.button span { transition: transform .2s ease; }
.button:hover {
  transform: translateY(-2px);
  background: var(--theme-dark);
  box-shadow: 0 15px 28px rgba(var(--theme-rgb), .32);
}
.button:hover span { transform: translate(3px, -3px); }
.project-card a:focus-visible {
  outline: 3px solid rgba(var(--theme-rgb), .38);
  outline-offset: 4px;
}
.brand:focus-visible {
  outline: 3px solid rgba(98,85,170,.35);
  outline-offset: 6px;
  border-radius: 8px;
}


@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}

@media (max-width: 1120px) {
  .shell { width: min(calc(100% - 40px), var(--max-width)); }
  .projects { align-items: stretch; }
  .project-grid { grid-template-columns: 1fr; }
  .project-card {
    height: auto;
    min-height: 450px;
    grid-template-columns: 1.1fr .9fr;
    grid-template-rows: 1fr auto;
    align-items: center;
  }
  .project-copy { grid-column: 1; grid-row: 1; }
  .project-visual { grid-column: 2; grid-row: 1 / 3; }
  .card-action { grid-column: 1; grid-row: 2; align-items: flex-start; }
  .description { max-width: 520px; }
}

@media (max-width: 680px) {
  .shell { width: min(calc(100% - 26px), var(--max-width)); }
  .header-inner { height: 94px; }
  .brand img { width: 140px; }
  .projects { padding-block: 18px 8px; }
  .project-grid { gap: 18px; }
  .project-card {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
    min-height: 0;
    padding: 28px 22px;
    border-radius: 26px;
  }
  .project-copy,
  .project-visual,
  .card-action { grid-column: 1; grid-row: auto; }
  .project-visual { min-height: 132px; }
  .card-action { align-items: center; }
  h1, h2 { font-size: 24px; }
  .description { font-size: 16px; line-height: 1.6; }
  .visual-window,
  .browser-card,
  .capital-panel { width: 90%; }
  .button { width: 100%; }
}

@media (max-height: 820px) and (min-width: 1121px) {
  .header-inner { height: 92px; }
  .brand img { width: 159px; }
  .projects { padding-block: 18px 8px; }
  .project-card {
    height: calc(100vh - 136px);
    min-height: 612px;
    padding: 30px 36px;
    gap: 10px;
  }
  .project-type { margin-bottom: 12px; }
  h1, h2 { margin-bottom: 14px; font-size: 24px; }
  .description { font-size: 15.5px; line-height: 1.56; }
  .project-visual { min-height: 132px; }
  .visual-window,
  .browser-card,
  .capital-panel { width: 90%; }
  .button { min-height: 50px; }
}

/* Desktop spacing refinement: keep illustrations and actions close to the copy,
   matching the compact spacing used in the mobile layout. */
@media (min-width: 1121px) {
  .project-card {
    height: auto;
    min-height: 0;
    grid-template-rows: auto auto auto;
    align-content: start;
    gap: 18px;
  }

  .project-visual {
    min-height: 0;
    align-self: auto;
    margin-top: 2px;
  }

  .card-action {
    margin-top: 0;
  }
}
