/* ============================================================
   FATAPLUS — We build from a red island
   Palette: laterite soil of Madagascar. Type: Sentient + system-ui.
   ============================================================ */

:root {
  --ground: #f1e7d5;
  --ground-2: #e9dcc2;
  --ink: #261812;
  --ink-2: #6d5948;
  --laterite: #9c3d24;
  --laterite-deep: #6e2815;
  --terracotta: #c9774f;
  --soil: #201410;
  --soil-2: #2a1a13;
  --soil-ink: #e8dcc8;
  --sand: #d9a878;
  --cream: #f5ecdc;

  --serif: "Sentient", "Georgia", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SF Mono", "Menlo", monospace;

  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.05'/%3E%3C/svg%3E");
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  background-color: var(--ground);
  background-image: var(--grain);
  color: var(--ink);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding-left: 1.75rem;
  padding-right: 1.75rem;
}

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

/* ============================================================
   NAV
   ============================================================ */

.site-header { padding: 1.35rem 0 0; }

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

.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 0.35rem;
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.3rem;
  letter-spacing: 0.01em;
}

.brand-dot {
  display: inline-block;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--laterite);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 1.9rem;
  font-size: 0.95rem;
  color: #5f4b39;
}

.main-nav a { transition: color 0.18s ease; }
.main-nav a:hover { color: var(--ink); }

.nav-cta {
  background: var(--laterite);
  color: var(--cream) !important;
  padding: 0.55rem 1.35rem 0.55rem 1.1rem;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%);
  font-weight: 600;
  transition: background 0.18s ease;
}

.nav-cta:hover { background: var(--laterite-deep); }

/* ============================================================
   HERO
   ============================================================ */

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 6rem 0 24rem;
  overflow: hidden;
}

.hero-gps {
  font-family: var(--mono);
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  color: var(--ink-2);
  margin-bottom: 2.2rem;
}

.hero-title {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(3.4rem, 9vw, 8.2rem);
  line-height: 0.98;
  letter-spacing: -0.02em;
}

.hero-title em {
  font-style: italic;
  font-weight: 700;
  color: var(--laterite);
}

.hero-sub {
  margin-top: 2.2rem;
  max-width: 34rem;
  font-size: 1.12rem;
  color: var(--ink-2);
}

.hero-actions {
  margin-top: 2.6rem;
  display: flex;
  align-items: center;
  gap: 2.3rem;
}

.btn-primary {
  display: inline-block;
  background: var(--laterite);
  color: var(--cream);
  font-weight: 600;
  font-size: 1.02rem;
  padding: 1rem 2.2rem 1rem 1.7rem;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%);
  transition: background 0.18s ease;
}

.btn-primary:hover { background: var(--laterite-deep); }

.btn-text {
  font-size: 1.02rem;
  color: var(--laterite-deep);
  font-weight: 600;
  transition: color 0.18s ease;
}

.btn-text:hover { color: var(--laterite); }

/* soil cross-section */

.soil {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 346px;
  background: #57321f;
}

.soil-svg { width: 100%; height: 100%; display: block; }

