:root {
  /* Palette from the t:inc studios design system: warm paper grounds,
     espresso ink, clay as the single accent voice. */
  --bg-topbar: #E2D9C9;
  --bg-page: #F6F1E9;
  --accent: #B4502E;
  --text-on-accent: #FBF8F2;
  --pill-white: #FBF8F2;
  --pill-hover: #EFE8DB;
  --text-dark: #241F19;
  --text-muted: #756A5C;
  --circle-gray: #D8CBB6;
  --border-soft: #D8CBB6;
  --font-serif: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font-sans: 'Jost', -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

/* Class selectors like .lightbox{display:flex} outrank the UA [hidden] rule. */
[hidden] {
  display: none !important;
}

html, body {
  height: 100%;
}

body {
  margin: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  font-family: var(--font-sans);
  color: var(--text-dark);
  background: var(--bg-page);
}

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

/* ---------- Page transition (desktop) ---------- */

@view-transition {
  navigation: auto;
}

::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: 260ms;
  animation-timing-function: ease;
}

@media (max-width: 768px) {
  ::view-transition-old(root),
  ::view-transition-new(root) {
    animation: none;
  }
}

@media (min-width: 769px) {
  ::view-transition-old(root) {
    animation-name: tinc-slide-out;
  }

  ::view-transition-new(root) {
    animation-name: tinc-slide-in;
  }
}

@keyframes tinc-slide-out {
  to {
    transform: translateX(-32px);
    opacity: 0;
  }
}

@keyframes tinc-slide-in {
  from {
    transform: translateX(32px);
    opacity: 0;
  }
}

/* ---------- Topbar ---------- */

.topbar {
  padding: 20px;
}

.topbar-inner {
  max-width: 1200px;
  margin: 0 auto;
  background: var(--bg-topbar);
  border-radius: 24px;
  padding: 14px 24px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  column-gap: 16px;
}

/* Logo */

.logo {
  display: block;
  flex-shrink: 0;
  grid-column: 1;
  justify-self: start;
}

.logo-full img {
  display: block;
  height: 92px;
  width: auto;
}

.logo-compact {
  display: none;
}

.logo-compact img {
  display: block;
  height: 56px;
  width: auto;
}

/* Desktop nav */

.nav-desktop {
  display: flex;
  align-items: center;
  gap: 12px;
  grid-column: 2;
  justify-self: center;
}

.nav-btn {
  background: var(--pill-white);
  color: var(--text-dark);
  font-weight: 600;
  padding: 12px 28px;
  border-radius: 999px;
  white-space: nowrap;
  transition: background 0.2s ease, color 0.2s ease;
}

.nav-btn.active {
  background: var(--accent);
  color: var(--text-on-accent);
}

.nav-btn:hover:not(.active) {
  background: var(--pill-hover);
}

/* Language toggle */

.lang-toggle {
  background: var(--circle-gray);
  border: none;
  color: var(--text-dark);
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  flex-shrink: 0;
}

.lang-toggle-desktop {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  grid-column: 3;
  justify-self: end;
}

.lang-toggle-mobile {
  width: 100%;
  padding: 14px;
  border-radius: 999px;
  margin-top: 8px;
}

/* Hamburger */

.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: flex-end;
  gap: 6px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 12px;
  grid-column: 3;
  justify-self: end;
}

.hamburger span {
  display: block;
  width: 32px;
  height: 2px;
  background: var(--text-dark);
  transition: transform 0.2s ease, opacity 0.2s ease, width 0.2s ease;
}

.hamburger span:nth-child(2) {
  width: 24px;
}

.hamburger.open span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
  width: 32px;
}

.hamburger.open span:nth-child(2) {
  opacity: 0;
}

.hamburger.open span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
  width: 32px;
}

/* Mobile nav panel */

.nav-mobile {
  display: none;
  flex-direction: column;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.25s ease, padding 0.25s ease;
  padding: 0 6px;
}

.nav-mobile.open {
  max-height: 400px;
  padding: 16px 6px 6px;
}

