:root {
  --ink: #0e1114;
  --ink-soft: #4b545a;
  --paper: #f4f4f0;
  --accent: #0f6f5c;
  --accent-soft: #d8ebe6;
  --panel: #ffffff;
  --line: rgba(14, 17, 20, 0.12);
  --header-height: 76px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  font-family: "Work Sans", sans-serif;
  color: var(--ink);
  background-color: var(--paper);
  background-image:
    linear-gradient(to right, rgba(14, 17, 20, 0.04) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(14, 17, 20, 0.04) 1px, transparent 1px);
  background-size: 64px 64px;
  overflow-x: hidden;
}

.page {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  padding-top: calc(clamp(1.5rem, 3vw, 3rem) + var(--header-height));
  padding-right: clamp(1.5rem, 4vw, 4.5rem);
  padding-bottom: 3rem;
  padding-left: clamp(1.5rem, 4vw, 4.5rem);
  display: flex;
  flex-direction: column;
  gap: clamp(0.9rem, 1.5vw, 1.4rem);
}

.brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  background: rgba(244, 244, 240, 0.9);
  backdrop-filter: blur(8px);
  padding: 0.75rem clamp(1.5rem, 4vw, 4.5rem);
}

.brand-mark {
  width: 56px;
  height: 56px;
  border-radius: 6px;
  background: #fff;
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  overflow: hidden;
}

.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 8px;
}

.brand-text {
  flex: 1 1 260px;
}

.brand-text .label {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.18em;
}

.brand-text .tagline {
  color: var(--ink-soft);
  margin-top: 0.35rem;
  max-width: 420px;
}

.quick-links {
  display: flex;
  gap: 1.25rem;
  font-weight: 600;
}

.quick-links[data-nav-inline] {
  display: flex;
}

.quick-links a {
  text-decoration: none;
  color: var(--ink);
  position: relative;
}

.quick-links a.active {
  color: var(--accent);
}

.quick-links a.active::after {
  width: 100%;
}

.quick-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width 0.3s ease;
}

.quick-links a:hover::after {
  width: 100%;
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #fff;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  z-index: 31;
}

.nav-toggle span {
  width: 20px;
  height: 2px;
  background: var(--ink);
  display: block;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-open .nav-toggle span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-open .nav-toggle span:nth-child(2) {
  opacity: 0;
}

.nav-open .nav-toggle span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  gap: clamp(2rem, 4vw, 4rem);
  align-items: center;
}

