/* ==========================================================================
   MGS DEV - design tokens
   ========================================================================== */

:root {
  --bg-page: #f4f2ee;
  --bg-hero: #f0f0f0;
  --bg-portrait: #d3d1cc;
  --bg-icon: #ecebe6;

  --color-text: #14171a;
  --color-text-muted: #6b6f76;
  --color-text-soft: #8a8e94;

  --color-btn-bg: #14181c;
  --color-btn-bg-hover: #2a2f36;
  --color-btn-text: #ffffff;

  --color-border-soft: rgba(20, 23, 26, 0.05);

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
    'Helvetica Neue', Arial, sans-serif;
  --font-mono: 'JetBrains Mono', 'Consolas', 'SF Mono', 'Menlo', 'Monaco',
    'Courier New', monospace;

  --container-max: 1200px;
  --container-pad-x: 32px;

  --radius-btn: 10px;
  --radius-card: 18px;

  --shadow-btn: 0 2px 10px rgba(20, 24, 28, 0.10);
}

/* ==========================================================================
   Base / reset
   ========================================================================== */

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

html,
body {
  margin: 0;
  padding: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  background: var(--bg-page);
  color: var(--color-text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: 'cv11', 'ss01';
}

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

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

button {
  font: inherit;
  background: none;
  border: 0;
  cursor: pointer;
  color: inherit;
}

h1,
h2,
h3,
h4,
p {
  margin: 0;
}

/* ==========================================================================
   Layout
   ========================================================================== */

.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg-page);
}

.page__main {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-pad-x);
}

/* ==========================================================================
   Section
   ========================================================================== */

.section {
  padding: 72px 0 80px;
}

.section--alt {
  background: var(--bg-hero);
}

.section--compact {
  padding: 44px 0 52px;
}

.page__main > .section:last-child {
  padding-bottom: 96px;
}

.section p {
  font-size: 15px;
  line-height: 1.6;
  color: var(--color-text-muted);
}

.section-heading {
  font-weight: 700;
  font-size: clamp(26px, 3vw, 34px);
  letter-spacing: -0.02em;
  color: var(--color-text);
  margin-bottom: 36px;
}

/* ==========================================================================
   Motion (subtle reveal on scroll)
   ========================================================================== */

.has-reveal [data-reveal] {
  opacity: 0;
  transform: translate3d(0, 10px, 0);
  transition:
    opacity 560ms cubic-bezier(0.22, 1, 0.36, 1),
    transform 560ms cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: var(--reveal-delay, 0ms);
}

.has-reveal [data-reveal].is-visible {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

/* ==========================================================================
   Prose (constrained-width text block)
   ========================================================================== */

.prose {
  max-width: 640px;
}

.prose p + p {
  margin-top: 18px;
}

#about .prose p {
  font-size: 19px;
}

#about .prose {
  max-width: 760px;
}

.prose + .btn {
  margin-top: 28px;
}

/* ==========================================================================
   Button
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 22px;
  border-radius: var(--radius-btn);
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.01em;
  transition: background-color 160ms ease, transform 160ms ease;
  white-space: nowrap;
}

.btn--primary {
  background: var(--color-btn-bg);
  color: var(--color-btn-text);
  box-shadow: var(--shadow-btn);
}

.btn--primary:hover {
  background: var(--color-btn-bg-hover);
}

.btn--primary:active {
  transform: translateY(1px);
}

.btn--lg {
  padding: 14px 28px;
  font-size: 16px;
}

/* ==========================================================================
   Grid
   ========================================================================== */

.grid {
  display: grid;
}

.grid--2col {
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
}

.grid--3col {
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
}

/* ==========================================================================
   Card
   ========================================================================== */

.card {
  background: var(--bg-page);
  border-radius: var(--radius-card);
  padding: 32px;
}

.card__title {
  font-size: 17px;
  font-weight: 600;
  color: var(--color-text);
  letter-spacing: -0.01em;
  margin-bottom: 10px;
}

/* ==========================================================================
   Media row (icon + text side-by-side)
   ========================================================================== */

.media-row {
  display: flex;
  align-items: flex-start;
  gap: 18px;
}

.media-row__body {
  flex: 1;
  min-width: 0;
}

.media-row__title {
  font-size: 16px;
  font-weight: 600;
  color: var(--color-text);
  letter-spacing: -0.01em;
  margin-bottom: 6px;
}

/* ==========================================================================
   Icon circle
   ========================================================================== */

.icon-circle {
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--bg-icon);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text);
}

.icon-circle svg {
  width: 26px;
  height: 26px;
}

/* ==========================================================================
   Header
   ========================================================================== */

