/* ================================================================
   CREKKA — Home
   Design tokens, base styles and components.
   ================================================================ */

:root {
  /* Color */
  --bg: #F8F6F1;
  --bg-alt: #F4F0E9;
  --text-dark: #17170F;
  --text-gray: #5C5A54;
  --text-nav: #3D3D3A;
  --olive: #5F6A2A;
  --border: #E4E0D6;
  --placeholder-bg: #A8A096;
  --placeholder-bg2: #8C8478;

  /* Typography */
  --font-serif: 'Playfair Display', 'Georgia', serif;
  --font-sans: 'Inter', 'Helvetica Neue', Arial, sans-serif;

  /* Layout */
  --container-width: 1280px;
  --container-padding: 64px;
  --section-padding-lg: 96px;
  --section-padding-md: 72px;

  /* Motion */
  --ease-premium: cubic-bezier(0.16, 1, 0.3, 1);
  --transition-fast: 0.2s ease;
  --transition-base: 0.35s var(--ease-premium);
  --transition-slow: 0.7s var(--ease-premium);
  --reveal-distance: 22px;

  /* Elevation */
  --header-shadow: 0 8px 24px rgba(23, 23, 15, 0.06);
}

/* ================================================================
   Reset & base
   ================================================================ */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  /* A shrinking sticky header changes document height on every scroll-
     state toggle. Without this, the browser's scroll-anchoring feature
     "corrects" scrollY to compensate for that shift, which can nudge it
     back across the toggle threshold and start a flicker loop. */
  overflow-anchor: none;
}

body {
  background-color: var(--bg);
  color: var(--text-dark);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

ul, ol {
  list-style: none;
}

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

svg {
  display: block;
}

button {
  font: inherit;
}

:focus-visible {
  outline: 2px solid var(--olive);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  top: -48px;
  left: 16px;
  z-index: 100;
  background-color: var(--text-dark);
  color: var(--bg);
  padding: 12px 20px;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 600;
  border-radius: 4px;
  transition: top var(--transition-fast);
}

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

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

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

/* ================================================================
   Reveal-on-scroll (Intersection Observer target)
   ================================================================ */

.reveal {
  opacity: 0;
  transform: translateY(var(--reveal-distance));
  transition: opacity var(--transition-slow), transform var(--transition-slow);
  will-change: opacity, transform;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

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

.header {
  position: sticky;
  top: 0;
  z-index: 50;
  width: 100%;
  padding: 34px 0 30px;
  background-color: var(--bg);
  border-bottom: 1px solid transparent;
  box-shadow: none;
  overflow-anchor: none;
  transition: padding var(--transition-base), box-shadow var(--transition-base), border-color var(--transition-base);
}

.header--scrolled {
  padding: 20px 0;
  border-bottom-color: var(--border);
  box-shadow: var(--header-shadow);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 21px;
  letter-spacing: 0.22em;
  color: var(--text-dark);
}

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

.nav__link {
  position: relative;
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-nav);
  padding-bottom: 8px;
  transition: color var(--transition-fast);
}

.nav__link::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1.5px;
  background-color: var(--olive);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition-base);
}

.nav__link:hover {
  color: var(--text-dark);
}

.nav__link:hover::after {
  transform: scaleX(1);
}

.nav__link--active {
  color: var(--text-dark);
}

.nav__link--active::after {
  transform: scaleX(1);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 28px;
  height: 22px;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 20;
}

.nav-toggle span {
  display: block;
  width: 100%;
  height: 1.5px;
  background-color: var(--text-dark);
  transition: transform var(--transition-base), opacity var(--transition-fast);
}

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

.hero {
  width: 100%;
  padding: 76px 0 128px;
}

.hero__inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 40px;
}

.hero__left {
  max-width: 500px;
  flex-shrink: 0;
}

.hero__title {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: 49px;
  line-height: 1.22;
  letter-spacing: -0.005em;
  color: var(--text-dark);
}

.hero__title em {
  font-style: italic;
  font-weight: 400;
}

.hero__text {
  font-family: var(--font-sans);
  font-size: 15.5px;
  font-weight: 400;
  line-height: 1.75;
  color: var(--text-gray);
}

.hero__left .hero__text {
  margin-top: 26px;
  max-width: 300px;
}

.hero__arrow {
  display: inline-flex;
  margin-top: 52px;
  background: none;
  border: none;
  color: var(--text-dark);
  cursor: pointer;
  padding: 0;
  opacity: 0.85;
  animation: arrow-drift 2.8s var(--ease-premium) infinite;
  transition: opacity var(--transition-fast);
}

.hero__arrow:hover {
  opacity: 1;
  animation-play-state: paused;
  transform: translateY(4px);
}

