/* =========================================================
   HILA LOBEL – site styles
   Palette and fonts are defined once in :root below.
   ========================================================= */
:root {
  --cream: #F5F1E9;
  --sage-light: #DFE2D7;
  --sage: #596B51;
  --sage-deep: #344231;
  --text-2: #74796F;
  /* soft tints taken from the original Canva shapes */
  --wave-1: #CDD1BA;
  --wave-2: #A7AE8D;
  --taupe: #B9ADA2;
  --surface: #FBF9F4;
  --line: rgba(52, 66, 49, 0.12);

  --font: "Fraunces", "Varela Round", system-ui, sans-serif;
  --font-he: "Varela Round", "Fraunces", system-ui, sans-serif;

  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --radius: 14px;
  --gutter: clamp(16px, 4vw, 40px);
  --maxw: 1180px;
  --header-h: 68px;
}

*, *::before, *::after { box-sizing: border-box; }
html { overflow-x: clip; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--sage-deep);
  font-family: var(--font-he);
  font-size: clamp(16px, 1.05vw + 11px, 18px);
  line-height: 1.75;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}
/* Latin text uses Fraunces (soft axis ≈ Recoleta feel) */
[lang="en"] { font-family: var(--font); font-variation-settings: "SOFT" 100; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { font-weight: 400; line-height: 1.25; margin: 0; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
ul { list-style: none; margin: 0; padding: 0; }

.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: clamp(64px, 9vw, 120px); position: relative; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; inset-inline-start: 12px; top: -60px; z-index: 100; background: var(--sage-deep); color: var(--cream); padding: 10px 16px; border-radius: 8px; text-decoration: none; }
.skip-link:focus { top: 12px; }
:focus-visible { outline: 2px solid var(--sage); outline-offset: 3px; border-radius: 6px; }

.section-title { font-size: clamp(28px, 2.4vw + 14px, 42px); color: var(--sage); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 12px 26px;
  background: var(--sage); color: var(--cream);
  border: 1px solid var(--sage); border-radius: 999px;
  font: inherit; font-size: 17px; text-decoration: none; cursor: pointer;
  transition: background-color 200ms ease, color 200ms ease, transform 160ms var(--ease-out);
}
.btn:active { transform: scale(0.97); }
.btn-ghost { background: transparent; color: var(--sage-deep); border-color: rgba(52,66,49,.35); }
.btn-small { min-height: 40px; padding: 8px 18px; font-size: 15px; }
.ico { width: 20px; height: 20px; flex: none; }
@media (hover: hover) and (pointer: fine) {
  .btn:hover { background: var(--sage-deep); border-color: var(--sage-deep); }
  .btn-ghost:hover { background: var(--sage-light); color: var(--sage-deep); border-color: var(--sage-light); }
}

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  height: var(--header-h);
  background: rgba(245, 241, 233, 0.86);
  backdrop-filter: saturate(1.2) blur(10px);
  -webkit-backdrop-filter: saturate(1.2) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color 200ms ease;
}
.site-header.scrolled { border-bottom-color: var(--line); }
.header-inner { height: 100%; display: flex; align-items: center; gap: 28px; }
.header-cta { margin-inline-start: auto; }
.main-nav ul { display: flex; gap: 6px; }
.main-nav a { display: block; padding: 8px 14px; border-radius: 999px; text-decoration: none; color: var(--sage-deep); font-size: 16px; transition: background-color 200ms ease; }
.main-nav a[aria-current="true"] { background: var(--sage-light); }
@media (hover: hover) and (pointer: fine) { .main-nav a:hover { background: var(--sage-light); } }
.menu-toggle { display: none; }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; min-height: min(86vh, 760px); display: flex; align-items: center; padding-block: 48px 72px; }
.hero-shapes { position: absolute; inset: 0; pointer-events: none; }
.hero-shapes span { position: absolute; display: block; }
.stripe { width: 9%; height: 160%; top: -30%; transform: rotate(32deg); transform-origin: center; }
.stripe-1 { left: 14%; background: rgba(205, 209, 186, 0.75); }
.stripe-2 { left: 26%; width: 3.5%; background: rgba(205, 209, 186, 0.55); }
.sq { border-radius: 2px; }
.sq-1 { width: 15%; aspect-ratio: 1.1; top: 4%; right: 6%; background: rgba(167, 174, 141, 0.45); transform: rotate(3deg); }
.sq-2 { width: 14%; aspect-ratio: 0.95; top: 16%; right: 22%; background: rgba(185, 173, 162, 0.28); transform: rotate(-3deg); }
.sq-3 { width: 15%; aspect-ratio: 0.95; top: 22%; right: 32%; background: rgba(223, 226, 215, 0.8); transform: rotate(4deg); }
.sq-4 { width: 16%; aspect-ratio: 1.1; top: 34%; right: 44%; background: rgba(185, 173, 162, 0.3); transform: rotate(-4deg); }

