/*
Theme Name: Freelancer
Theme URI: https://cinematic-freelance-showcase.lovable.app
Author: Freelancer Studio
Description: A dark, cinematic one-page portfolio theme for video production studios in real estate and hospitality. Features a full-screen hero with optional background video, a video reel portfolio with lightbox player, and editable text via the Customizer.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: freelancer
Tags: portfolio, one-page, dark, video, photography, custom-logo, custom-colors
*/

/* -------------------------------------------------------------------------
   Design tokens (match the original Lovable site)
   ------------------------------------------------------------------------- */
:root {
  --background: oklch(0.13 0 0);
  --foreground: oklch(0.96 0.005 80);
  --muted-foreground: oklch(0.68 0.01 80);
  --accent: oklch(0.78 0.11 70);
  --border: oklch(1 0 0 / 14%);
  --overlay: linear-gradient(180deg, oklch(0.13 0 0 / 0.55) 0%, oklch(0.13 0 0 / 0.2) 45%, oklch(0.13 0 0 / 0.95) 100%);
  --font-display: "Josefin Sans", sans-serif;
  --font-body: "Manrope", sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background-color: var(--background);
  color: var(--foreground);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img, video { max-width: 100%; height: auto; display: block; }

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

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 300;
  letter-spacing: 0.04em;
  margin: 0;
}

.eyebrow {
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.35em;
  font-size: 0.75rem;
}

/* -------------------------------------------------------------------------
   Header
   ------------------------------------------------------------------------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
}

.site-header .custom-logo { height: 2.5rem; width: auto; }

.site-nav { display: flex; gap: 2rem; }
.site-nav a { transition: opacity 0.2s; }
.site-nav a:hover { opacity: 0.6; }

/* -------------------------------------------------------------------------
   Hero
   ------------------------------------------------------------------------- */
.hero {
  position: relative;
  display: flex;
  align-items: flex-end;
  height: 100vh;
  min-height: 640px;
  overflow: hidden;
}

.hero-media,
.hero-media img,
.hero-media video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-media img { transform: scale(1.05); }

.hero-overlay {
  position: absolute;
  inset: 0;
  background-image: var(--overlay);
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 56rem;
  padding: 0 1.5rem 5rem;
  animation: rise 1.2s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.hero-content .eyebrow { color: var(--accent); margin: 0 0 1.5rem; }

.hero-content h1 {
  font-size: clamp(2rem, 5vw, 3.75rem);
  line-height: 1.25;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: none; }
}

/* -------------------------------------------------------------------------
   Buttons
   ------------------------------------------------------------------------- */
.btn {
  display: inline-block;
  margin-top: 2.5rem;
  padding: 1rem 2rem;
  border: 1px solid var(--foreground);
  transition: background-color 0.2s, color 0.2s;
  cursor: pointer;
}

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

/* -------------------------------------------------------------------------
   About
   ------------------------------------------------------------------------- */
.about {
  max-width: 48rem;
  margin: 0 auto;
  padding: 8rem 1.5rem;
  text-align: center;
}

.about p {
  font-size: clamp(1.5rem, 3vw, 1.875rem);
  font-weight: 300;
  line-height: 1.6;
  margin: 0;
}

.about .text-link {
  color: var(--accent);
  margin-top: 2.5rem;
  display: inline-block;
}
.about .text-link:hover { opacity: 0.7; }

/* -------------------------------------------------------------------------
   Work grid
   ------------------------------------------------------------------------- */
.work { padding: 0 1.5rem 8rem; }
.work > .eyebrow { color: var(--muted-foreground); margin: 0 0 2.5rem; }

.work-grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: 1fr;
}

.reel { cursor: pointer; }

.reel-thumb {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 3;
}

.reel-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.5s;
}

.reel:hover .reel-thumb img { transform: scale(1.05); }

.reel-play {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.8;
  transition: opacity 0.2s;
}

.reel:hover .reel-play { opacity: 1; }

.reel-play span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 4rem;
  height: 4rem;
  border-radius: 9999px;
  border: 1px solid var(--foreground);
  background: oklch(0.13 0 0 / 40%);
  backdrop-filter: blur(8px);
  font-size: 1.25rem;
  padding-left: 0.25rem;
}

.reel-meta {
  margin-top: 1.25rem;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 1rem;
}

.reel-meta h3 { font-size: 1.25rem; }
.reel-meta .eyebrow { color: var(--muted-foreground); letter-spacing: 0.2em; }

@media (min-width: 768px) {
  .work-grid { grid-template-columns: repeat(2, 1fr); }
  .site-header, .hero-content, .work { padding-left: 3rem; padding-right: 3rem; }
}

@media (min-width: 1024px) {
  .work-grid { grid-template-columns: repeat(3, 1fr); }
}

/* -------------------------------------------------------------------------
   Contact
   ------------------------------------------------------------------------- */
.contact {
  border-top: 1px solid var(--border);
  padding: 8rem 1.5rem;
  text-align: center;
}

.contact img {
  margin: 0 auto;
  width: 10rem;
  height: 10rem;
  object-fit: contain;
}

.contact h2 {
  margin-top: 2rem;
  font-size: clamp(2.25rem, 5vw, 3rem);
}

/* -------------------------------------------------------------------------
   Lightbox
   ------------------------------------------------------------------------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  background: oklch(0.13 0 0 / 95%);
  padding: 1.5rem;
}

.lightbox[hidden] { display: none; }

.lightbox-inner { width: 100%; max-width: 64rem; }

.lightbox video,
.lightbox iframe {
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
  background: #000;
}

.lightbox-coming-soon {
  position: relative;
  aspect-ratio: 16 / 9;
}

.lightbox-coming-soon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.5;
}

.lightbox-coming-soon .eyebrow {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-bar {
  margin-top: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
}

.lightbox-bar h3 { font-size: 1.25rem; }

.lightbox-close {
  background: none;
  border: 0;
  color: inherit;
  cursor: pointer;
}
.lightbox-close:hover { opacity: 0.6; }

/* -------------------------------------------------------------------------
   Footer
   ------------------------------------------------------------------------- */
.site-footer {
  padding: 2rem 1.5rem;
  text-align: center;
  font-size: 0.75rem;
  color: var(--muted-foreground);
}