@keyframes arrow-drift {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(6px); }
}

.hero__right {
  max-width: 300px;
  margin-top: 104px;
  flex-shrink: 0;
}

.hero__line {
  display: block;
  width: 56px;
  height: 2px;
  background-color: var(--olive);
  margin-bottom: 30px;
}

.hero__subtitle {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 21px;
  line-height: 1.45;
  color: var(--text-dark);
}

.hero__right .hero__text {
  margin-top: 20px;
}

/* ================================================================
   Full-bleed media (reasons / never images)
   background acts as a loading-state fill behind the lazy image
   ================================================================ */

.reasons__image,
.never__image {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 220px;
  overflow: hidden;
  background: linear-gradient(135deg, var(--placeholder-bg) 0%, var(--placeholder-bg2) 100%);
}

/* Locks the container to the original design proportion whenever the grid
   row can't stretch it (stacked layout on tablet/mobile), so the crop box
   stays consistent regardless of the source photo's own aspect ratio. */
.reasons__image {
  aspect-ratio: 443 / 214;
}

.never__image {
  aspect-ratio: 309 / 202;
}

.reasons__image img,
.never__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.reasons__image img {
  object-position: center 42%;
}

.never__image img {
  object-position: 54% center;
}

/* ================================================================
   Reasons ("Tal vez llegaste hasta acá...")
   ================================================================ */

.reasons {
  width: 100%;
  background-color: var(--bg-alt);
}

.reasons__row {
  display: grid;
  grid-template-columns: 1fr 43.3%;
  align-items: stretch;
}

.reasons__content {
  padding: 64px var(--container-padding);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.reasons__label {
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-nav);
  margin-bottom: 40px;
}

.reasons__list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  max-width: 620px;
}

.reasons__item {
  padding: 0 28px;
  border-left: 1px solid var(--border);
}

.reasons__item:first-child {
  padding-left: 0;
  border-left: none;
}

.reasons__number {
  display: inline-block;
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: 30px;
  color: var(--text-dark);
  padding-bottom: 12px;
  padding-right: 6px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 14px;
}

.reasons__text {
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-nav);
}

.reasons__image {
  min-height: 280px;
}

/* ================================================================
   Process ("Antes de diseñar...")
   ================================================================ */

.process {
  width: 100%;
  background-color: var(--bg);
  padding: var(--section-padding-lg) 0;
}

.process__inner {
  display: grid;
  grid-template-columns: minmax(0, 34%) 1fr;
  gap: 64px;
}

.process__title {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: 33px;
  line-height: 1.28;
  color: var(--text-dark);
  max-width: 340px;
}

.process__text {
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.75;
  color: var(--text-gray);
  margin-top: 24px;
  max-width: 300px;
}

.timeline {
  margin-top: 6px;
}

.timeline__item {
  position: relative;
  display: grid;
  grid-template-columns: 46px 1fr;
  align-items: start;
  padding: 18px 0;
  border-top: 1px solid var(--border);
}

.timeline__item:last-child {
  border-bottom: 1px solid var(--border);
}

.timeline__marker {
  position: absolute;
  left: -33px;
  top: 50%;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: 1.5px solid var(--olive);
  background-color: var(--bg);
  transform: translate(-50%, -50%);
  z-index: 1;
}

.timeline__item::before {
  content: '';
  position: absolute;
  left: -33px;
  top: 0;
  bottom: 0;
  width: 1px;
  background-color: var(--olive);
  opacity: 0.55;
}

.timeline__item:first-child::before {
  top: 50%;
}

.timeline__item:last-child::before {
  bottom: 50%;
}

.timeline__number {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 18px;
  color: var(--olive);
  padding-top: 3px;
}

.timeline__title {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 21px;
  color: var(--text-dark);
}

.timeline__text {
  font-family: var(--font-sans);
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--text-gray);
  margin-top: 6px;
}

/* ================================================================
   Build ("Lo que construimos.")
   ================================================================ */

.build {
  width: 100%;
  background-color: var(--bg-alt);
  padding: var(--section-padding-lg) 0;
}

.build__inner {
  display: grid;
  grid-template-columns: minmax(220px, 30%) 1fr;
  gap: 32px;
}

.build__intro {
  padding-right: 32px;
}

.build__title {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: 31px;
  line-height: 1.25;
  color: var(--text-dark);
  max-width: 220px;
}

.build__line {
  display: block;
  width: 44px;
  height: 2px;
  background-color: var(--olive);
  margin: 22px 0;
}

.build__text {
  font-family: var(--font-sans);
  font-size: 14.5px;
  line-height: 1.65;
  color: var(--text-gray);
  max-width: 240px;
}