.site-header {
  width: 100%;
  background: var(--bg-page);
}

.site-header__inner {
  padding-top: 26px;
  padding-bottom: 26px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

.site-header__logo {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 22px;
  letter-spacing: -0.05em;
  color: var(--color-text);
  text-transform: uppercase;
}

.site-header__nav {
  display: flex;
  align-items: center;
  gap: 36px;
}

.site-header__link {
  font-size: 15px;
  font-weight: 500;
  color: var(--color-text);
  letter-spacing: -0.005em;
  transition: opacity 160ms ease;
}

.site-header__link:hover {
  opacity: 0.65;
}

/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
  position: relative;
  background: var(--bg-hero);
  overflow: hidden;
}

.hero__portrait {
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  transform: translateX(-50%);
  width: clamp(440px, 52%, 720px);
  background-image: url('/portrait.webp');
  background-repeat: no-repeat;
  background-position: center bottom;
  background-size: contain;
  pointer-events: none;
  z-index: 0;
}

.hero__inner {
  position: relative;
  z-index: 1;
  padding-top: 56px;
  padding-bottom: 64px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: clamp(280px, 36vw, 520px);
  align-items: center;
  min-height: 560px;
}

.hero__col {
  display: flex;
  flex-direction: column;
}

.hero__col--left {
  justify-content: center;
}

.hero__col--right {
  justify-content: center;
  align-items: flex-start;
}

.hero__headline,
.hero__headline--second {
  font-weight: 700;
  font-size: clamp(38px, 4.4vw, 52px);
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: var(--color-text);
}

.hero__headline--second {
  margin-top: 22px;
}

.hero__headline-line {
  display: block;
}

.hero__byline,
.hero__copy {
  font-size: 15px;
  line-height: 1.6;
  color: var(--color-text-muted);
}

.hero__byline {
  margin-top: 28px;
}

.hero__byline-prefix {
  display: block;
}

.hero__byline-name {
  display: block;
  font-weight: 600;
  color: var(--color-text);
  margin-top: 2px;
}

.hero__subheadline {
  font-weight: 700;
  font-size: clamp(22px, 2vw, 26px);
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--color-text);
}

.hero__subheadline-line {
  display: block;
}

.hero__copy {
  margin-top: 18px;
  max-width: 280px;
}

.hero__cta {
  margin-top: 28px;
  align-self: flex-start;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
  border-top: 1px solid var(--color-border-soft);
  background: var(--bg-page);
}

.site-footer__inner {
  padding-top: 24px;
  padding-bottom: 28px;
}

.site-footer__copy {
  font-size: 13px;
  line-height: 1.5;
  color: var(--color-text-soft);
}

.site-footer__link {
  color: var(--color-text-muted);
  transition: opacity 160ms ease;
}

.site-footer__link:hover {
  opacity: 0.72;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 900px) {
  .hero__inner {
    grid-template-columns: 1fr 1fr;
    column-gap: clamp(160px, 26vw, 300px);
    min-height: 460px;
    padding-top: 36px;
    padding-bottom: 36px;
  }

  .hero__portrait {
    width: min(48%, 440px);
  }

  .grid--3col {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .grid--2col {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  :root {
    --container-pad-x: 22px;
  }

  .site-header__nav {
    gap: 18px;
  }

  .site-header__link {
    display: none;
  }

  .hero {
    padding: 0;
  }

  .hero__portrait {
    top: 14px;
    right: 14px;
    bottom: auto;
    left: auto;
    transform: none;
    width: 58%;
    height: 70%;
    max-width: 310px;
    max-height: 380px;
    background-image:
      linear-gradient(
        to bottom,
        transparent 0%,
        transparent 55%,
        var(--bg-hero) 100%
      ),
      url('/portrait.webp');
    background-position: center top, center bottom;
    background-size: 100% 100%, contain;
    background-repeat: no-repeat, no-repeat;
  }

  .hero__inner {
    grid-template-columns: 1fr;
    column-gap: 0;
    row-gap: 24px;
    padding-top: 28px;
    padding-bottom: 40px;
    min-height: 0;
    text-align: left;
  }

  .hero__col--left {
    padding-right: 58%;
  }

  .hero__col--right {
    align-items: flex-start;
    padding-right: 0;
  }

  .hero__headline,
  .hero__headline--second {
    font-size: clamp(30px, 7.5vw, 40px);
  }

  .hero__byline {
    margin-top: 20px;
  }

  .section--compact {
    padding: 32px 0 40px;
  }

  .section {
    padding: 48px 0 56px;
  }

  .page__main > .section:last-child {
    padding-bottom: 64px;
  }
}