.hero-inner { position: relative; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 48px; }
.hero-mark { grid-column: 2; grid-row: 1; direction: ltr; text-align: left; }
.hero-name { font-size: clamp(22px, 1vw + 16px, 30px); font-weight: 600; color: var(--sage); letter-spacing: -0.01em; margin-bottom: clamp(14px, 1.6vw, 24px); }
.tagline {
  font-size: clamp(44px, 5.6vw, 92px); line-height: 0.95; font-weight: 600;
  color: var(--sage); letter-spacing: -0.015em;
}
.hero-copy { grid-column: 1; grid-row: 1; max-width: 620px; }
.hero h1 { font-size: clamp(34px, 3.6vw + 12px, 64px); color: var(--sage-deep); }
.hero-sub { margin-top: 18px; font-size: clamp(19px, 1.2vw + 12px, 26px); color: var(--text-2); }

/* ---------- About ---------- */
.about-grid { display: grid; grid-template-columns: minmax(240px, 380px) 1fr; gap: clamp(32px, 6vw, 88px); align-items: center; }
.about-photo { margin: 0; position: relative; }
.about-photo::before { content: ""; position: absolute; inset: 8% -8% -6% 10%; background: var(--sage-light); border-radius: var(--radius); z-index: -1; }
.about-photo img { border-radius: var(--radius); aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 30%; width: 100%; }
.about-text p { margin-top: 18px; color: var(--text-2); max-width: 60ch; }
.about-text .section-title { margin-bottom: 6px; }