.build__list {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}

.build__item {
  border-left: 1px solid var(--border);
  transition: transform var(--transition-base);
}

.build__item:hover {
  transform: translateY(-4px);
}

.build__item-link {
  display: block;
  height: 100%;
  padding: 0 28px;
}

.build__icon {
  color: var(--text-dark);
  margin-bottom: 26px;
  transition: color var(--transition-base);
}

.build__item:hover .build__icon {
  color: var(--olive);
}

.build__item-title {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 18px;
  color: var(--text-dark);
  margin-bottom: 12px;
}

.build__item-text {
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.65;
  color: var(--text-gray);
}

/* ================================================================
   Never ("Lo que nunca hacemos.")
   ================================================================ */

.never {
  width: 100%;
  background-color: var(--bg);
}

.never__row {
  display: grid;
  grid-template-columns: 1fr 30.2%;
  align-items: stretch;
}

.never__container {
  padding: 72px var(--container-padding);
  display: grid;
  grid-template-columns: minmax(200px, 30%) 1fr;
  gap: 48px;
  align-items: start;
}

.never__title {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: 29px;
  line-height: 1.3;
  color: var(--text-dark);
}

.never__title em {
  font-style: italic;
}

.never__line {
  display: block;
  width: 44px;
  height: 2px;
  background-color: var(--olive);
  margin-top: 22px;
}

.never__item {
  display: flex;
  align-items: baseline;
  gap: 16px;
  padding: 15px 0;
  border-top: 1px solid var(--border);
}

.never__item:last-child {
  border-bottom: 1px solid var(--border);
}

.never__mark {
  font-family: var(--font-sans);
  font-size: 13px;
  color: var(--text-dark);
  flex-shrink: 0;
}

.never__text {
  font-family: var(--font-sans);
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--text-nav);
}

.never__image {
  min-height: 260px;
}

/* ================================================================
   CTA
   ================================================================ */

.cta {
  width: 100%;
  background-color: var(--bg);
  padding: 100px 0 56px;
}

.cta__inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 32px;
}

.cta__content {
  max-width: 620px;
  margin-left: 12%;
}

.cta__title {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: 29px;
  line-height: 1.4;
  color: var(--text-dark);
}

.cta__tagline {
  display: inline-block;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 17px;
  color: var(--text-dark);
  margin-top: 16px;
  padding-bottom: 6px;
  border-bottom: 1.5px solid var(--olive);
}

.cta__button {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 18px 26px;
  border: 1px solid var(--olive);
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-dark);
  white-space: nowrap;
  transition: background-color var(--transition-base), color var(--transition-base),
              transform var(--transition-base), box-shadow var(--transition-base);
}

.cta__button svg {
  transition: transform var(--transition-base);
}

.cta__button:hover {
  background-color: var(--olive);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(95, 106, 42, 0.25);
}

.cta__button:hover svg {
  transform: translateX(3px);
}

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

.footer {
  width: 100%;
  border-top: 1px solid var(--border);
  padding: 40px 0;
}

.footer__inner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

.footer__brand {
  display: flex;
  align-items: baseline;
  gap: 28px;
}

.footer__logo {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.2em;
  color: var(--text-dark);
}

.footer__tagline {
  font-family: var(--font-sans);
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-gray);
}

.footer__social {
  display: flex;
  gap: 32px;
}

.footer__link,
.footer__email {
  font-family: var(--font-sans);
  font-size: 13.5px;
  color: var(--text-nav);
  transition: color var(--transition-fast);
}

.footer__link:hover,
.footer__email:hover {
  color: var(--olive);
}

/* ================================================================
   Detail — quiet technical-quality note (Website Carbon)
   A small, self-contained card rather than a headline section: it sits
   in the closing rhythm between the CTA and the footer, tinted just
   enough to separate it from the page background, meant to be noticed
   only by whoever reads the page all the way through.
   ================================================================ */

.detail {
  width: 100%;
  background-color: var(--bg);
  padding: 8px 0 88px;
}

.detail__card {
  max-width: 460px;
  padding: 36px 40px;
  background-color: var(--bg-alt);
  border: 1px solid var(--border);
}

.detail__eyebrow {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 500;
  font-size: 17px;
  color: var(--text-dark);
  margin-bottom: 14px;
}

.detail__text {
  font-family: var(--font-sans);
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--text-gray);
}

.detail__text strong {
  color: var(--olive);
  font-weight: 600;
}

.detail__stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin-top: 18px;
}

.detail__stats li {
  position: relative;
  padding-left: 14px;
  font-family: var(--font-sans);
  font-size: 12px;
  letter-spacing: 0.01em;
  color: var(--text-nav);
}