.strata-1 { fill: #9c3d24; }
.strata-2 { fill: #c9774f; }
.strata-3 { fill: #d9a878; }
.strata-4 { fill: #8a5a35; }

.soil-labels {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 100%;
  pointer-events: none;
}

.soil-labels span {
  position: absolute;
  left: 1.75rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
}

.soil-labels span:nth-child(1) { top: 28%; color: var(--cream); }
.soil-labels span:nth-child(2) { top: 46%; color: #4a2a18; }
.soil-labels span:nth-child(3) { top: 65%; color: #4a2a18; }
.soil-labels span:nth-child(4) { top: 84%; color: var(--cream); }

/* ticker */

.ticker {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 46px;
  background: var(--ground-2);
  background-image: var(--grain);
  overflow: hidden;
  display: flex;
  align-items: center;
}

.ticker-track {
  display: flex;
  align-items: center;
  white-space: nowrap;
  animation: ticker 42s linear infinite;
  will-change: transform;
}

.ticker-track span {
  font-family: var(--sans);
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-2);
  padding-right: 2.6rem;
}

.ticker-track span::after {
  content: "·";
  color: var(--laterite);
  padding-left: 2.6rem;
  font-size: 1.1rem;
}

@keyframes ticker {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ============================================================
   SECTIONS (shared)
   ============================================================ */

section { padding: 7.5rem 0; }

.section-num {
  font-family: var(--mono);
  font-size: 0.82rem;
  letter-spacing: 0.1em;
  color: var(--laterite);
  margin-bottom: 1.1rem;
}

.section-title {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(2.2rem, 4.6vw, 3.6rem);
  line-height: 1.02;
  letter-spacing: -0.01em;
}

.section-sub {
  margin-top: 1.2rem;
  max-width: 36rem;
  color: var(--ink-2);
  font-size: 1.06rem;
}

/* ============================================================
   WORK
   ============================================================ */

.work { padding-top: 8rem; }

.work-grid {
  margin-top: 3.8rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem 3rem;
}

.work-visual {
  display: block;
  aspect-ratio: 16 / 10;
  border-radius: 16px;
  overflow: hidden;
}

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

.work-visual-soil {
  background: linear-gradient(180deg,
    #9c3d24 0 18%,
    #c9774f 18% 38%,
    #d9a878 38% 60%,
    #8a5a35 60% 82%,
    #57321f 82% 100%);
  background-image: var(--grain), linear-gradient(180deg,
    #9c3d24 0 18%,
    #c9774f 18% 38%,
    #d9a878 38% 60%,
    #8a5a35 60% 82%,
    #57321f 82% 100%);
}

.work-body { padding-top: 1.15rem; }

.work-name {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.65rem;
  line-height: 1.1;
}

.work-desc {
  margin-top: 0.5rem;
  color: var(--ink-2);
  font-size: 0.98rem;
  max-width: 46ch;
}

.work-meta {
  margin-top: 0.9rem;
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--laterite-deep);
}

.work-link {
  display: inline-block;
  margin-top: 0.75rem;
  font-weight: 600;
  font-size: 0.98rem;
  color: var(--ink);
  transition: color 0.18s ease;
}

.work-link::after { content: " ↗"; color: var(--laterite); }

.work-link:hover { color: var(--laterite); }

/* ============================================================
   LAYERS
   ============================================================ */

.layers {
  background: var(--ground-2);
  background-image: var(--grain);
}

.layers-list {
  margin-top: 4rem;
  display: flex;
  flex-direction: column;
}

.layer {
  display: grid;
  grid-template-columns: 4.5rem 1fr;
  gap: 1.5rem;
  padding: 2.6rem 0;
}

.layer + .layer { border-top: 1px solid rgba(38, 24, 18, 0.14); }

.layer-num {
  font-family: var(--mono);
  font-size: 0.82rem;
  letter-spacing: 0.1em;
  color: var(--laterite);
  padding-top: 0.55rem;
}

.layer-name {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(1.7rem, 3vw, 2.4rem);
  line-height: 1.05;
}

.layer-text {
  margin-top: 0.8rem;
  max-width: 52ch;
  color: var(--ink-2);
  font-size: 1.02rem;
}

/* ============================================================
   CONTACT
   ============================================================ */

.contact { padding: 9rem 0 8rem; }

.contact-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2.5rem;
}

.contact-title {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(2.4rem, 5.2vw, 4.4rem);
  line-height: 1.02;
  letter-spacing: -0.01em;
}

.contact-title em {
  font-style: italic;
  color: var(--laterite);
}

.contact-links {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.6rem;
}

.contact-mail {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(1.4rem, 2.6vw, 2rem);
  color: var(--ink);
  transition: color 0.18s ease;
}

.contact-mail:hover { color: var(--laterite); }

.contact-phone {
  color: var(--ink-2);
  font-weight: 600;
  transition: color 0.18s ease;
}

.contact-phone:hover { color: var(--laterite-deep); }

.contact-gps {
  margin-top: 0.6rem;
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  color: var(--ink-2);
}

/* ============================================================
   FOOTER
   ============================================================ */

.site-footer {
  background: var(--soil);
  background-image: var(--grain);
  color: var(--soil-ink);
  overflow: hidden;
}

.footer-inner {
  padding-top: 4.5rem;
  padding-bottom: 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.footer-line {
  font-size: 0.85rem;
  color: rgba(232, 220, 200, 0.62);
}

.footer-word {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(4.5rem, 17vw, 15.5rem);
  line-height: 0.78;
  text-align: center;
  letter-spacing: 0.07em;
  color: #c05a36;
  margin: 1rem -0.07em -0.12em 0;
  user-select: none;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 900px) {
  .hero { padding-bottom: 17rem; }
  .soil { height: 286px; }
  .soil-labels span:nth-child(1) { top: 27%; }
  .soil-labels span:nth-child(2) { top: 45%; }
  .soil-labels span:nth-child(3) { top: 64%; }
  .soil-labels span:nth-child(4) { top: 83%; }

  .work-grid { grid-template-columns: 1fr; gap: 3rem; }
  section { padding: 5.5rem 0; }
  .work { padding-top: 6rem; }
  .contact { padding: 7rem 0 6rem; }
}

@media (max-width: 640px) {
  .main-nav { gap: 1rem; font-size: 0.88rem; }
  .main-nav a:not(.nav-cta) { display: none; }
  .hero { padding-bottom: 14rem; padding-top: 4rem; }
  .soil { height: 256px; }
  .soil-labels span:nth-child(1) { top: 26%; }
  .soil-labels span:nth-child(2) { top: 44%; }
  .soil-labels span:nth-child(3) { top: 63%; }
  .soil-labels span:nth-child(4) { top: 82%; }
  .hero-title { font-size: clamp(2.9rem, 13vw, 4.2rem); }
  .hero-actions { flex-direction: column; align-items: flex-start; gap: 1.1rem; }
  .layer { grid-template-columns: 1fr; gap: 0.4rem; }
  .layer-num { padding-top: 0; }
  .contact-inner { flex-direction: column; align-items: flex-start; }
  .work-grid { gap: 2.4rem; }
}

/* ============================================================
   MOTION SAFETY
   ============================================================ */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .ticker-track { animation: none; }
}