.portfolio {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.portfolio-header {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 1.5rem;
  align-items: start;
}

.portfolio-header h1 {
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(2.2rem, 3.6vw, 3rem);
  line-height: 1.1;
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
}

.portfolio-card {
  border-radius: 12px;
  border: 1px solid var(--line);
  padding: 1.6rem;
  background: #fff;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  min-height: 220px;
}

.portfolio-card h2 {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.4rem;
}

.portfolio-card p {
  color: var(--ink-soft);
}

.portfolio-meta {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.pill {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
}

.portfolio-link {
  text-decoration: none;
  font-weight: 600;
  color: var(--accent);
  margin-top: auto;
}

.portfolio-link:hover {
  color: var(--ink);
}

.hero.contact {
  align-items: start;
}

.hero-copy {
  animation: fade-up 0.6s ease-out both;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 1rem;
}

.hero-copy h1 {
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(2.35rem, 4vw, 3.4rem);
  line-height: 1.07;
  margin-bottom: 1rem;
}

.lead {
  color: var(--ink-soft);
  font-size: 1.05rem;
  max-width: 540px;
  margin-bottom: 1.5rem;
}

.form-subscribe {
  display: flex;
  gap: 0.8rem;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.form-subscribe .form {
  min-width: 240px;
  flex: 1 1 220px;
  padding: 0.85rem 1rem;
  border-radius: 6px;
  border: 1px solid var(--line);
  background-color: #fff;
  font-size: 0.98rem;
}

.form-subscribe button {
  padding: 0.85rem 1.8rem;
  border-radius: 6px;
  border: 1px solid var(--ink);
  background: transparent;
  color: var(--ink);
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.form-subscribe button:hover {
  transform: translateY(-1px);
  background: var(--ink);
  color: #fff;
  box-shadow: 0 8px 16px rgba(13, 20, 23, 0.18);
}

.contact-details {
  display: grid;
  gap: 0.6rem;
  margin-top: 1.2rem;
  color: var(--ink-soft);
}

.contact-details strong {
  color: var(--ink);
  font-weight: 600;
}

.highlights {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.highlight {
  padding: 0.55rem 1.1rem;
  border-radius: 4px;
  background: #fff;
  border: 1px solid var(--line);
  font-weight: 600;
  font-size: 0.95rem;
  animation: fade-up 0.6s ease-out both;
}

.highlight:nth-child(1) {
  animation-delay: 0.1s;
}

.highlight:nth-child(2) {
  animation-delay: 0.2s;
}

.highlight:nth-child(3) {
  animation-delay: 0.3s;
}

.highlight:nth-child(4) {
  animation-delay: 0.4s;
}

.hero-panel {
  background: var(--panel);
  border-radius: 8px;
  padding: 2rem;
  box-shadow: none;
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 2rem;
  animation: fade-up 0.6s ease-out both;
  animation-delay: 0.15s;
}

.contact-form {
  display: grid;
  gap: 0.9rem;
}

.contact-form .form {
  width: 100%;
  background: #fff;
  border: 1px solid rgba(15, 111, 92, 0.2);
  border-radius: 10px;
  padding: 0.85rem 1rem;
  font-size: 0.98rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.contact-form .form::placeholder {
  color: rgba(14, 17, 20, 0.5);
}

.contact-form .form:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(15, 111, 92, 0.15);
}

.contact-form textarea.form {
  resize: vertical;
  min-height: 120px;
}

.contact-form button {
  border-radius: 10px;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #fff;
  padding: 0.85rem 1.2rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.contact-form button:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(14, 17, 20, 0.18);
}

.countdown-title {
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.75rem;
  margin-bottom: 1rem;
  color: var(--ink-soft);
}

.countdown-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
}

.tile {
  border-radius: 6px;
  padding: 1.2rem;
  background: #fff;
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  align-items: flex-start;
}

.tile span:first-child {
  font-family: "Space Grotesk", sans-serif;
  font-size: 2rem;
}

.tile .small {
  font-size: 0.85rem;
  color: var(--ink-soft);
}

.countdown-note {
  margin-top: 1rem;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.signal-title {
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.signal-text {
  color: var(--ink-soft);
  margin-bottom: 1rem;
}

.icon-list {
  list-style: none;
  display: flex;
  gap: 0.8rem;
}

.icon-link {
  width: 42px;
  height: 42px;
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  text-decoration: none;
  transition: transform 0.2s ease, background 0.2s ease;
}

.icon-link:hover {
  transform: translateY(-2px);
  background: var(--accent);
  color: #fff;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(18px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media screen and (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
  }

  .hero-panel {
    width: 100%;
  }

  .portfolio-header {
    grid-template-columns: 1fr;
  }

  .portfolio-grid {
    grid-template-columns: 1fr;
  }
}

@media screen and (max-width: 600px) {
  :root {
    --header-height: 68px;
  }

  .page {
    padding-top: calc(1.5rem + var(--header-height));
    padding-right: 1.5rem;
    padding-bottom: 1.5rem;
    padding-left: 1.5rem;
  }

  .brand {
    display: grid;
    grid-template-columns: auto 1fr auto;
    grid-template-areas: "logo text toggle";
    align-items: center;
    gap: 0.75rem 1rem;
  }

  .brand-mark {
    grid-area: logo;
  }

  .brand-text {
    grid-area: text;
  }

  .nav-toggle {
    grid-area: toggle;
    justify-self: end;
  }

  .quick-links {
    display: none;
  }

  .quick-links[data-nav-inline] {
    display: none;
  }

  .nav-toggle {
    display: inline-flex;
  }


  .hero-panel {
    padding: 1.5rem;
  }

  .countdown-grid {
    grid-template-columns: 1fr 1fr;
  }

  .form-subscribe {
    align-items: stretch;
  }

  .form-subscribe button {
    width: 100%;
  }
}

.nav-overlay {
  position: fixed;
  inset: 0;
  background: rgba(14, 17, 20, 0.45);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
  z-index: 20;
}

.nav-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  right: auto;
  background: #fff;
  border-radius: 16px;
  border: 1px solid var(--line);
  padding: 1.5rem;
  box-shadow: 0 24px 60px rgba(14, 17, 20, 0.18);
  transform: translate(-50%, calc(-50% - 8px));
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
  z-index: 30;
  width: min(360px, calc(100% - 2rem));
  max-height: 80vh;
  overflow: auto;
}

.nav-modal .quick-links {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.nav-modal .quick-links a {
  font-size: 1.05rem;
}

.nav-open .nav-overlay,
.nav-open .nav-modal {
  opacity: 1;
  visibility: visible;
}

.nav-open .nav-modal {
  transform: translate(-50%, -50%);
}

.nav-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #fff;
  font-size: 1.5rem;
  line-height: 1;
  display: grid;
  place-items: center;
  cursor: pointer;
}

.nav-close:hover {
  background: var(--accent-soft);
}