.detail__stats li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 7px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background-color: var(--olive);
}

.detail__link {
  display: inline-block;
  margin-top: 22px;
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-gray);
  transition: color var(--transition-fast);
}

.detail__link:hover {
  color: var(--olive);
}

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

@media (max-width: 1080px) {
  :root {
    --container-padding: 40px;
  }

  .hero__title {
    font-size: 44px;
  }

  .hero__right {
    margin-top: 90px;
    max-width: 260px;
  }

  .process__inner {
    grid-template-columns: minmax(0, 40%) 1fr;
    gap: 40px;
  }

  .build__inner {
    grid-template-columns: minmax(200px, 26%) 1fr;
  }

  .build__list {
    grid-template-columns: repeat(2, 1fr);
    row-gap: 40px;
  }

  .build__item:nth-child(2n+1) {
    border-left: none;
  }

  .build__item:nth-child(2n+1) .build__item-link {
    padding-left: 0;
  }

  .never__container {
    grid-template-columns: minmax(160px, 26%) 1fr;
    gap: 32px;
  }

  .cta__content {
    margin-left: 4%;
  }
}

@media (max-width: 860px) {
  .reasons__row {
    grid-template-columns: 1fr;
  }

  .reasons__image {
    min-height: 220px;
  }

  .reasons__list {
    max-width: 100%;
  }

  .process__inner {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .process__title,
  .process__text {
    max-width: 100%;
  }

  .build__inner {
    grid-template-columns: 1fr;
    gap: 44px;
  }

  .build__intro {
    padding-right: 0;
  }

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

  .build__item:nth-child(2n+1) {
    border-left: none;
  }

  .build__item:nth-child(2n+1) .build__item-link {
    padding-left: 0;
  }

  .build__title,
  .build__text {
    max-width: 100%;
  }

  .never__row {
    grid-template-columns: 1fr;
  }

  .never__container {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .never__image {
    min-height: 220px;
  }

  .cta__inner {
    flex-direction: column;
    gap: 32px;
  }

  .cta__content {
    margin-left: 0;
    max-width: 100%;
  }

  .footer__inner {
    flex-direction: column;
    gap: 24px;
  }

  .nav-toggle {
    display: flex;
  }

  .nav {
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    width: min(320px, 80vw);
    background-color: var(--bg);
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 30px;
    padding: 40px;
    box-shadow: -8px 0 30px rgba(0, 0, 0, 0.08);
    transform: translateX(100%);
    transition: transform var(--transition-base);
    z-index: 15;
  }

  .nav.is-open {
    transform: translateX(0);
  }

  .nav-toggle.is-open span:nth-child(1) {
    transform: translateY(6.5px) rotate(45deg);
  }

  .nav-toggle.is-open span:nth-child(2) {
    opacity: 0;
  }

  .nav-toggle.is-open span:nth-child(3) {
    transform: translateY(-6.5px) rotate(-45deg);
  }

  .hero__inner {
    flex-direction: column;
    gap: 64px;
  }

  .hero__left,
  .hero__right {
    max-width: 100%;
  }

  .hero__right {
    margin-top: 0;
  }
}

@media (max-width: 520px) {
  :root {
    --container-padding: 24px;
  }

  .detail {
    padding: 0 0 64px;
  }

  .detail__card {
    padding: 28px 24px;
  }

  .header {
    padding: 26px 0 24px;
  }

  .header--scrolled {
    padding: 16px 0;
  }

  .hero {
    padding: 56px 0 80px;
  }

  .hero__title {
    font-size: 34px;
  }

  .hero__title br {
    display: none;
  }

  .hero__left .hero__text br,
  .hero__right .hero__text br,
  .hero__subtitle br {
    display: none;
  }

  .reasons__content {
    padding: 48px 24px;
  }

  .reasons__list {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .reasons__item {
    padding: 0;
    border-left: none;
  }

  .process {
    padding: 64px 0;
  }

  .process__title {
    font-size: 27px;
  }

  .timeline__item {
    grid-template-columns: 1fr;
    row-gap: 4px;
  }

  .timeline__number {
    padding-top: 0;
  }

  .build {
    padding: 64px 0;
  }

  .build__list {
    grid-template-columns: 1fr;
    row-gap: 40px;
  }

  .build__item {
    border-left: none;
  }

  .build__item-link {
    padding: 0;
  }

  .build__item:hover {
    transform: none;
  }

  .never__container {
    padding: 56px 24px;
  }

  .never__title {
    font-size: 25px;
  }

  .cta {
    padding: 72px 0 48px;
  }

  .cta__title {
    font-size: 24px;
  }

  .never__text br {
    display: none;
  }
}