/* ---------- Services overview ---------- */
.services { overflow: hidden; }
.leaf { position: absolute; pointer-events: none; opacity: .55; }
/* soft light + fine dot grid instead of the cut leaf / wave */
.services .glow { position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(60% 55% at 50% 62%, rgba(223, 226, 215, 0.9), rgba(223, 226, 215, 0) 70%); }
.services::before, .hero::before { content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(rgba(89, 107, 81, 0.18) 1px, transparent 1.3px); background-size: 22px 22px;
  -webkit-mask-image: radial-gradient(70% 60% at 50% 50%, #000 20%, transparent 75%); mask-image: radial-gradient(70% 60% at 50% 50%, #000 20%, transparent 75%); }
.hero::before { -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 45%, transparent 100%); mask-image: linear-gradient(90deg, transparent 0%, #000 45%, transparent 100%); opacity: .7; }
.services-lead { position: relative; max-width: 860px; margin-inline: auto; text-align: center; font-size: clamp(19px, 1.1vw + 13px, 25px); line-height: 1.7; color: var(--sage-deep); }
.service-icons { position: relative; margin-top: clamp(40px, 6vw, 72px); display: grid; grid-template-columns: repeat(5, 1fr); gap: clamp(12px, 2vw, 28px); }
.svc {
  display: flex; flex-direction: column; align-items: center; gap: 14px; height: 100%;
  padding: 22px 12px 20px; border-radius: 18px; text-decoration: none; text-align: center;
  background: rgba(251, 249, 244, 0.6); border: 1px solid var(--line);
  transition: transform 200ms var(--ease-out), box-shadow 200ms var(--ease-out), background-color 200ms ease;
}
.svc img { height: clamp(96px, 11vw, 150px); width: auto; object-fit: contain; transition: transform 240ms var(--ease-out); }
.svc > span { font-size: 17px; line-height: 1.4; color: var(--sage-deep); margin-top: auto; }
.svc-arrow { width: 30px; height: 30px; padding: 6px; border-radius: 50%; border: 1px solid var(--line); color: var(--sage); transition: background-color 200ms ease, color 200ms ease, transform 200ms var(--ease-out); }
.svc:active { transform: scale(0.98); }
@media (hover: hover) and (pointer: fine) {
  .svc:hover { background: var(--surface); box-shadow: 0 14px 34px -18px rgba(52, 66, 49, 0.35); transform: translateY(-3px); }
  .svc:hover img { transform: scale(1.04); }
  .svc:hover .svc-arrow { background: var(--sage); color: var(--cream); transform: translateY(2px); }
}

/* ---------- Service sections ---------- */
.service { overflow-x: clip; }
.service { border-top: 1px solid var(--line); }
.service .container { display: grid; grid-template-columns: minmax(260px, 0.85fr) 1.5fr; gap: clamp(32px, 5vw, 80px); align-items: start; }
.service-head { position: sticky; top: calc(var(--header-h) + 40px); }
.service.alt { background: linear-gradient(180deg, rgba(223, 226, 215, 0.45), rgba(223, 226, 215, 0.2)); }
.service-head { max-width: 880px; }
.service-head p { margin-top: 16px; font-size: clamp(17px, .6vw + 13px, 20px); color: var(--text-2); }
.service-body { display: grid; gap: clamp(24px, 3vw, 40px); }
.service-body .works { grid-template-columns: 1fr 1fr; align-items: start; }

/* Laptop mockup (frame only – screen image unchanged) */
.laptop { width: 100%; }
.laptop-screen {
  background: linear-gradient(#232323, #141414); border-radius: 16px 16px 4px 4px; padding: 2% 2% 2.6%;
  border: 1px solid #5c5c5c; box-shadow: inset 0 0 0 1px rgba(255,255,255,.06), 0 40px 70px -40px rgba(52, 66, 49, 0.55);
}
.laptop-screen img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 2px; background: #eee; }
.laptop-base { position: relative; height: clamp(12px, 1.6vw, 20px); margin-inline: -7%; background: linear-gradient(#b4b4b4, #8f8f8f); border-radius: 2px 2px 14px 14px; }
.laptop-base::before { content: ""; position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 14%; height: 42%; background: #7a7a7a; border-radius: 0 0 8px 8px; }

/* Portfolio cards */
.works { display: grid; gap: 22px; }
.work {
  all: unset; box-sizing: border-box; display: block; width: 100%; cursor: zoom-in;
  border-radius: var(--radius);
}
.work-frame {
  display: block; padding: 10px; background: var(--surface); border-radius: var(--radius);
  border: 1px solid var(--line); box-shadow: 0 18px 40px -28px rgba(52, 66, 49, 0.45);
  transition: transform 220ms var(--ease-out), box-shadow 220ms var(--ease-out);
}
.work-frame img { width: 100%; height: auto; border-radius: 6px; }
/* small source files: keep them small so they stay sharp */
.work-portrait .work-frame { max-width: 280px; margin-inline: auto; }
.work:focus-visible { outline: 2px solid var(--sage); outline-offset: 4px; }
.work:active .work-frame { transform: scale(0.985); }
@media (hover: hover) and (pointer: fine) {
  .work:hover .work-frame { transform: translateY(-3px); box-shadow: 0 26px 50px -28px rgba(52, 66, 49, 0.55); }
}


/* ---------- Contact ---------- */
.contact { overflow: hidden; min-height: 560px; }
.contact-lines { position: absolute; left: 0; bottom: 0; width: min(36vw, 420px); pointer-events: none; opacity: .55; }
.contact-lines svg { display: block; width: 100%; height: auto; }
.contact-invite {
  max-width: 880px; margin: 0 auto clamp(48px, 7vw, 88px); text-align: center;
  padding: clamp(32px, 4.5vw, 56px) clamp(20px, 4vw, 48px);
  background: var(--sage-light); border: 1px solid rgba(89, 107, 81, 0.14); border-radius: 26px;
  font-size: clamp(24px, 1.8vw + 14px, 38px); line-height: 1.35; color: var(--sage-deep);
  box-shadow: 0 24px 60px -40px rgba(52, 66, 49, 0.45);
}
.leaf-c1 { width: min(24vw, 300px); top: 36%; left: 8%; opacity: .6; }
.leaf-c2 { width: min(18vw, 220px); bottom: -8%; left: 32%; opacity: .6; }
.contact-inner { position: relative; }
.contact-list { margin-top: 40px; display: grid; gap: 16px; max-width: 520px; }
.contact-item {
  display: grid; grid-template-columns: 64px 1fr; grid-template-rows: auto auto; column-gap: 18px; align-items: center;
  padding: 16px 20px; border-radius: 18px; text-decoration: none;
  background: rgba(251, 249, 244, 0.85); border: 1px solid var(--line);
  transition: transform 200ms var(--ease-out), box-shadow 200ms var(--ease-out);
}
.contact-item > img, .wa-badge { grid-row: 1 / span 2; width: 64px; height: 56px; object-fit: contain; }
.wa-badge { display: grid; place-items: center; color: var(--wave-2); }
.wa-badge svg { width: 52px; height: 52px; }
.contact-label { font-size: 14px; color: var(--text-2); }
.contact-value { font-size: clamp(18px, 1vw + 12px, 24px); color: var(--sage); font-weight: 600; text-align: start; word-break: break-all; }
[dir="rtl"] .contact-value[dir="ltr"] { text-align: right; }
.contact-item:active { transform: scale(0.98); }
@media (hover: hover) and (pointer: fine) { .contact-item:hover { box-shadow: 0 16px 36px -22px rgba(52, 66, 49, 0.45); transform: translateY(-2px); } }


/* ---------- Lightbox ---------- */
.lightbox { border: 0; padding: 0; background: transparent; max-width: min(94vw, 1400px); max-height: 92vh; overflow: visible; }
.lightbox::backdrop { background: rgba(30, 38, 28, 0.78); }
.lightbox img { max-width: min(94vw, 1400px); max-height: 88vh; width: auto; height: auto; border-radius: 8px; background: #fff; }
.lightbox-close { position: absolute; top: -48px; inset-inline-start: 0; width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--cream); color: var(--sage-deep); font-size: 26px; line-height: 1; cursor: pointer; }
.lightbox { transition: opacity 200ms var(--ease-out), transform 200ms var(--ease-out); }
.lightbox[open] { opacity: 1; transform: none; }
@starting-style { .lightbox[open] { opacity: 0; transform: scale(0.97); } }

/* ---------- Motion: calm, but with presence ---------- */
:root { --ease-io: cubic-bezier(0.77, 0, 0.175, 1); }

/* thin reading-progress line under the header */
.progress { position: absolute; inset-inline: 0; bottom: -1px; height: 2px; background: var(--sage); transform-origin: right center; transform: scaleX(0); opacity: .75; pointer-events: none; }

/* hero entrance (plays once on load) */
@keyframes rise { from { opacity: 0; transform: translateY(18px); filter: blur(4px); } to { opacity: 1; transform: none; filter: none; } }
@keyframes fade-in { from { opacity: 0; } }
.js .hero-name, .js .tagline, .js .hero h1, .js .hero-sub { animation: rise 900ms var(--ease-out) both; }
.js .tagline { animation-delay: 90ms; }
.js .hero h1 { animation-delay: 220ms; }
.js .hero-sub { animation-delay: 360ms; }
.js .hero-shapes span { animation: fade-in 1400ms var(--ease-out) both; }
.js .hero-shapes .sq-1 { animation-delay: 150ms; }
.js .hero-shapes .sq-2 { animation-delay: 260ms; }
.js .hero-shapes .sq-3 { animation-delay: 340ms; }
.js .hero-shapes .sq-4 { animation-delay: 420ms; }
.hero-shapes span { will-change: translate; }

/* laptop screens: fade in only (from partial opacity), no movement */
.js .laptop.reveal { opacity: .3; transform: none; transition: opacity 900ms var(--ease-out); }
.js .laptop.reveal.in { opacity: 1; }

/* gentle stagger for groups */
.js .service-icons li:nth-child(2) { transition-delay: 60ms; }
.js .service-icons li:nth-child(3) { transition-delay: 110ms; }
.js .service-icons li:nth-child(4) { transition-delay: 150ms; }
.js .service-icons li:nth-child(5) { transition-delay: 180ms; }
.js .works li:nth-child(2) { transition-delay: 90ms; }

/* ---------- Scroll reveal (subtle) ---------- */
.js .reveal { opacity: 0; transform: translateY(14px); transition: opacity 600ms var(--ease-out), transform 600ms var(--ease-out); }
.js .reveal.in { opacity: 1; transform: none; }

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 1024px) {
  .service-icons { grid-template-columns: repeat(3, 1fr); }
  .service-body { grid-template-columns: 1fr; }
  .works { grid-template-columns: 1fr 1fr; align-items: start; }
  .hero-inner { grid-template-columns: 1fr; gap: 28px; }
  .hero-mark { grid-column: 1; grid-row: 1; }
  .tagline { font-size: clamp(48px, 9vw, 80px); }
  .service .container { grid-template-columns: 1fr; }
  .service-head { position: static; }
  .hero-copy { grid-row: 2; }
  .leaf-c1, .leaf-c2 { opacity: .35; }
  .hero { min-height: auto; padding-block: 56px 88px; }
  .laptop-base { margin-inline: -4%; }
}

@media (max-width: 760px) {
  :root { --header-h: 60px; }
  .menu-toggle {
    display: grid; place-items: center; width: 44px; height: 44px; margin-inline-start: 4px;
    background: transparent; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; color: var(--sage-deep);
  }
  .bars, .bars::before, .bars::after { display: block; width: 18px; height: 2px; background: currentColor; border-radius: 2px; transition: transform 200ms var(--ease-out), opacity 150ms ease; }
  .bars { position: relative; }
  .bars::before, .bars::after { content: ""; position: absolute; left: 0; }
  .bars::before { top: -6px; } .bars::after { top: 6px; }
  .menu-toggle[aria-expanded="true"] .bars { background: transparent; }
  .menu-toggle[aria-expanded="true"] .bars::before { transform: translateY(6px) rotate(45deg); }
  .menu-toggle[aria-expanded="true"] .bars::after { transform: translateY(-6px) rotate(-45deg); }

  .header-inner { gap: 10px; }
  .header-cta { margin-inline-start: auto; padding-inline: 12px; min-height: 44px; min-width: 44px; }
  .menu-toggle { order: -1; margin-inline-start: 0; }
  .header-cta span { display: none; }
  .main-nav {
    position: absolute; top: var(--header-h); inset-inline: 0; margin: 0;
    background: var(--cream); border-bottom: 1px solid var(--line);
    padding: 8px var(--gutter) 16px;
    opacity: 0; transform: translateY(-6px); visibility: hidden;
    transition: opacity 180ms var(--ease-out), transform 180ms var(--ease-out), visibility 0s 180ms;
  }
  .main-nav.open { opacity: 1; transform: none; visibility: visible; transition: opacity 200ms var(--ease-out), transform 200ms var(--ease-out); }
  .main-nav ul { flex-direction: column; gap: 2px; }
  .main-nav a { padding: 14px 12px; font-size: 18px; border-radius: 12px; }

  .hero { min-height: auto; padding-block: 36px 24px; }
  .stripe-1 { left: 4%; width: 16%; }
  .stripe-2 { left: 26%; width: 6%; }
  .sq-1 { width: 34%; right: -8%; top: 1%; }
  .sq-2, .sq-3 { width: 30%; top: 6%; }
  .sq-2 { right: 18%; } .sq-3 { right: 40%; }
  .sq-4 { display: none; }

  .about-grid { grid-template-columns: 1fr; }
  .about-photo { max-width: 320px; margin-inline: auto; width: 82%; }
  .about-text { text-align: start; }

  .service-icons { grid-template-columns: 1fr 1fr; }
  .service-icons li:last-child { grid-column: 1 / -1; }
  .service-icons li:last-child .svc { max-width: calc(50% - 8px); margin-inline: auto; }
  .svc img { height: 92px; }
  .svc span { font-size: 15.5px; }

  .works, .service-body .works { grid-template-columns: 1fr; }
  .work-portrait .work-frame { max-width: 240px; }
  .laptop-base { margin-inline: -4%; }

  .contact { min-height: 0; padding-bottom: 220px; }
  .contact-lines { width: 60vw; }
  .leaf-c1 { width: 44vw; top: auto; bottom: 30px; left: 30%; opacity: .45; }
  .leaf-c2 { display: none; }

}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { transform: none; transition: opacity 300ms ease; }
  .svc, .svc img, .work-frame, .contact-item, .btn { transition: background-color 200ms ease, color 200ms ease; }
  .svc:hover, .work:hover .work-frame, .contact-item:hover, .svc:hover img { transform: none; }
  .lightbox { transition: none; }
  .js .hero-name, .js .tagline, .js .hero h1, .js .hero-sub, .js .hero-shapes span { animation: none; }
  .progress { display: none; }
}