.nav-mobile a {
  padding: 14px 12px;
  font-weight: 600;
  border-top: 1px solid var(--border-soft);
}

.nav-mobile a:first-child {
  border-top: none;
}

/* ---------- Responsive ---------- */

@media (max-width: 768px) {
  .nav-desktop,
  .lang-toggle-desktop {
    display: none;
  }

  .logo-full {
    display: none;
  }

  .logo-compact {
    display: block;
  }

  .hamburger {
    display: flex;
  }

  .nav-mobile {
    display: flex;
  }
}

/* ---------- Page content ---------- */

main {
  flex: 1 0 auto;
  max-width: 900px;
  width: 100%;
  margin: 0 auto;
  padding: clamp(56px, 9vw, 110px) 24px 80px;
}

.eyebrow {
  font-family: var(--font-sans);
  text-transform: uppercase;
  letter-spacing: 0.28em;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  margin: 0 0 18px;
}

.page-section h1,
.placeholder-section h1 {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  line-height: 1.08;
  letter-spacing: -0.01em;
  margin: 0 0 28px;
}

.section-divider {
  width: 64px;
  height: 1px;
  background: var(--text-dark);
  opacity: 0.2;
  border: none;
  margin: 0 0 36px;
}

.page-section p,
.placeholder-section p {
  color: var(--text-muted);
  font-size: 1.05rem;
  line-height: 1.75;
  max-width: 640px;
}

.page-section p + p {
  margin-top: 20px;
}

/* ---------- Founder bio ---------- */

.founder {
  margin-top: 56px;
}

.founder .section-divider {
  margin-bottom: 44px;
}

.founder-inner {
  display: grid;
  grid-template-columns: minmax(0, 0.72fr) minmax(0, 1fr);
  gap: 44px;
  align-items: start;
}

.founder-photo img {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 20px;
  background: var(--bg-topbar);
}

.founder-text h2 {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 1.55rem;
  line-height: 1.2;
  margin: 0 0 22px;
}

.founder-text p {
  max-width: none;
}

.founder-text p + p {
  margin-top: 20px;
}

/* No portrait on file yet: drop the empty column so the bio reads as intended. */
.founder-inner.founder-no-photo {
  grid-template-columns: 1fr;
}

.founder-no-photo .founder-photo {
  display: none;
}

.founder-no-photo .founder-text p {
  max-width: 640px;
}

@media (max-width: 768px) {
  .founder-inner {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .founder-photo {
    max-width: 320px;
  }
}

/* ---------- Legal content (privacy policy) ---------- */

.legal-content {
  max-width: 720px;
}

.legal-content .legal-updated {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin: -12px 0 40px;
}

.legal-content h2 {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 1.35rem;
  line-height: 1.3;
  color: var(--text-dark);
  margin: 40px 0 14px;
}

.legal-content h2:first-of-type {
  margin-top: 0;
}

.legal-content p,
.legal-content li {
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.75;
  max-width: none;
}

.legal-content ul {
  margin: 0 0 4px;
  padding-left: 22px;
}

.legal-content li + li {
  margin-top: 10px;
}

.legal-content p + p,
.legal-content ul + p {
  margin-top: 16px;
}

.legal-content a {
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ---------- Projects grid ---------- */

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 48px 40px;
  margin-top: 48px;
  max-width: none;
}

.project-card {
  display: block;
}

.project-image {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  border-radius: 20px;
  overflow: hidden;
  margin-bottom: 20px;
  background: var(--bg-topbar);
}

.project-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project-example-tag {
  position: absolute;
  top: 14px;
  left: 14px;
  background: var(--accent);
  color: var(--text-on-accent);
  font-family: var(--font-sans);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 999px;
}

.projects-grid .project-meta {
  font-family: var(--font-sans);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  max-width: none;
  margin: 0 0 8px;
}

.project-title {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 1.5rem;
  margin: 0 0 10px;
  color: var(--text-dark);
}

.projects-grid .project-description {
  color: var(--text-muted);
  font-size: 0.98rem;
  line-height: 1.65;
  max-width: none;
}

.projects-grid .project-description + .project-description {
  margin-top: 12px;
}

/* ---------- Project gallery lightbox ---------- */

.project-image[data-gallery] {
  cursor: zoom-in;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 999;
  background: rgba(36, 31, 25, 0.94);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.lightbox-stage {
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: min(1100px, 100%);
  max-height: 100%;
}

.lightbox-stage img {
  display: block;
  max-width: 100%;
  max-height: calc(100vh - 140px);
  border-radius: 12px;
  object-fit: contain;
}

.lightbox-close,
.lightbox-nav {
  position: fixed;
  background: rgba(255, 255, 255, 0.14);
  border: none;
  color: #fff;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
}

.lightbox-close:hover,
.lightbox-nav:hover {
  background: rgba(255, 255, 255, 0.28);
}

.lightbox-close {
  top: 24px;
  right: 24px;
  width: 44px;
  height: 44px;
  font-size: 1.6rem;
  line-height: 1;
}

.lightbox-nav {
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  font-size: 1.8rem;
  line-height: 1;
}

.lightbox-prev {
  left: 24px;
}

.lightbox-next {
  right: 24px;
}

.lightbox-counter {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  margin: 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.85rem;
  letter-spacing: 0.12em;
}

@media (max-width: 768px) {
  .lightbox {
    padding: 12px;
  }

  .lightbox-prev {
    left: 10px;
  }

  .lightbox-next {
    right: 10px;
  }

  .lightbox-close {
    top: 14px;
    right: 14px;
  }
}

/* ---------- Contact form ---------- */

.contact-email {
  display: inline-block;
  margin: 20px 0 44px;
  font-family: var(--font-serif);
  font-size: 1.3rem;
  color: var(--text-dark);
  border-bottom: 1px solid var(--text-dark);
  padding-bottom: 2px;
}

.contact-form {
  max-width: 480px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

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

.form-row label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-muted);
  font-weight: 600;
}

.form-row input,
.form-row textarea {
  font-family: var(--font-sans);
  font-size: 1rem;
  color: var(--text-dark);
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--border-soft);
  padding: 8px 2px;
  resize: vertical;
  transition: border-color 0.2s ease;
}

.form-row input:focus,
.form-row textarea:focus {
  outline: none;
  border-color: var(--text-dark);
}

.form-submit {
  align-self: flex-start;
  margin-top: 8px;
  background: var(--accent);
  color: var(--text-on-accent);
  border: none;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 14px 32px;
  border-radius: 999px;
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.form-submit:hover {
  opacity: 0.85;
}

.form-success {
  margin-top: 8px;
  color: var(--text-dark);
  font-size: 1.05rem;
}

.form-error {
  margin-top: 8px;
  color: #A8442E;
  font-size: 1rem;
}

/* ---------- Footer ---------- */

.bottombar {
  flex-shrink: 0;
  padding: 20px;
}

.bottombar-inner {
  max-width: 1200px;
  margin: 0 auto;
  background: var(--bg-topbar);
  border-radius: 24px;
  padding: 28px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.footer-logo img {
  display: block;
  height: 40px;
  width: auto;
}

.footer-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

.footer-nav a {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-dark);
  transition: opacity 0.2s ease;
}

.footer-nav a:hover {
  opacity: 0.6;
}

.footer-instagram {
  display: flex;
  align-items: center;
  color: var(--text-dark);
}

.footer-instagram svg {
  display: block;
}

.footer-meta {
  margin: 0;
  font-size: 0.82rem;
  letter-spacing: 0.02em;
  color: var(--text-muted);
}

@media (max-width: 768px) {
  .bottombar-inner {
    flex-direction: column;
    text-align: center;
    padding: 32px 24px;
  }

  .footer-nav {
    gap: 20px;
    flex-wrap: wrap;
    justify-content: center;
  }
}
